|
|||||||||
Home >> All >> javax >> ide >> [ editor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
javax.ide.editor
Class Editor

java.lang.Objectjavax.ide.view.DefaultViewable
javax.ide.view.View
javax.ide.editor.Editor
- All Implemented Interfaces:
- javax.ide.Identifiable, javax.ide.view.Viewable
- public abstract class Editor
- extends javax.ide.view.View
The Editor
interface defines the methods to open and
close editors, along with methods to save and restore editor specific
settings.
Extensions that introduce new editor types need to implement this interface. A new editor is introduced by declaring it in the extension deployment descriptor (EDD) file. There, the editor implementation class is associated with a unique string identifying the editor type.
Field Summary | |
private javax.ide.command.Context |
_context
|
Fields inherited from class javax.ide.view.DefaultViewable |
|
Fields inherited from interface javax.ide.view.Viewable |
PROP_ICON_PATH, PROP_LABEL, PROP_VISIBLE |
Constructor Summary | |
Editor()
|
Method Summary | |
abstract void |
close()
This method is called when the editor is closed by the user. |
javax.ide.command.Context |
getContext()
Get the context for this editor. |
java.lang.String |
getLabel()
Get a short descriptive label that can be shown to the user. |
void |
open(javax.ide.command.Context context)
This method is called to open the editor. |
abstract void |
restore(java.util.prefs.Preferences preference)
Restore the last known state of the editor. |
abstract void |
save(java.util.prefs.Preferences preference)
Save the current state of the editor so that it can be restored when the editor is re-opened on the same document. |
Methods inherited from class javax.ide.view.View |
activate, deactivate, getController, getGUI, isVisible, parent, setVisible |
Methods inherited from class javax.ide.view.DefaultViewable |
addPropertyChangeListener, firePropertyChange, getIcon, getToolTip, removePropertyChangeListener, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.ide.Identifiable |
getID |
Field Detail |
_context
private javax.ide.command.Context _context
Constructor Detail |
Editor
public Editor()
Method Detail |
open
public void open(javax.ide.command.Context context)
- This method is called to open the editor. This method is reponsible
for creating the editor, intializing it with the
javax.ide.model.Document specified by the
context
.This method should only be called by the EditorManager. The editor manager needs to keep track of all editors opened.
This implementation stores the context for later retrieval via getContext().
close
public abstract void close()
- This method is called when the editor is closed by the user. This
method is responsible for closing the editor.
This method should only be called by the EditorManager. The editor manager needs to keep track of all editors opened.
restore
public abstract void restore(java.util.prefs.Preferences preference)
- Restore the last known state of the editor. This method is called
by the EditorManager just before the editor is opened.
This method should only be called by the EditorManager.
save
public abstract void save(java.util.prefs.Preferences preference)
- Save the current state of the editor so that it can be restored when the
editor is re-opened on the same document. This method is called by the
EditorManager when an editor is about to be closed, or when
the
EditorManager
is shutting down.This method should only be called by the EditorManager.
getLabel
public java.lang.String getLabel()
- Description copied from class:
javax.ide.view.DefaultViewable
- Get a short descriptive label that can be shown to the user.
getContext
public javax.ide.command.Context getContext()
- Get the context for this editor. This implementation returns the
context passed to the open() method.
|
|||||||||
Home >> All >> javax >> ide >> [ editor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |