|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The EditorManager
serves as the registry for
Editors
that want to register themselves with specific
Node
types.
oracle.ide.Controller
,
Node
,
oracle.ide.addin.Editor
Method Summary | |
void |
activateCurrentEditorFrame()
Activates the top-most editor frame and editor within it. |
void |
activateEditor(EditorInfo editorInfo)
Activates the editor corresponding to the editorInfo. |
void |
addAutoSyncOption(java.lang.Class editorClass,
java.lang.String editorName,
javax.swing.Icon icon,
boolean defaultValue)
Deprecated. Replace with addAutoSyncOption(String, String, Icon, boolean) |
void |
addAutoSyncOption(java.lang.String editorClass,
java.lang.String editorName,
ArrayResourceBundle bundle,
int key,
boolean defaultValue)
Calling this method adds an entry to the Editors panel in the IDE Settings dialog. |
void |
addAutoSyncOption(java.lang.String editorClass,
java.lang.String editorName,
javax.swing.Icon icon,
boolean defaultValue)
Calling this method adds an entry to the Editors panel in the IDE Settings dialog. |
void |
addEditorListener(EditorListener listener)
Adds a registered listener as an EditorListener. |
void |
addLayoutListener(java.lang.String editorId,
BaseLayoutListener listener)
Add a LayoutListener for one of our child
Editor instances |
void |
closeEditors(java.util.List listEditors)
Close the editors contained in the list. |
void |
disable(Editor editor)
Call this method to disable the specified editor . |
void |
extend(EditorAddin addin,
java.lang.Class[] types)
Associate the Element types supported given with the given EditorAddin. |
java.util.List |
findEditors(Context context)
|
java.util.List |
getAllEditors()
Returns a list of all open Editor s. |
javax.swing.JInternalFrame[] |
getAllFrames()
Returns an array of JInternalFrame s. |
ContextMenu |
getContextMenu()
Get the ContextMenu to be shared by all Editors. |
Editor |
getCurrentEditor()
Returns the currently active editor. |
EditorFrame |
getCurrentEditorFrame()
Returns the topmost editor frame. |
EditorAddin |
getDefaultAddin(Element element)
Gets the default registered EditorAddin for the element. |
javax.swing.JDesktopPane |
getDesktopPane()
|
EditorFrame |
getEditorFrame(Editor editor)
Returns the frame containing the editor |
java.util.List |
getEditorsInfo()
|
javax.swing.JMenu |
getMainSubmenu()
Get the menu item for the "Open Viewer As" sub menu. |
javax.swing.JScrollPane |
getScrollPane()
|
void |
initialize()
|
boolean |
isAutoSyncOn(Editor editor)
Returns the user setting indicating whether the specified editor should keep updating as data is modified by other
editors. |
boolean |
isEditorRegistered(java.lang.Class cls)
Determine whether an Editor implementation has been registered. |
boolean |
maySyncEditor(Editor editor)
Returns whether or not the given editor must synchronize its display with the current state of the data it's presenting to the user. |
Editor |
openDefaultEditorInFrame(Context context)
Opens the specified file (context) using the default registered editor class for this node type. |
Editor |
openDefaultEditorInFrame(Element element)
Open the specified element using the default editor. |
Editor |
openDefaultEditorInFrame(Node node)
Open the specified node using the default editor. |
Editor |
openDefaultEditorInFrame(java.net.URL url)
Open the specified URL using the default editor. |
Editor |
openDefaultEditorInFrameExternal(java.net.URL url)
Open the item at the specified URL in its default Editor , and add that item to the top-level 'Miscellaneous Files'
folder. |
Editor |
openEditorInFrame(java.lang.Class editorClass,
Context context)
Opens the specified file (context) using the specified editor class (editorClass.) The new editor frame will be opened in the active editor tabbed frame (if one exists.) If there is no active editor desktop, or editor tabbed frame, one will be created automatically. |
void |
register(EditorAddin addin,
java.lang.Class[] types)
Registers a EditorAddin for inclusion in a main menu bar group and the ContextMenu of the NavigatorWindow. |
void |
registerPreferredLayoutListener(java.lang.Class docClass,
java.lang.Class editorClass,
java.lang.String preferredLayoutBaseName,
PreferredLayoutListener listener)
Register a PreferredLayoutListener for the specified
docClass . |
void |
removeEditorListener(EditorListener listener)
Removes a registered listener as an EditorListener. |
void |
removeLayoutListener(java.lang.String editorId)
Remove the LayoutListener for one of our child
Editor instances |
void |
replaceEditors(Context oldContext,
Context newContext)
|
void |
saveWelcomeEditor(java.net.URL url,
java.lang.String editorClass,
Layout layout)
This method is called when JDeveloper is starting up to determine if a welcome editor should be displayed the first time JDeveloper is run after installation. |
void |
setExplicit(Editor editor,
boolean bExplicit)
Set the editor as explicit or implicit. |
Methods inherited from interface oracle.ide.addin.Controller |
checkCommands, handleEvent, supervisor, update |
Method Detail |
public void register(EditorAddin addin, java.lang.Class[] types)
addin
- the EditorAddin to registertypes
- the Document classes supported by the addin being registeredpublic void extend(EditorAddin addin, java.lang.Class[] types)
addin
- The EditorAddin to which the extension has been associated.types
- The Element types being associated with addin.public boolean isEditorRegistered(java.lang.Class cls)
cls
- The Editor class upon which the query is being applied.public EditorAddin getDefaultAddin(Element element)
element
- the element for which a default is desired.
public void addEditorListener(EditorListener listener)
listener
- the listener to registerpublic void removeEditorListener(EditorListener listener)
listener
- the listener to de-registerpublic void activateCurrentEditorFrame()
public Editor openDefaultEditorInFrameExternal(java.net.URL url)
URL
in its default Editor
, and add that item to the top-level 'Miscellaneous Files'
folder.This method is primarily used by the editor frame and desktop drag-and-drop code to handle files dropped from the O/S into the editor desktop area.
url
- the URL
of the item to open.
Editor
instance that was opened, or
null
if the operation failed.public Editor openDefaultEditorInFrame(java.net.URL url)
URL
using the default editor. This
will create a node for the file, and from that node, we can
figure out what kind of editor we can open. This lets the
NodeFactory take care of recognizing the file type.
url
- the URL
of the file to open
Editor
instance that was openedpublic Editor openDefaultEditorInFrame(Element element)
element
- the Element
to open
public Editor openDefaultEditorInFrame(Node node)
node
- the node to open
public Editor openDefaultEditorInFrame(Context context)
context
- the context describing the node to open
openEditorInFrame( String, Context )
public Editor openEditorInFrame(java.lang.Class editorClass, Context context)
editorClass
- the editor class to use for opening the nodecontext
- the context describing the node to oen
public void replaceEditors(Context oldContext, Context newContext)
public java.util.List findEditors(Context context)
public java.util.List getAllEditors()
Editor
s.
public javax.swing.JInternalFrame[] getAllFrames()
JInternalFrame
s.
public EditorFrame getCurrentEditorFrame()
public Editor getCurrentEditor()
public EditorFrame getEditorFrame(Editor editor)
public void saveWelcomeEditor(java.net.URL url, java.lang.String editorClass, Layout layout)
url
and specified editorClass
information should be saved in the given layout
.
When the information is saved, the document pointed by the url will
be opened in the specified type of editor when the layout is
activated.
public void initialize()
public void addLayoutListener(java.lang.String editorId, BaseLayoutListener listener)
LayoutListener
for one of our child
Editor
instances
editorId
- the id of the editorlistener
- the LayoutListener
instancepublic void removeLayoutListener(java.lang.String editorId)
LayoutListener
for one of our child
Editor
instances
editorId
- the id of the editorpublic javax.swing.JScrollPane getScrollPane()
public javax.swing.JDesktopPane getDesktopPane()
public ContextMenu getContextMenu()
public javax.swing.JMenu getMainSubmenu()
public void closeEditors(java.util.List listEditors)
listEditors
- a List of EditorInfopublic java.util.List getEditorsInfo()
public void activateEditor(EditorInfo editorInfo)
public void setExplicit(Editor editor, boolean bExplicit)
public void registerPreferredLayoutListener(java.lang.Class docClass, java.lang.Class editorClass, java.lang.String preferredLayoutBaseName, PreferredLayoutListener listener)
PreferredLayoutListener
for the specified
docClass
. When an editor belonging to a given
editorClass
opens a document of type docClass
the listener
will be called. The listener is responsible
for initializing the preferred layout.
The preferredLayoutBaseName
will be used as the name of
the layout.
public boolean isAutoSyncOn(Editor editor)
editor
should keep updating as data is modified by other
editors.
public boolean maySyncEditor(Editor editor)
public void addAutoSyncOption(java.lang.String editorClass, java.lang.String editorName, javax.swing.Icon icon, boolean defaultValue)
public void addAutoSyncOption(java.lang.String editorClass, java.lang.String editorName, ArrayResourceBundle bundle, int key, boolean defaultValue)
public void addAutoSyncOption(java.lang.Class editorClass, java.lang.String editorName, javax.swing.Icon icon, boolean defaultValue)
addAutoSyncOption(String, String, Icon, boolean)
public void disable(Editor editor)
editor
. When
an editor allows user to turn off the "Auto Sync" option, that editor
is also responsible for calling this method when it does not have
the input focus. This method calls the isAutoSync
method
to determine if it should disable the given editor.
The method returns true
if it disabled the editor.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.