|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Editor
An interface to the built-in editor that can edit a single document at a time. This interface provides APIs for:
| Method Summary | |
|---|---|
void |
addFileChangeListener(FileChangeListener l)
Registers the given file change listener. |
void |
addLineChangeListener(LineChangeListener l)
Registers the given line change listener. |
Action |
getCopy()
Returns the copy action of this editor. |
Action |
getCut()
Returns the cut action of this editor. |
Action |
getDelete()
Returns the action for delete menu item. |
Action |
getFind()
Returns the find action of this editor. |
Action |
getGoto()
Returns the goto action of this editor. |
OptionPanel |
getOptionPanel()
Returns the option panel of this editor. |
Action |
getPaste()
Returns the action for paste menu item. |
Action |
getRedo()
Returns the redo action of this editor. |
Action |
getUndo()
Returns the undo action of this editor. |
JComponent |
getView()
Returns the view of this editor. |
void |
highlight(int line)
Highlights the specified line. |
void |
highlight(int line,
int column)
Highlights the specified line and column. |
boolean |
isDirty()
Returns true if there exist any unsaved edits. |
boolean |
newDocument()
Creates a new empty document and returns true if the creation was successful. |
boolean |
openFile(File file)
Opens the given file file using this editor, and
returns true if the file was successfully opened. |
boolean |
saveFile(File file)
Saves the document of this editor to the given file file, and returns true if it was successfully
saved. |
void |
setDropTarget(DropTarget dropTarget)
Associates a DropTarget with this editor so that the editor receives drops. |
void |
setHideViewAction(AbstractAction action)
Given the action that hides this editor's view, provides an appropriate user interface for it, such as a popup menu. |
| Method Detail |
|---|
boolean newDocument()
boolean openFile(File file)
file using this editor, and
returns true if the file was successfully opened. The contents
of the file are read into the editing buffer (i.e., document)
of this editor.
boolean saveFile(File file)
file, and returns true if it was successfully
saved.
boolean isDirty()
void highlight(int line,
int column)
void highlight(int line)
JComponent getView()
OptionPanel getOptionPanel()
void setDropTarget(DropTarget dropTarget)
void setHideViewAction(AbstractAction action)
void addFileChangeListener(FileChangeListener l)
void addLineChangeListener(LineChangeListener l)
Action getCopy()
Action getCut()
Action getPaste()
Action getDelete()
Action getUndo()
Action getRedo()
Action getFind()
Action getGoto()
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||