public interface EditorInterface
| Modifier and Type | Method and Description |
|---|---|
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 |
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. |
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.
|
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.
|
void addDocumentListener(DocumentListener listener)
listener - listenervoid removeDocumentListener(DocumentListener listener)
listener - listenervoid addCaretListener(CaretListener listener)
listener - listenervoid removeCaretListener(CaretListener listener)
listener - listenerboolean accept(File file)
true.file - file to testtrue, this editor support this file type.boolean accept(Editor.EditorSyntaxConstant editorSyntaxConstant)
true.editorSyntaxConstant - syntaxe type to testtrue, this editor support this syntax type.boolean isModified()
true if current file is modifiedboolean open(File file)
file - the file to openboolean saveAs(File file)
file - the file to openString getText()
String.Stringvoid setText(String text)
text - test to setvoid cut()
void copy()
void paste()
void setEnabled(boolean b)
b - enablevoid setSyntax(Editor.EditorSyntaxConstant editorSyntax)
editorSyntax - to useCopyright © 2004–2017 Ultreia.io. All rights reserved.