|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.view.View oracle.ide.editor.Editor
public abstract class Editor
Editors such as code, gui, html editors should implements the Editor
interface.
Field Summary | |
---|---|
protected EditorAddin |
_addin
|
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 custom component to control the editor scrolling as your own horizontal scrollbar. |
static java.lang.String |
ATTRIBUTE_CUSTOM_VERTICAL_SCROLLBAR
Return a custom component to control the editor scrolling as your own vertical scrollbar. |
static java.lang.String |
ATTRIBUTE_DELAY_PALETTE_LOAD
|
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
|
static java.lang.String |
PROPERTY_FIXED_BOTTOM_MARGIN
|
static java.lang.String |
PROPERTY_FIXED_LEFT_MARGIN
|
static java.lang.String |
PROPERTY_FIXED_RIGHT_MARGIN
|
static java.lang.String |
PROPERTY_FIXED_TOP_MARGIN
|
static java.lang.String |
PROPERTY_SCROLLABLE_LEFT_MARGIN
|
static java.lang.String |
PROPERTY_SCROLLABLE_TOP_MARGIN
|
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()
|
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)
|
ContextMenu |
getContextMenu()
|
Controller |
getController()
Get 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. |
EditorAddin |
getEditorAddin()
|
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 a unique view ID. |
abstract void |
open()
Open this editor on the context set by a prior call to setContext. |
void |
prepareForSaving(boolean isClosing)
Indicates that the editor is going to be checked for saving. |
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 |
setEditorAddin(EditorAddin addin)
Set the EditorAddin that actually created this editor (as opposed to some random EditorAddin that can create such an editor). |
void |
setEditorAttribute(java.lang.String attribute,
java.lang.Object value)
|
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, 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.
public static final java.lang.String ATTRIBUTE_DELAY_PALETTE_LOAD
public static final java.lang.String PROPERTY_FIXED_BOTTOM_MARGIN
public static final java.lang.String PROPERTY_FIXED_LEFT_MARGIN
public static final java.lang.String PROPERTY_FIXED_RIGHT_MARGIN
public static final java.lang.String PROPERTY_FIXED_TOP_MARGIN
public static final java.lang.String PROPERTY_SCROLLABLE_LEFT_MARGIN
public static final java.lang.String PROPERTY_SCROLLABLE_TOP_MARGIN
protected static final javax.swing.border.Border CUSTOM_BORDER
protected Context _context
protected EditorAddin _addin
Constructor Detail |
---|
public Editor()
Method Detail |
---|
public abstract void open()
OpenAbortedException
OpenAbortedException
- if the editor could not be opened.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 void setEditorAddin(EditorAddin addin)
addin
- public EditorAddin getEditorAddin()
public Node[] getDependentNodes()
public void editorShown()
public void editorHidden()
editorShown()
public Controller getController()
ControllerProvider
Controller
associated with this view.
getController
in interface ControllerProvider
getController
in class View
public Context getContext(java.util.EventObject event)
getContext
in class View
event
- event associated with the context.
public ContextMenu getContextMenu()
getContextMenu
in class View
ContextMenu
, if any.public void close()
close
in class View
public java.awt.Component getBottomComponent()
public java.lang.Object getEditorAttribute(java.lang.String attribute)
attribute
- takes values from ATTRIBUTE_ constants.
public void setEditorAttribute(java.lang.String attribute, java.lang.Object value)
attribute
- takes values from ATTRIBUTE_ constants.value
- the value for the specified attribute.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); } }
public void prepareForSaving(boolean isClosing)
isClosing
- indicates if this editor will be closed or not.protected final void firePropertyChangeEvent(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public java.net.URL getPreferredLayoutURL()
LayoutSelector
null
indicating that the selector does not have a preferred layout.
getPreferredLayoutURL
in interface LayoutSelector
public void setPreferredLayoutURL(java.net.URL layoutURL)
LayoutSelector
setPreferredLayoutURL
in interface LayoutSelector
public void initializeLayout(Layout layout)
LayoutSelector
initializeLayout
in interface LayoutSelector
public void initializeActiveLayout()
LayoutSelector
initializeActiveLayout
in interface LayoutSelector
public boolean isReady()
LayoutSelector
isReady
in interface LayoutSelector
public java.lang.String getDisplayName()
LayoutSelector
getDisplayName
in interface LayoutSelector
public java.lang.String getType()
LayoutSelector
getType
in interface LayoutSelector
public void setType(java.lang.String type)
LayoutSelector
setType
in interface LayoutSelector
public java.lang.String getPreferredLayoutBaseName()
LayoutSelector
getPreferredLayoutBaseName
in interface LayoutSelector
public void setPreferredLayoutBaseName(java.lang.String name)
LayoutSelector
setPreferredLayoutBaseName
in interface LayoutSelector
public void addPreferredLayoutListener(PreferredLayoutListener l)
LayoutSelector
PreferredLayoutListener
.
addPreferredLayoutListener
in interface LayoutSelector
public void removePreferredLayoutListener(PreferredLayoutListener l)
LayoutSelector
PreferredLayoutListener
.
removePreferredLayoutListener
in interface LayoutSelector
protected java.lang.String newId()
View
newId
in class View
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |