|
Extension SDK 10.1.3.36.73 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.view.View
oracle.ide.editor.Editor
Editors such as code, gui, html editors should implements the Editor interface.
| Field Summary | |
protected Context |
_context
|
static java.lang.String |
ATTRIBUTE_BACKGROUND_COLOR
return the desired background Color. |
static java.lang.String |
ATTRIBUTE_CUSTOM_HORIZONTAL_SCROLLBAR
Return a non-null value if you want to control the editor scrolling with your own horizontal scrollbar. |
static java.lang.String |
ATTRIBUTE_CUSTOM_VERTICAL_SCROLLBAR
Return a non-null value if you want to control the editor scrolling with your own vertical scrollbar. |
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_OLD_EDITOR
return Boolean.TRUE if this editor was written before JDeveloper 9.0.5 (MDI windowing) and the
old behavior is still needed. |
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 |
protected static javax.swing.border.Border |
CUSTOM_BORDER
|
| Fields inherited from class oracle.ide.view.View |
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP |
| Constructor Summary | |
Editor()
|
|
| Method Summary | |
void |
addPreferredLayoutListener(PreferredLayoutListener l)
Add a PreferredLayoutListener. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
|
void |
close()
Close the view |
void |
editorHidden()
This method is called when an editor is hidden. |
void |
editorShown()
This method is called when an editor is made visible. |
protected void |
firePropertyChangeEvent(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.awt.Component |
getBottomComponent()
|
Context |
getContext(java.util.EventObject event)
Get the current view context for the given EventObject. |
ContextMenu |
getContextMenu()
Gets the ContextMenu object, if any, managed by this instance. |
Controller |
getController()
Gets the Controller associated with this view. |
java.awt.Component |
getDefaultFocusComponent()
This method is used to know what component should get the focus by default. |
Node[] |
getDependentNodes()
Editors which access or manipulate more than one Node must return these Nodes using this method. |
java.lang.String |
getDisplayName()
Returns a visible name that describes the class implementing this interface. |
java.lang.Object |
getEditorAttribute(java.lang.String attribute)
|
java.awt.Component |
getFixedBottomMargin()
|
java.awt.Component |
getFixedLeftMargin()
|
java.awt.Component |
getFixedRightMargin()
|
java.awt.Component |
getFixedTopMargin()
|
java.awt.Component |
getMiniToolbar()
|
java.lang.String |
getPreferredLayoutBaseName()
Returns the base name is used as the file name part when building the preferred layout URL. |
java.net.URL |
getPreferredLayoutURL()
Implementations should override this method and return their preferred layout. |
java.awt.Component |
getScrollableLeftMargin()
|
java.awt.Component |
getScrollableTopMargin()
|
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. |
java.lang.String |
getType()
Return a string that uniquely identifies this selector. |
void |
initializeActiveLayout()
This method is called immediate after activating the selector's preferred layout. |
void |
initializeLayout(Layout layout)
This method is called before to activate the selector's preferred layout. |
boolean |
isReady()
This method is called before a preferred layout is activated. |
void |
loadSettings(StructuredPropertyAccess element)
Reloads the editor settings. |
protected java.lang.String |
newId()
Generates an unique view ID. |
abstract void |
open()
Open this editor on the context set by a prior call to setContext. |
void |
removePreferredLayoutListener(PreferredLayoutListener l)
Remvoe a PreferredLayoutListener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
|
void |
saveSettings(StructuredPropertyAccess element)
Saves the editor settings. |
void |
setContext(Context context)
Sets the current editor context. |
void |
setPreferredLayoutBaseName(java.lang.String name)
Set the base name is used as the file name part when building the preferred layout URL. |
void |
setPreferredLayoutURL(java.net.URL layoutURL)
This method is called from the activatePreferredLayout method to record a layout chosen by the user as their preferred layout. |
void |
setType(java.lang.String type)
Set a string that uniquely identifies this selector. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.ide.model.Observer |
update |
| Field Detail |
public static final java.lang.String ATTRIBUTE_SCROLLABLE
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.
public static final java.lang.String ATTRIBUTE_CUSTOM_HORIZONTAL_SCROLLBAR
public static final java.lang.String ATTRIBUTE_CUSTOM_VERTICAL_SCROLLBAR
public static final java.lang.String ATTRIBUTE_HORIZONTAL_SCROLLBAR_POLICY
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
JScrollPane.setHorizontalScrollBarPolicy(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_VERTICAL_SCROLLBAR_POLICY
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
JScrollPane.setVerticalScrollBarPolicy(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_HORIZONTAL_UNIT_INCREMENT
Integer
JScrollBar.setUnitIncrement(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_VERTICAL_UNIT_INCREMENT
Integer
JScrollBar.setUnitIncrement(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_HORIZONTAL_BLOCK_INCREMENT
Integer
JScrollBar.setBlockIncrement(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_VERTICAL_BLOCK_INCREMENT
Integer
JScrollBar.setUnitIncrement(int),
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_BACKGROUND_COLOR
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.
public static final java.lang.String ATTRIBUTE_MENU_ID
String.
DynamicMenuListener,
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_OLD_EDITOR
Boolean.TRUE if this editor was written before JDeveloper 9.0.5 (MDI windowing) and the
old behavior is still needed. Using this mode is strongly discouraged.
protected static final javax.swing.border.Border CUSTOM_BORDER
protected Context _context
| Constructor Detail |
public Editor()
| Method Detail |
public abstract void open()
OpenAbortedException
setContext(oracle.ide.Context)public java.awt.Component getDefaultFocusComponent()
public java.lang.String getTitleLabel()
public java.lang.String getTabLabel()
public javax.swing.Icon getTabIcon()
public java.lang.String getTabDescription()
public void setContext(Context context)
public Node[] getDependentNodes()
public void editorShown()
public void editorHidden()
editorShown()public Controller getController()
ViewController associated with this view.
getController in interface ControllerProvidergetController in class Viewpublic Context getContext(java.util.EventObject event)
View
getContext in class Viewevent - event associated with the context;public ContextMenu getContextMenu()
View
getContextMenu in class Viewpublic void close()
View
close in class Viewpublic java.awt.Component getBottomComponent()
public java.lang.Object getEditorAttribute(java.lang.String attribute)
attribute - takes values from ATTRIBUTE_ constants.
public java.awt.Component getFixedLeftMargin()
public java.awt.Component getFixedRightMargin()
public java.awt.Component getFixedTopMargin()
public java.awt.Component getFixedBottomMargin()
public java.awt.Component getScrollableLeftMargin()
public java.awt.Component getScrollableTopMargin()
public java.awt.Component getMiniToolbar()
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
public void saveSettings(StructuredPropertyAccess element)
Example:
public void saveSettings(Element element)
{
String value = "value";
element.setAttribute("key", value);
Node ownerNode = element.getOwnerNode();
for(int i=0;i<3;i++)
{
Element subElement = ownerNode.createElement("sub");
String subValue = "sub-value-"+i;
subElement.setAttribute("sub-key", subValue);
element.appendChild(subElement);
}
}
public void loadSettings(StructuredPropertyAccess element)
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);
}
}
protected final void firePropertyChangeEvent(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
public java.net.URL getPreferredLayoutURL()
LayoutSelectornull
indicating that the selector does not have a preferred layout.
getPreferredLayoutURL in interface LayoutSelectorpublic void setPreferredLayoutURL(java.net.URL layoutURL)
LayoutSelector
setPreferredLayoutURL in interface LayoutSelectorpublic void initializeLayout(Layout layout)
LayoutSelector
initializeLayout in interface LayoutSelectorpublic void initializeActiveLayout()
LayoutSelector
initializeActiveLayout in interface LayoutSelectorpublic boolean isReady()
LayoutSelector
isReady in interface LayoutSelectorpublic java.lang.String getDisplayName()
LayoutSelector
getDisplayName in interface LayoutSelectorpublic java.lang.String getType()
LayoutSelector
getType in interface LayoutSelectorpublic void setType(java.lang.String type)
LayoutSelector
setType in interface LayoutSelectorpublic java.lang.String getPreferredLayoutBaseName()
LayoutSelector
getPreferredLayoutBaseName in interface LayoutSelectorpublic void setPreferredLayoutBaseName(java.lang.String name)
LayoutSelector
setPreferredLayoutBaseName in interface LayoutSelectorpublic void addPreferredLayoutListener(PreferredLayoutListener l)
LayoutSelectorPreferredLayoutListener.
addPreferredLayoutListener in interface LayoutSelectorpublic void removePreferredLayoutListener(PreferredLayoutListener l)
LayoutSelectorPreferredLayoutListener.
removePreferredLayoutListener in interface LayoutSelectorprotected java.lang.String newId()
View
newId in class View
|
Extension SDK 10.1.3.36.73 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright © 1997, 2005, Oracle.All rights reserved.