|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction y.view.Graph2DViewActions.AbstractGroupingAction y.view.Graph2DViewActions.FoldSelectionAction
public static class Graph2DViewActions.FoldSelectionAction
Action that moves multiple nodes in a new folder node.
Field Summary |
---|
Fields inherited from class y.view.Graph2DViewActions.AbstractGroupingAction |
---|
view |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
Graph2DViewActions.FoldSelectionAction()
Creates a new FoldSelectionAction that has no default view. |
|
Graph2DViewActions.FoldSelectionAction(Graph2DView view)
Creates a new FoldSelectionAction |
Method Summary | |
---|---|
protected boolean |
acceptNode(Graph2D graph,
Node node)
Check whether a node should be changed by this action. |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
protected void |
assignFolderName(Node groupNode,
Graph2DView view)
Assigns a name to the group node. |
protected void |
configureFolderRealizer(NodeRealizer realizer)
Updates the group/folder state of the specified realizer if necessary. |
protected Node |
createEmptyFolderNode(Graph2DView view)
Creates an empty folder node that is positioned at the center of the view. |
protected java.lang.String |
createFolderName(Node folderNode,
Graph2DView view)
Creates a name for the group node when it is in folded state. |
protected Node |
createFolderNode(NodeList nodesToFold,
Graph2DView view)
Creates a new folder node. |
protected Node |
createFolderNodeWithChildren(NodeList nodesToFold,
Graph2DView view)
Creates a folder node from nodesToFold . |
protected java.lang.String |
createGroupName(Node groupNode,
Graph2DView view)
Creates a name for the group node when it is in opened state. |
void |
foldSelection(Graph2DView view)
Folds all nodes for which acceptNode(Graph2D,y.base.Node) returns true. |
boolean |
isEmptySelectionEnabled()
Returns whether an empty group node should be created if the list of accepted nodes is empty. |
void |
setEmptySelectionEnabled(boolean allowEmptySelection)
Sets whether an empty group node should be created if the list of accepted nodes is empty. |
Methods inherited from class y.view.Graph2DViewActions.AbstractGroupingAction |
---|
getHierarchyManager, getNodeStateChangeHandler, getView, isReselectNodes, postNodeStateChange, preNodeStateChange, setNodeStateChangeHandler, setReselectNodes |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph2DViewActions.FoldSelectionAction()
FoldSelectionAction
that has no default view. Invoking this constructor is equivalent
to: new FoldSelectionAction(null)
public Graph2DViewActions.FoldSelectionAction(Graph2DView view)
FoldSelectionAction
view
- the default view that is used if the actual view cannot be determined from the information provided
by an ActionEvent
.Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
public void foldSelection(Graph2DView view)
acceptNode(Graph2D,y.base.Node)
returns true.
view
- The view where all information is used from.protected Node createFolderNode(NodeList nodesToFold, Graph2DView view)
createEmptyFolderNode(Graph2DView)
if nodesToFold is empty and isEmptySelectionEnabled()
returns true
or createFolderNodeWithChildren(y.base.NodeList,
Graph2DView)
. If nodesToFold is empty and isEmptySelectionEnabled()
returns false
then no
node is created and null
is returned.
null
.isEmptySelectionEnabled()
protected Node createEmptyFolderNode(Graph2DView view)
isEmptySelectionEnabled()
protected Node createFolderNodeWithChildren(NodeList nodesToFold, Graph2DView view)
nodesToFold
.
protected void configureFolderRealizer(NodeRealizer realizer)
protected void assignFolderName(Node groupNode, Graph2DView view)
createGroupName(y.base.Node,Graph2DView)
and createFolderName(y.base.Node,Graph2DView)
protected java.lang.String createFolderName(Node folderNode, Graph2DView view)
protected java.lang.String createGroupName(Node groupNode, Graph2DView view)
protected boolean acceptNode(Graph2D graph, Node node)
node
should be included in the group. This implementation returns
true iff the node is currently selected.
node
should be grouped.public boolean isEmptySelectionEnabled()
false
.
setEmptySelectionEnabled(boolean)
,
acceptNode(Graph2D,y.base.Node)
,
createEmptyFolderNode(Graph2DView)
public void setEmptySelectionEnabled(boolean allowEmptySelection)
false
.
allowEmptySelection
- whether an empty group node should be created if the list of accepted nodes is empty.isEmptySelectionEnabled()
,
acceptNode(Graph2D,y.base.Node)
,
createEmptyFolderNode(Graph2DView)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |