| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.AbstractAction
y.view.Graph2DViewActions.AddPredecessorsAction
public static class Graph2DViewActions.AddPredecessorsAction
Action that adds a predecessor node to selected nodes. A predecessor
 node or neighbor node is a new node such that there is an
 edge from the new node to each selected node. To add more than a single
 predecessor node at once, customize the method
 createNeighborNodes(Graph2D, y.base.NodeList).
| Field Summary | 
|---|
| 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.AddPredecessorsAction(Graph2DView view)Initializes a new AddPredecessorsActioninstance. | |
| Method Summary | |
|---|---|
|  void | actionPerformed(java.awt.event.ActionEvent e)Invokes addNeighbors(Graph2DView)for the view returned bygetView(e). | 
|  void | addNeighbors(Graph2DView view)Adds new neighbor nodes for the nodes returned by getReferenceNodes(Graph2D). | 
| protected  NodeList | createNeighborNodes(Graph2D graph,
                    NodeList referenceNodes)Creates the new neighbor nodes. | 
| protected  NodeList | getReferenceNodes(Graph2D graph)Determines the nodes for which a neighbor node should be added. | 
| protected  Graph2DView | getView(java.awt.event.ActionEvent e)Determines the view in which to add new nodes. | 
| protected  void | layoutNeighborNodes(Graph2D graph,
                    NodeList neighborNodes,
                    NodeList referenceNodes)Calculates layout for newly created neighbor nodes. | 
| protected  void | selectNeighborNodes(Graph2D graph,
                    NodeList neighborNodes,
                    NodeList referenceNodes)Selects the nodes created by createNeighborNodes. | 
| 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.AddPredecessorsAction(Graph2DView view)
AddPredecessorsAction instance.
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)
addNeighbors(Graph2DView) for the view returned by
 getView(e).
e - the ActionEvent that triggers the addition of
 new nodes.public void addNeighbors(Graph2DView view)
getReferenceNodes(Graph2D).
 In this context, a neighbor node is a new node such that there
 is an edge connecting each reference node to the new node.
view - the related view.
protected NodeList createNeighborNodes(Graph2D graph,
                                       NodeList referenceNodes)
graph - the graph in which to add new nodes.referenceNodes - the nodes to which the newly created nodes
 have to be connected.
protected NodeList getReferenceNodes(Graph2D graph)
addNeighbors(Graph2DView).
graph - the graph in which to add neighbor nodes.
protected void layoutNeighborNodes(Graph2D graph,
                                   NodeList neighborNodes,
                                   NodeList referenceNodes)
addNeighbors(Graph2DView).
graph - the graph in which to layout new nodes.neighborNodes - the neighbor nodes.referenceNodes - the nodes to which the new neighbor nodes are
 connected.addNeighbors(Graph2DView)
protected void selectNeighborNodes(Graph2D graph,
                                   NodeList neighborNodes,
                                   NodeList referenceNodes)
createNeighborNodes.
 Called from addNeighbors(Graph2DView).
graph - the graph in which to select neighbor nodes.neighborNodes - the neighbor nodes.referenceNodes - the nodes to which the new neighbor nodes are
 connected.createNeighborNodes(Graph2D, y.base.NodeList)protected Graph2DView getView(java.awt.event.ActionEvent e)
e - the ActionEvent that triggers the addition of
 new nodes.
actionPerformed(java.awt.event.ActionEvent)| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||