oracle.ide.editor
Class AbstractFlatEditor
java.lang.Object
oracle.ide.addin.AbstractView
oracle.ide.editor.AbstractEditor
oracle.ide.editor.AbstractFlatEditor
- All Implemented Interfaces:
- ControllerProvider, Editor, FlatEditor, Helpable, LayoutSelector, Observer, View
- Direct Known Subclasses:
- AbstractConnectionEditor, CodeEditor, UIEditor
- public abstract class AbstractFlatEditor
- extends AbstractEditor
- implements FlatEditor
Methods inherited from class oracle.ide.editor.AbstractEditor |
addPreferredLayoutListener, close, editorHidden, editorShown, getContext, getContext, getContextMenu, getController, getDefaultFocusComponent, getDependentDocuments, getDisplayName, getEditorFrame, getPreferredLayoutBaseName, getPreferredLayoutMap, getPreferredLayoutURL, getTabDescription, getTabIcon, getTabLabel, getTitleLabel, getType, initializeActiveLayout, initializeLayout, isReady, newId, onInitializeLayout, onPreferredLayoutActivate, owner, removePreferredLayoutListener, setContext, setOwner, setPreferredLayoutBaseName, setPreferredLayoutMap, setPreferredLayoutURL, setType |
Methods inherited from class oracle.ide.addin.AbstractView |
activate, addViewListener, addViewSelectionListener, deactivate, fireViewActivated, fireViewClosed, fireViewDeactivated, fireViewSelectionChanged, getHelpInfo, getId, getSelection, getToolbar, isVisible, loadToolbar, loadToolbar, removeViewListener, removeViewSelectionListener, setId, setOwner, setToolbarVisible, show, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.editor.Editor |
editorHidden, editorShown, getDefaultFocusComponent, getDependentDocuments, getTabDescription, getTabIcon, getTabLabel, getTitleLabel, open, setContext, setOwner |
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.layout.LayoutSelector |
addPreferredLayoutListener, getDisplayName, getPreferredLayoutBaseName, getPreferredLayoutURL, getType, initializeActiveLayout, initializeLayout, isReady, removePreferredLayoutListener, setPreferredLayoutBaseName, setPreferredLayoutURL, setType |
AbstractFlatEditor
public AbstractFlatEditor()
getEditorAttribute
public java.lang.Object getEditorAttribute(java.lang.String attribute)
- Specified by:
getEditorAttribute
in interface FlatEditor
- Parameters:
attribute
- takes values from ATTRIBUTE_ constants.
- Returns:
getScrollableLeftMargin
public java.awt.Component getScrollableLeftMargin()
- Specified by:
getScrollableLeftMargin
in interface FlatEditor
- Returns:
- the scrollable left margin if there is one or null.
getFixedLeftMargin
public java.awt.Component getFixedLeftMargin()
- Specified by:
getFixedLeftMargin
in interface FlatEditor
- Returns:
- the non-scrollable left margin if there is one or null.
getFixedRightMargin
public java.awt.Component getFixedRightMargin()
- Specified by:
getFixedRightMargin
in interface FlatEditor
- Returns:
- the non-scrollable right margin if there is one or null.
getFixedTopMargin
public java.awt.Component getFixedTopMargin()
- Specified by:
getFixedTopMargin
in interface FlatEditor
- Returns:
- the non-scrollable top margin if there is one or null.
getScrollableTopMargin
public java.awt.Component getScrollableTopMargin()
- Specified by:
getScrollableTopMargin
in interface FlatEditor
- Returns:
- the scrollable top margin if there is one or null.
getMiniToolbar
public java.awt.Component getMiniToolbar()
- Specified by:
getMiniToolbar
in interface FlatEditor
- Returns:
- the component (usually a toolbar) to be placed on the right of the horizontal toolbar.
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- Specified by:
addPropertyChangeListener
in interface FlatEditor
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- Specified by:
removePropertyChangeListener
in interface FlatEditor
firePropertyChangeEvent
protected void firePropertyChangeEvent(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
saveSettings
public void saveSettings(StructuredPropertyAccess element)
- Description copied from interface:
FlatEditor
- Saves the editor settings.
Example:
public void saveSettings(Element element)
{
String value = "value";
element.setAttribute("key", value);
Document ownerDocument = element.getOwnerDocument();
for(int i=0;i<3;i++)
{
Element subElement = ownerDocument.createElement("sub");
String subValue = "sub-value-"+i;
subElement.setAttribute("sub-key", subValue);
element.appendChild(subElement);
}
}
- Specified by:
saveSettings
in interface FlatEditor
loadSettings
public void loadSettings(StructuredPropertyAccess element)
- Description copied from interface:
FlatEditor
- Reloads the editor settings.
This method will be called when the the product is restarted but also when an editor is split. If the new editor
is of the same type as the original, the settings will be taken from the original (saveSettings) and will be
applied to the new editor (loadSettings). If your editor needs to make the difference, it can test for the
element.getName() which will return "DUPLICATON".
Example:
String value = element.getAttribute("key");
System.out.println("value = " + value);
NodeList childNodes = element.getChildNodes();
int length = childNodes.getLength();
for(int i=0;i<length;i++)
{
Node childNode = childNodes.item(i);
if ("sub".equals(childNode.getNodeName()))
{
Element subElement = (Element) childNode;
String subValue = subElement.getAttribute("sub-key");
System.out.println("subValue = " + subValue);
}
}
- Specified by:
loadSettings
in interface FlatEditor
Copyright © 1997, 2004, Oracle. All rights reserved.