Search this API

y.view
Class Graph2DViewActions.UnfoldSelectionAction

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

public static class Graph2DViewActions.UnfoldSelectionAction
extends Graph2DViewActions.AbstractGroupingAction

Action that removes the selected nodes from their folder.

See Also:
Serialized Form
 
Your browser does not support SVG content.

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.UnfoldSelectionAction()
          Creates a new UnfoldSelectionAction that has no default view.
Graph2DViewActions.UnfoldSelectionAction(Graph2DView view)
          Creates a new UngroupSelectionAction
 
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 convertEdges(EdgeList preparedEdges, Graph2D g)
          Performs necessary actions with all edges that may be touched by this action.
protected  EdgeList prepareEdges(NodeList groupNode, Graph2D g)
          Performs necessary actions with all edges that may be touched by this action.
 void unfoldSelection(Graph2DView view)
          Unfolds all nodes 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.UnfoldSelectionAction

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


Graph2DViewActions.UnfoldSelectionAction

public Graph2DViewActions.UnfoldSelectionAction(Graph2DView view)
Creates a new UngroupSelectionAction

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(java.awt.event.ActionEvent e)

unfoldSelection

public void unfoldSelection(Graph2DView view)
Unfolds all nodes 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 node)
Check whether a node should be changed by this action.

This method should return true iff node should be included in the group. This implementation returns true iff the node is currently selected.

Returns:
true iff node should be grouped.

prepareEdges

protected EdgeList prepareEdges(NodeList groupNode,
                                Graph2D g)
Performs necessary actions with all edges that may be touched by this action.

This implementation does nothing.

Returns:
A list of all edges that have been prepared by this method.

convertEdges

protected void convertEdges(EdgeList preparedEdges,
                            Graph2D g)
Performs necessary actions with all edges that may be touched by this action.

This implementation does nothing.

Parameters:
preparedEdges - A list of all edges that have been prepared by a call to prepareEdges(y.base.NodeList,y.view.Graph2D) .

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