oracle.jdeveloper.uieditor
Interface ModelFactory

ModelFactory describes the API by which an integrator may extend the UIEditor
to provide custom design surfaces, known as UIEditorCanvas, which may be
used by the user to manipulate an associated custom CmtModel implementation.

For example; a ModelFactory implementation might be provided to
produce instances of 'UICanvas' which in turn manipulates instances of
its custom model 'UIModel'. Additionally, a ModelFactory implementation
might be provided to produce instaces of a 'MenuCanvas' which in turn
manipulates instances of its custom model 'MenuModel'.
Implementations of this interface are expected to be singletons. A
ModelFactory is expected upon a call to annotate to generate relevant custom
CmtModel instances which are then to be held by the target CmtComponentSource.
Likewise, a ModelFactory instance is expected to keep track of an associated
UIEditorCanvas on a UIEdiotr by UIEditor basis.

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.

annotate

Called by the UIManager to parse the CmtComponentSource to produce any
applicable CmtModel instances. Any CmtModel instances produced are
expected to be added to the CmtComponentSource provided for subsequent use
by Cmt clients.

registerSubMenu

Create a unique identifier for a given submenu name within a given submenu
parent. The resulting identifier may be used as the parentID argument when
registering additional submenus or registering actions via registerAction.
If a submenu of the same name within the same parent has already been
registered, the identifier for the existing menu will be returned and its
mnemonic and weight will be left unchanged.

Parameters:

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.

Returns:

a unique menu identifier.

See Also:

oracle.ide.MenuManager

registerAction

Generate an IdeAction for use when interacting with instances of the
UIEditorCanvas produced by this factory. The generated action is stored
internally for later retrieval. All registered IdeAction will be displayed
on the dynamic menu associated with the UIEditor unless that action
has a Boolean.TRUE value set for its IdeAction.HIDDEN key.

Parameters:

cmdID - the Command ID for which an IdeAction is desired

name - the name for the resulting IdeAction

mnemonic - the mnemonic for the resulting IdeAction

icon - the Icon for the resulting IdeAction

parentID - the submenu ID onto which to add the IdeAction,
else NO_PARENT

registerAction

Generate an IdeAction for use when interacting with instances of the
UIEditorCanvas produced by this factory. The generated action is stored
internally for later retrieval. All registered IdeAction will be displayed
on the dynamic menu associated with the UIEditor unless that action
has a Boolean.TRUE value set for its IdeAction.HIDDEN key.

Parameters:

cmdID - the Command ID for which an IdeAction is desired

name - the name for the resulting IdeAction

mnemonic - the mnemonic for the resulting IdeAction

bundle - the ArrayResourceBundle from which to fetch the Icon

key - the resource key to use when fetching an Icon for the
resulting IdeAction

parentID - the submenu ID onto which to add the IdeAction,
else NO_PARENT