|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.nuiton.widget.editor.JEditEditor
public class JEditEditor
RSyntaxTextArea editor implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected org.syntax.jedit.JEditTextArea |
editor
|
protected boolean |
isModified
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JEditEditor()
|
|
| Method Summary | |
|---|---|
boolean |
accept(Editor.EditorSyntaxConstant editorSyntaxConstant)
If return true, this editor support the syntax type. |
boolean |
accept(File file)
If return true, this editor support this file type. |
void |
addCaretListener(CaretListener listener)
Add caret listener. |
void |
addDocumentListener(DocumentListener listener)
Add document listener. |
void |
changedUpdate(DocumentEvent e)
|
void |
copy()
Copy current current selection into system clipboard. |
void |
cut()
Cut current editor selection into system clipboard. |
String |
getText()
Return the current content text of the editor as String. |
void |
insertUpdate(DocumentEvent e)
|
boolean |
isModified()
Indicate if current opened file has been modified. |
boolean |
open(File file)
Replace the current edited file by file passed in argument. |
void |
paste()
Paste current clicboard content into editor at caret position. |
void |
removeCaretListener(CaretListener listener)
Remove caret listener. |
void |
removeDocumentListener(DocumentListener listener)
Remove document listener. |
void |
removeUpdate(DocumentEvent e)
|
boolean |
saveAs(File file)
Replace the current edited file by file passed in argument. |
void |
setEnabled(boolean b)
Enable/disable editor. |
void |
setSyntax(Editor.EditorSyntaxConstant editorSyntax)
Force syntax to use |
void |
setText(String text)
Set all text with text in argument. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.syntax.jedit.JEditTextArea editor
protected boolean isModified
| Constructor Detail |
|---|
public JEditEditor()
| Method Detail |
|---|
public boolean accept(File file)
EditorInterfacetrue.
accept in interface EditorInterfacefile - file to test
true, this editor support this file type.public boolean accept(Editor.EditorSyntaxConstant editorSyntaxConstant)
EditorInterfacetrue.
accept in interface EditorInterfaceeditorSyntaxConstant - syntaxe type to test
true, this editor support this syntax type.public void setSyntax(Editor.EditorSyntaxConstant editorSyntax)
EditorInterface
setSyntax in interface EditorInterfaceeditorSyntax - to usepublic boolean open(File file)
EditorInterface
open in interface EditorInterfacefile - the file to open
public void addDocumentListener(DocumentListener listener)
EditorInterface
addDocumentListener in interface EditorInterfacelistener - listenerpublic void removeDocumentListener(DocumentListener listener)
EditorInterface
removeDocumentListener in interface EditorInterfacelistener - listenerpublic void addCaretListener(CaretListener listener)
EditorInterface
addCaretListener in interface EditorInterfacelistener - listenerpublic void removeCaretListener(CaretListener listener)
EditorInterface
removeCaretListener in interface EditorInterfacelistener - listenerpublic String getText()
EditorInterfaceString.
getText in interface EditorInterfaceStringpublic void setEnabled(boolean b)
EditorInterface
setEnabled in interface EditorInterfacesetEnabled in class JComponentb - enablepublic boolean isModified()
EditorInterface
isModified in interface EditorInterfacetrue if current file is modifiedpublic boolean saveAs(File file)
EditorInterface
saveAs in interface EditorInterfacefile - the file to open
public void setText(String text)
EditorInterface
setText in interface EditorInterfacetext - test to setpublic void changedUpdate(DocumentEvent e)
changedUpdate in interface DocumentListenerpublic void insertUpdate(DocumentEvent e)
insertUpdate in interface DocumentListenerpublic void removeUpdate(DocumentEvent e)
removeUpdate in interface DocumentListenerpublic void copy()
EditorInterface
copy in interface EditorInterfacepublic void cut()
EditorInterface
cut in interface EditorInterfacepublic void paste()
EditorInterface
paste in interface EditorInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||