|
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.ViewAdapter oracle.jdeveloper.uieditor.AbstractFactory
public abstract class AbstractFactory
AbstractFactory provides an implementation of ModelFactory. Integrators are encouraged to extend this class for any ModelFactory introduced.
ModelFactory
Field Summary | |
---|---|
protected java.util.HashMap |
commands
Hashmap of IdeAction keyed upon command IDs. |
protected java.util.HashMap |
views
HashMap UIEditorCanvas keyed upon instances of UIEditor. |
Fields inherited from interface oracle.jdeveloper.uieditor.ModelFactory |
---|
DEFAULT_SECTION, DEFAULT_WEIGHT, NO_PARENT |
Constructor Summary | |
---|---|
AbstractFactory()
Constructor. |
Method Summary | |
---|---|
protected abstract UIEditorCanvas |
createView()
Create a custom instance of UIEditorCanvas specific to this factory. |
javax.swing.JComponent[] |
gatherDynamicActions(Context context)
Get an array of objects to be hosted in the dynamic menu associated with the View of the given Context. |
IdeAction[] |
getActions()
Get an array of all registered IdeActions for this ModelFactory. |
protected abstract java.lang.String |
getCategory()
Get the accellerator category to use when constructing IdeAction instances from registerAction. |
XMLKeyStrokeContext |
getKeyStrokeContext()
Get an XMLKeyStrokeContext for use with the UIEditorCanavs objects produced by this ModelFactory. |
UIEditorCanvas |
getView(UIEditor editor)
Get a UIEditorCanvas instance associated with the given UIEditor. |
boolean |
isRegistered(IdeAction action)
Determine whether the given IdeAction has been registered with this ModelFactory. |
IdeAction |
registerAction(int cmdID,
java.lang.String name,
java.lang.Integer mnemonic,
ArrayResourceBundle bundle,
int bundleKey,
int parentID,
float weight,
float section)
Generate an IdeAction for use when interacting with instances of the UIEditorCanvas produced by this factory. |
IdeAction |
registerAction(int cmdID,
java.lang.String name,
java.lang.Integer mnemonic,
javax.swing.Icon icon,
int parentID,
float weight,
float section)
Generate an IdeAction for use when interacting with instances of the UIEditorCanvas produced by this factory. |
int |
registerSubMenu(int parentID,
java.lang.String name,
java.lang.Integer mnemonic,
float weight,
float section)
Create a unique identifier for a given submenu name within a given submenu parent. |
void |
viewClosed(ViewEvent e)
Respond to a UIEditor closing by sending a stateChanged message to the UIEditorCanvas that we have associated with that UIEditor and removing self as a ViewListener from the UIEditor. |
Methods inherited from class oracle.ide.view.ViewAdapter |
---|
viewActivated, viewDeactivated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jdeveloper.uieditor.ModelFactory |
---|
annotate, getModelClass |
Field Detail |
---|
protected java.util.HashMap views
protected java.util.HashMap commands
Constructor Detail |
---|
public AbstractFactory()
Method Detail |
---|
public final UIEditorCanvas getView(UIEditor editor)
getView
in interface ModelFactory
editor
- the UIEditor for which a UIEditorCanvas is desired.
views
public XMLKeyStrokeContext getKeyStrokeContext()
ModelFactory
getKeyStrokeContext
in interface ModelFactory
XMLKeyStrokeContext
public int registerSubMenu(int parentID, java.lang.String name, java.lang.Integer mnemonic, float weight, float section)
ModelFactory
registerSubMenu
in interface ModelFactory
parentID
- the identifier for the parent submenu, else NO_PARENT.name
- the caption appearing on the menu.mnemonic
- the mnemonic appearing on the menu.weight
- the weight for positioning the menu relative to its
siblings within the same section as used by oracle.ide.MenuManager.section
- the section in which to group the menu.
oracle.ide.MenuManager
public IdeAction registerAction(int cmdID, java.lang.String name, java.lang.Integer mnemonic, javax.swing.Icon icon, int parentID, float weight, float section)
ModelFactory
registerAction
in interface ModelFactory
cmdID
- the Command ID for which an IdeAction is desiredname
- the name for the resulting IdeActionmnemonic
- the mnemonic for the resulting IdeActionicon
- the Icon for the resulting IdeActionparentID
- the submenu ID onto which to add the IdeAction,
else NO_PARENTweight
- the weight of the associated menu item.section
- the section of the associated menu item.
oracle.ide.addin.Command
,
oracle.ide.IdeAction
,
oracle.ide.MenuManager
public IdeAction registerAction(int cmdID, java.lang.String name, java.lang.Integer mnemonic, ArrayResourceBundle bundle, int bundleKey, int parentID, float weight, float section)
ModelFactory
registerAction
in interface ModelFactory
cmdID
- the Command ID for which an IdeAction is desiredname
- the name for the resulting IdeActionmnemonic
- the mnemonic for the resulting IdeActionbundle
- the ArrayResourceBundle from which to fetch the IconbundleKey
- the resource key to use when fetching an Icon for the
resulting IdeActionparentID
- the submenu ID onto which to add the IdeAction,
else NO_PARENTweight
- the weight of the associated menu item.section
- the section of the associated menu item.
oracle.ide.addin.Command
,
oracle.ide.IdeAction
public IdeAction[] getActions()
ModelFactory
getActions
in interface ModelFactory
ModelFactory.registerAction(int, java.lang.String, java.lang.Integer, javax.swing.Icon, int, float, float)
public boolean isRegistered(IdeAction action)
ModelFactory
isRegistered
in interface ModelFactory
action
- the IdeAction to check.
public final void viewClosed(ViewEvent e)
viewClosed
in interface ViewListener
viewClosed
in class ViewAdapter
e
- the close event of a UIEditor.protected abstract UIEditorCanvas createView()
getView(oracle.jdeveloper.uieditor.UIEditor)
protected abstract java.lang.String getCategory()
registerAction(int, String, Integer, Icon)
,
registerAction(int, String, Integer, ArrayResourceBundle, int)
,
oracle.ide.IdeAction
public javax.swing.JComponent[] gatherDynamicActions(Context context)
gatherDynamicActions
in interface DynamicMenuListener
context
- the Context for which dynamic menu items are requested.
|
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 |