|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ide.view.DefaultViewable javax.ide.view.View javax.ide.editor.Editor
public abstract class Editor
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 |
---|
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. |
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(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 |
Constructor Detail |
---|
public Editor()
Method Detail |
---|
public void open(Context context)
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().
context
- The current context. The editor will be opened on
the document specified in the context.public abstract void close()
This method should only be called by the EditorManager
. The
editor manager needs to keep track of all editors opened.
public abstract void restore(java.util.prefs.Preferences preference)
EditorManager
just before the editor is opened.
This method should only be called by the EditorManager
.
preference
- Preferences saved when this editor was last closed.
These preferences are used for restoring the last know state of the
editor. Extensions are responsible for identifying the preference
sub-node associated with this editor.public abstract void save(java.util.prefs.Preferences preference)
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
.
preference
- Preferences saved when this editor was last closed.
These preferences are used for restoring the last know state of the
editor. Extensions are responsible for identifying the preference
sub-node associated with this editor.public java.lang.String getLabel()
DefaultViewable
getLabel
in interface Viewable
getLabel
in class DefaultViewable
public Context getContext()
getContext
in class View
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |