Extension SDK 10.1.2

oracle.ide.editor
Class AbstractFlatEditor

java.lang.Object
  extended byoracle.ide.addin.AbstractView
      extended byoracle.ide.editor.AbstractEditor
          extended byoracle.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


Nested Class Summary
 
Nested classes inherited from class oracle.ide.editor.AbstractEditor
AbstractEditor.LayoutData
 
Field Summary
 
Fields inherited from class oracle.ide.editor.AbstractEditor
_context, _editorFrame, CUSTOM_BORDER
 
Fields inherited from class oracle.ide.addin.AbstractView
owner, SEPARATOR, viewListeners, viewSelectionListeners
 
Fields inherited from interface oracle.ide.editor.FlatEditor
ATTRIBUTE_BACKGROUND_COLOR, ATTRIBUTE_HORIZONTAL_BLOCK_INCREMENT, ATTRIBUTE_HORIZONTAL_SCROLLBAR_POLICY, ATTRIBUTE_HORIZONTAL_UNIT_INCREMENT, ATTRIBUTE_MENU_ID, ATTRIBUTE_SCROLLABLE, ATTRIBUTE_VERTICAL_BLOCK_INCREMENT, ATTRIBUTE_VERTICAL_SCROLLBAR_POLICY, ATTRIBUTE_VERTICAL_UNIT_INCREMENT
 
Fields inherited from interface oracle.ide.addin.View
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Constructor Summary
AbstractFlatEditor()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
           
protected  void firePropertyChangeEvent(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 java.lang.Object getEditorAttribute(java.lang.String attribute)
           
 java.awt.Component getFixedLeftMargin()
           
 java.awt.Component getFixedRightMargin()
           
 java.awt.Component getFixedTopMargin()
           
 java.awt.Component getMiniToolbar()
           
 java.awt.Component getScrollableLeftMargin()
           
 java.awt.Component getScrollableTopMargin()
           
 void loadSettings(StructuredPropertyAccess element)
          Reloads the editor settings.
 void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
           
 void saveSettings(StructuredPropertyAccess element)
          Saves the editor settings.
 
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.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
 

Constructor Detail

AbstractFlatEditor

public AbstractFlatEditor()
Method Detail

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

Extension SDK

 

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