y.view
Class Graph2DViewActions.OpenFoldersAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by y.view.Graph2DViewActions.AbstractGroupingAction
          extended by y.view.Graph2DViewActions.OpenFoldersAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Enclosing class:
Graph2DViewActions

public static class Graph2DViewActions.OpenFoldersAction
extends Graph2DViewActions.AbstractGroupingAction

Action that closes multiple group nodes. By default, all selected group nodes are closed.

See Also:
Serialized Form
 

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.OpenFoldersAction()
          Creates a new OpenFoldersAction that has no default view.
Graph2DViewActions.OpenFoldersAction(Graph2DView view)
          Creates a new OpenFoldersAction
 
Method Summary
protected  boolean acceptNode(Graph2D graph, Node folderNode)
          Check whether a node should be changed by this action.
 void actionPerformed(ActionEvent e)
           
protected  void configureGroupRealizer(NodeRealizer nr)
          Updates the folder/group state of the specified realizer if necessary.
 void openFolder(Node groupNode, Graph2D graph)
          Opens a single folder node.
 void openFolders(Graph2DView view)
          Opens all folders for which acceptNode(Graph2D,y.base.Node) returns true.
 
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

Graph2DViewActions.OpenFoldersAction

public Graph2DViewActions.OpenFoldersAction()
Creates a new OpenFoldersAction that has no default view. Invoking this constructor is equivalent to:
new OpenFoldersAction(null)


Graph2DViewActions.OpenFoldersAction

public Graph2DViewActions.OpenFoldersAction(Graph2DView view)
Creates a new OpenFoldersAction

Parameters:
view - the default view that is used if the actual view cannot be determined from the information provided by an ActionEvent.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)

openFolders

public void openFolders(Graph2DView view)
Opens all folders for which acceptNode(Graph2D,y.base.Node) returns true.

Parameters:
view - The view where all information is used from.

acceptNode

protected boolean acceptNode(Graph2D graph,
                             Node folderNode)
Check whether a node should be changed by this action. This method should return true iff groupNode should be closed.

Returns:
true iff groupNode should be closed.

openFolder

public void openFolder(Node groupNode,
                       Graph2D graph)
Opens a single folder node. This method opens the folder unconditionally. In addition, if Graph2DViewActions.AbstractGroupingAction.getNodeStateChangeHandler() is not null, it is used to configure the relevant edges after opening the node.


configureGroupRealizer

protected void configureGroupRealizer(NodeRealizer nr)
Updates the folder/group state of the specified realizer if necessary.


© Copyright 2000-2010,
yWorks GmbH.
All rights reserved.