|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.controller.NodeActionController
public class NodeActionController
A controller which executes an action on one or more nodes using subclass- specific delegates.
The controller expects the action to provide two string properties: a template string to compute the label for a context with a single selection (action key SINGLE_SELECTION_TEMPLATE_TEXT
); and a string used to for a context with a multiple selection (action key MULTIPLE_SELECTION_TEXT
). The update(oracle.ide.controller.IdeAction, oracle.ide.Context)
method uses these strings to update the action name (action key Action.NAME
) to reflect the current context. (The action name is the string typically displayed by menu items and buttons tied to the action.) Note that if these strings are not supplied, the controller will still function decently.
While the semantics of Context
are tighter than they used to be, the selection semantics are still a little nebulous. This controller assumes, among other things, that all the elements of a selection are either nodes or node containers, or else are elements contained by a single node.
NodeActionDelegate
Field Summary | |
---|---|
static java.lang.String |
MULTIPLE_SELECTION_TEXT Action property key for the text of the context-dependent action name for a context containing multiple selected elements. |
static java.lang.String |
SINGLE_SELECTION_TEMPLATE_TEXT Action property key for the template text used to compute the context-dependent action name for a context containing a single selected element. |
Fields inherited from interface oracle.ide.controller.Controller |
---|
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED |
Constructor Summary | |
---|---|
NodeActionController() |
Method Summary | |
---|---|
void |
addDelegate(java.lang.Class nodeClass, java.lang.Class delegateClass) Adds a NodeActionDelegate to this controller. |
protected NodeActionDelegate |
getDelegate(Node node) |
boolean |
handleEvent(IdeAction action, Context context) This method is called when a user interaction with a View triggers the execution of a command. |
protected void |
queueContainer(Element element, Project project, Workspace workspace, IdeAction action, java.util.Map queue) |
boolean |
update(IdeAction action, Context context) This method updates the enabled status of the specified action within the specified context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SINGLE_SELECTION_TEMPLATE_TEXT
"{0}"
.
public static final java.lang.String MULTIPLE_SELECTION_TEXT
Constructor Detail |
---|
public NodeActionController()
Method Detail |
---|
public void addDelegate(java.lang.Class nodeClass, java.lang.Class delegateClass)
NodeActionDelegate
to this controller.public boolean update(IdeAction action, Context context)
Updates the state of an action to reflect the context.
update
in interface Controller
action
- action whose command is to be executed.context
- the current contextpublic boolean handleEvent(IdeAction action, Context context)
View
triggers the execution of a command.
Executes the controlled action through the delegates.
handleEvent
in interface Controller
action
- action whose command is to be executed.protected NodeActionDelegate getDelegate(Node node)
protected void queueContainer(Element element, Project project, Workspace workspace, IdeAction action, java.util.Map queue)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |