Extension SDK 10.1.2

oracle.ide.editor
Interface FlatEditor

All Superinterfaces:
ControllerProvider, Editor, Helpable, LayoutSelector, Observer, View
All Known Implementing Classes:
AbstractFlatEditor

public interface FlatEditor
extends Editor

Defines an Editor that wants to participate in the improved windowing of JDeveloper 9.0.5


Field Summary
static java.lang.String ATTRIBUTE_BACKGROUND_COLOR
          return the desired background Color.
static java.lang.String ATTRIBUTE_HORIZONTAL_BLOCK_INCREMENT
          return the block increment for the horizontal scrollbar in the form of an Integer
static java.lang.String ATTRIBUTE_HORIZONTAL_SCROLLBAR_POLICY
          The scrollbar policy to be applied to the horizontal scrollbar.
static java.lang.String ATTRIBUTE_HORIZONTAL_UNIT_INCREMENT
          return the unit increment for the horizontal scrollbar in the form of an Integer
static java.lang.String ATTRIBUTE_MENU_ID
          return the menu label to use for the dynamic menu as a String String.
static java.lang.String ATTRIBUTE_SCROLLABLE
          By default, editors are hosted in a JViewport except if the editor returns Boolean.FALSE for this property.
static java.lang.String ATTRIBUTE_VERTICAL_BLOCK_INCREMENT
          return the block increment for the vertical scrollbar in the form of an Integer
static java.lang.String ATTRIBUTE_VERTICAL_SCROLLBAR_POLICY
          The scrollbar policy to be applied to the vertical scrollbar.
static java.lang.String ATTRIBUTE_VERTICAL_UNIT_INCREMENT
          return the unit increment for the vertical scrollbar in the form of an Integer
 
Fields inherited from interface oracle.ide.addin.View
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
           
 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 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
 

Field Detail

ATTRIBUTE_SCROLLABLE

public static final java.lang.String ATTRIBUTE_SCROLLABLE
By default, editors are hosted in a JViewport except if the editor returns Boolean.FALSE for this property. This attribute is queried at the time the editor is hosted and cannot be changed by property changes.

See Also:
Constant Field Values

ATTRIBUTE_HORIZONTAL_SCROLLBAR_POLICY

public static final java.lang.String ATTRIBUTE_HORIZONTAL_SCROLLBAR_POLICY
The scrollbar policy to be applied to the horizontal scrollbar. return ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER or ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS in the form of an Integer Note that ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED is not supported

See Also:
JScrollPane.setHorizontalScrollBarPolicy(int), Constant Field Values

ATTRIBUTE_VERTICAL_SCROLLBAR_POLICY

public static final java.lang.String ATTRIBUTE_VERTICAL_SCROLLBAR_POLICY
The scrollbar policy to be applied to the vertical scrollbar. return ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER or ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS in the form of an Integer. Note that ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED is not supported

See Also:
JScrollPane.setVerticalScrollBarPolicy(int), Constant Field Values

ATTRIBUTE_HORIZONTAL_UNIT_INCREMENT

public static final java.lang.String ATTRIBUTE_HORIZONTAL_UNIT_INCREMENT
return the unit increment for the horizontal scrollbar in the form of an Integer

See Also:
JScrollBar.setUnitIncrement(int), Constant Field Values

ATTRIBUTE_VERTICAL_UNIT_INCREMENT

public static final java.lang.String ATTRIBUTE_VERTICAL_UNIT_INCREMENT
return the unit increment for the vertical scrollbar in the form of an Integer

See Also:
JScrollBar.setUnitIncrement(int), Constant Field Values

ATTRIBUTE_HORIZONTAL_BLOCK_INCREMENT

public static final java.lang.String ATTRIBUTE_HORIZONTAL_BLOCK_INCREMENT
return the block increment for the horizontal scrollbar in the form of an Integer

See Also:
JScrollBar.setBlockIncrement(int), Constant Field Values

ATTRIBUTE_VERTICAL_BLOCK_INCREMENT

public static final java.lang.String ATTRIBUTE_VERTICAL_BLOCK_INCREMENT
return the block increment for the vertical scrollbar in the form of an Integer

See Also:
JScrollBar.setUnitIncrement(int), Constant Field Values

ATTRIBUTE_BACKGROUND_COLOR

public static final java.lang.String ATTRIBUTE_BACKGROUND_COLOR
return the desired background Color. If the editor is scrollable but the editor's UI is smaller than the window, this is what will be used to paint the rectangle below the editor.

See Also:
Constant Field Values

ATTRIBUTE_MENU_ID

public static final java.lang.String ATTRIBUTE_MENU_ID
return the menu label to use for the dynamic menu as a String String.

See Also:
DynamicMenuListener, Constant Field Values
Method Detail

getEditorAttribute

public java.lang.Object getEditorAttribute(java.lang.String attribute)
Parameters:
attribute - takes values from ATTRIBUTE_ constants.
Returns:

getScrollableLeftMargin

public java.awt.Component getScrollableLeftMargin()
Returns:
the scrollable left margin if there is one or null.

getFixedLeftMargin

public java.awt.Component getFixedLeftMargin()
Returns:
the non-scrollable left margin if there is one or null.

getFixedRightMargin

public java.awt.Component getFixedRightMargin()
Returns:
the non-scrollable right margin if there is one or null.

getFixedTopMargin

public java.awt.Component getFixedTopMargin()
Returns:
the non-scrollable top margin if there is one or null.

getScrollableTopMargin

public java.awt.Component getScrollableTopMargin()
Returns:
the scrollable top margin if there is one or null.

getMiniToolbar

public java.awt.Component getMiniToolbar()
Returns:
the component (usually a toolbar) to be placed on the right of the horizontal toolbar.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)

saveSettings

public void saveSettings(StructuredPropertyAccess element)
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);
     }
   }
 

loadSettings

public void loadSettings(StructuredPropertyAccess element)
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);
       }
     }
 


Extension SDK

 

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