|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.Graph2DViewActions
This class provides actions for Graph2DView
.
The easiest way to add the provided actions to an instance of Graph2DView is demonstrated below:
Graph2DViewActions actions = new Graph2DViewActions(view); ActionMap amap = actions.createActionMap(); InputMap imap = actions.createDefaultInputMap(amap); view.getCanvasComponent().setActionMap(amap); view.getCanvasComponent().setInputMap(JComponent.WHEN_FOCUSED, imap);
Field Summary | |
Object |
DELETE_SELECTION
ActionMap key for action returned by Graph2DViewActions.getDeleteSelectionAction() . |
Object |
EDIT_LABEL
ActionMap key for action returned by Graph2DViewActions.getEditLabelAction() . |
Object |
FOCUS_BOTTOM_NODE
ActionMap key for action returned by Graph2DViewActions.getFocusBottomNodeAction() . |
Object |
FOCUS_LEFT_NODE
ActionMap key for action returned by Graph2DViewActions.getFocusLeftNodeAction() . |
Object |
FOCUS_RIGHT_NODE
ActionMap key for action returned by Graph2DViewActions.getFocusRightNodeAction() . |
Object |
FOCUS_TOP_NODE
ActionMap key for action returned by Graph2DViewActions.getFocusTopNodeAction() . |
Constructor Summary | |
Graph2DViewActions(Graph2DView view)
Creates a new instance of Graph2DViewActions. |
Method Summary | |
ActionMap |
createActionMap()
Returns a new ActionMap that contains the actions provided by this class. |
InputMap |
createDefaultInputMap()
Returns a default key binding for the actions provided by this class. |
InputMap |
createDefaultInputMap(ActionMap amap)
Returns a default key binding for the actions provided by this class that are also bound by the given ActionMap. |
Action |
getDeleteSelectionAction()
Returns an action that deletes the currently selected elements from the graph. |
Action |
getEditLabelAction()
Returns an action that triggers the inline label editor. |
Action |
getFocusBottomNodeAction()
Returns an action that selects a node that is below the currently selected node. |
Action |
getFocusLeftNodeAction()
Returns an action that selects a node that is to the left of the currently selected node. |
Action |
getFocusRightNodeAction()
Returns an action that selects a node that is to the right of the currently selected node. |
Action |
getFocusTopNodeAction()
Returns an action that selects a node that is above the currently selected node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final Object FOCUS_RIGHT_NODE
Graph2DViewActions.getFocusRightNodeAction()
.
public final Object FOCUS_LEFT_NODE
Graph2DViewActions.getFocusLeftNodeAction()
.
public final Object FOCUS_TOP_NODE
Graph2DViewActions.getFocusTopNodeAction()
.
public final Object FOCUS_BOTTOM_NODE
Graph2DViewActions.getFocusBottomNodeAction()
.
public final Object DELETE_SELECTION
Graph2DViewActions.getDeleteSelectionAction()
.
public final Object EDIT_LABEL
Graph2DViewActions.getEditLabelAction()
.
Constructor Detail |
public Graph2DViewActions(Graph2DView view)
view
- the view acted upon.Method Detail |
public Action getFocusLeftNodeAction()
public Action getFocusRightNodeAction()
public Action getFocusTopNodeAction()
public Action getFocusBottomNodeAction()
public Action getDeleteSelectionAction()
public Action getEditLabelAction()
public ActionMap createActionMap()
public InputMap createDefaultInputMap()
public InputMap createDefaultInputMap(ActionMap amap)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |