oracle.ide.editor
Interface Editor
- All Superinterfaces:
- Helpable, LayoutSelector, Observer, Subview, View
- All Known Implementing Classes:
- AbstractEditor
- public interface Editor
- extends Observer, View, LayoutSelector
Editors such as code, gui, html editors should implements the
Editor
interface. Editors are generally hosted inside
an EditorFrame
.
- See Also:
Observer
Method Summary |
java.awt.Component |
getDefaultFocusComponent()
This method is used to know what component should get the focus by default. |
Document[] |
getDependentDocuments()
Editors which access or manipulate more than one document
must return these documents using this method. |
java.lang.String |
getTabDescription()
This method is called to get the tooltip to display in the tab
hosting this editor. |
javax.swing.Icon |
getTabIcon()
This method is called to get the icon to display in the tab
hosting this editor. |
java.lang.String |
getTabLabel()
This method is called to get the title to display in the tab
hosting this editor. |
java.lang.String |
getTitleLabel()
This method is called to get the title to display in the title bar
of the EditorFrame hosting this editor. |
void |
open()
Open this editor on the context set by a prior call to setContext. |
void |
setContext(Context context)
Sets the current editor context. |
void |
setOwner(EditorFrame frame)
Sets the editor frame that owns this editor. |
Methods inherited from interface oracle.ide.addin.View |
activate, addViewListener, addViewSelectionListener, deactivate, getContext, getId, getSelection, getToolbar, removeViewListener, removeViewSelectionListener, updateTitle |
Methods inherited from interface oracle.ide.layout.LayoutSelector |
addPreferredLayoutListener, getDisplayName, getPreferredLayoutBaseName, getPreferredLayoutURL, getType, initializeActiveLayout, isReady, removePreferredLayoutListener, setPreferredLayoutBaseName, setPreferredLayoutURL, setType |
open
public void open()
- Open this editor on the context set by a prior call to setContext.
- See Also:
setContext(oracle.ide.addin.Context)
getDefaultFocusComponent
public java.awt.Component getDefaultFocusComponent()
- This method is used to know what component should get the focus by default.
The returned component should be a child of the component returned by
getGUI() or getGUI() itself and should be requestFocusable.
By contract, getGUI() will always be called before
getDefaultFocusComponent().
Note: This method has beem introduced because of the confusion about the
View.activate() method. The activate() method tells the view that it
became active but some classes used the method to actually request the
focus. This resulted in the activate() method being called multiple times.
- Returns:
- the component that should take the focus
getTitleLabel
public java.lang.String getTitleLabel()
- This method is called to get the title to display in the title bar
of the EditorFrame hosting this editor.
getTabLabel
public java.lang.String getTabLabel()
- This method is called to get the title to display in the tab
hosting this editor.
getTabIcon
public javax.swing.Icon getTabIcon()
- This method is called to get the icon to display in the tab
hosting this editor.
getTabDescription
public java.lang.String getTabDescription()
- This method is called to get the tooltip to display in the tab
hosting this editor.
setContext
public void setContext(Context context)
- Sets the current editor context.
setOwner
public void setOwner(EditorFrame frame)
- Sets the editor frame that owns this editor.
getDependentDocuments
public Document[] getDependentDocuments()
- Editors which access or manipulate more than one document
must return these documents using this method. This allows
the EditorManager to track document usage, so that it can
close documents when they are no longer open in any editor.