Extension SDK 10.1.2

oracle.ide.editor
Interface Editor

All Superinterfaces:
ControllerProvider, Helpable, LayoutSelector, Observer, View
All Known Subinterfaces:
FlatEditor
All Known Implementing Classes:
AbstractEditor, AbstractFlatEditor

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

Field Summary
 
Fields inherited from interface oracle.ide.addin.View
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Method Summary
 void editorHidden()
          This method is called when an editor is hidden.
 void editorShown()
          This method is called when an editor is made visible.
 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.Observer
update
 
Methods inherited from interface oracle.ide.addin.View
activate, addViewListener, addViewSelectionListener, close, deactivate, getContext, getContext, getContextMenu, getGUI, getId, getSelection, getToolbar, isVisible, owner, removeViewListener, removeViewSelectionListener, setToolbarVisible, show, updateTitle, updateVisibleActions
 
Methods inherited from interface oracle.ide.addin.ControllerProvider
getController
 
Methods inherited from interface oracle.ide.help.Helpable
getHelpInfo
 
Methods inherited from interface oracle.ide.layout.LayoutSelector
addPreferredLayoutListener, getDisplayName, getPreferredLayoutBaseName, getPreferredLayoutURL, getType, initializeActiveLayout, initializeLayout, isReady, removePreferredLayoutListener, setPreferredLayoutBaseName, setPreferredLayoutURL, setType
 

Method Detail

open

public void open()
Open this editor on the context set by a prior call to setContext. If the editor cannot be open (file not found for example), this method should throw an OpenAbortedException

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.


editorShown

public void editorShown()
This method is called when an editor is made visible. Then intent of this method is to let the editor know if it has to synchronize its content You should not do anything heavy in this method (like showing dockable windows) as the editorHidden()/editorShown could be called in sequence when the user creates a new tabgroup.


editorHidden

public void editorHidden()
This method is called when an editor is hidden.

See Also:
editorShown()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.