|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nwoods.jgo.layout.JGoTreeNetwork
This provides an abstract view of a JGoObjectSimpleCollection as a network (graph) of nodes and directed links. These nodes and links correspond to JGoObjects provided in the collection. This class provides a framework for manipulating the state of nodes and links without modifying the structure of the original document.
| Constructor Summary | |
JGoTreeNetwork()
Constructs an empty network. |
|
JGoTreeNetwork(JGoObjectSimpleCollection collection)
Constructs a network from a collection of JGoObjects, by also calling AddNodesAndLinksFromCollection(collection, ture). |
|
| Method Summary | |
JGoTreeNetworkLink |
AddLink(JGoLink ilink)
This convenience method takes a JGoLink and returns a JGoTreeNetworkLink that has been added to this network. |
void |
AddLink(JGoTreeNetworkLink link)
Adds a JGoTreeNetworkLink to the JGoTreeNetwork. |
JGoTreeNetworkNode |
AddNode(JGoObject node)
This convenience method makes sure there is a JGoTreeNetworkNode in this network corresponding to a JGoObject |
void |
AddNode(JGoTreeNetworkNode node)
Adds a JGoTreeNetworkNode to the JGoTreeNetwork |
void |
AddNodesAndLinksFromCollection(JGoObjectSimpleCollection collection,
boolean onlytruenodes)
Adds the objects in a JGoObjectSimpleCollection to the network. |
JGoTreeNetworkLink |
CreateNetworkLink()
Allocate a new instance of JGoTreeNetworkLink |
JGoTreeNetworkNode |
CreateNetworkNode()
Allocate a new instance of JGoTreeNetworkNode |
void |
DeleteArtificialNodes()
Delete all nodes and links that have no JGoObject associated with them. |
void |
DeleteLink(JGoLink ilink)
This convenience method makes sure a JGoLink does not have a JGoTreeNetworkLink in this network. |
void |
DeleteLink(JGoTreeNetworkLink link)
Deletes the input link from the network. |
void |
DeleteNode(JGoObject node)
This convenience method removes any JGoTreeNetworkNode corresponding to a JGoObject |
void |
DeleteNode(JGoTreeNetworkNode node)
Deletes the input node from the network. |
void |
DeleteSelfLinks()
Deletes all links whose "to node" and "from node" are the same node. |
JGoTreeNetworkLink |
FindLink(JGoObject obj)
Returns the JGoTreeNetworkLink which was constructed for the JGoObject. |
JGoTreeNetworkNode |
FindNode(JGoObject obj)
Returns the JGoTreeNetworkNode which was constructed for the JGoObject. |
JGoTreeAutoLayout |
getLayout()
Gets the JGoTreeAutoLayout in which this network is being used. |
int |
getLinkCount()
Gets the number of Links in the Network. |
JGoLinkArrayList |
getLinks()
Get a JGoLinkArrayList of JGoTreeNetworkLinks |
int |
getNodeCount()
Gets the number of Nodes in the Network. |
JGoNodeArrayList |
getNodes()
Get a JGoNodeArrayList of JGoTreeNetworkNodes |
JGoObjectCollection |
GetNodesAndLinks(JGoObjectCollection coll)
Retrieve all the JGoObject nodes and links from the JGoTreeNetworkNodes and JGoTreeNetworkLinks that are in this network, but adding them to given coll. |
JGoTreeNetworkLink |
LinkNodes(JGoTreeNetworkNode fromNode,
JGoTreeNetworkNode toNode,
JGoObject obj)
Links two nodes already in the network and returns the created link. |
void |
RemoveAllNodesAndLinks()
Removes all nodes and links from the network, resulting in an empty network. |
void |
ReverseLink(JGoTreeNetworkLink link)
Reverses the direction of a link in the network. |
void |
setLayout(JGoTreeAutoLayout value)
Sets the JGoTreeAutoLayout in which this network is being used. |
java.util.ArrayList |
SplitIntoSubNetworks()
Modify this network by splitting i up into separate subnetworks. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JGoTreeNetwork()
public JGoTreeNetwork(JGoObjectSimpleCollection collection)
collection - the collection containing the JGoNodes to add to the network.| Method Detail |
public JGoTreeNetworkNode CreateNetworkNode()
public JGoTreeNetworkLink CreateNetworkLink()
public void AddNodesAndLinksFromCollection(JGoObjectSimpleCollection collection,
boolean onlytruenodes)
collection - onlytruenodes - if true, only those objects that are JGoNodes will have JGoTreeNetworkNodes created.public void RemoveAllNodesAndLinks()
public void AddNode(JGoTreeNetworkNode node)
node - public JGoTreeNetworkNode AddNode(JGoObject node)
public void DeleteNode(JGoTreeNetworkNode node)
node - public void DeleteNode(JGoObject node)
node - public JGoTreeNetworkNode FindNode(JGoObject obj)
obj -
public void AddLink(JGoTreeNetworkLink link)
link - public JGoTreeNetworkLink AddLink(JGoLink ilink)
ilink -
public void DeleteLink(JGoTreeNetworkLink link)
link - public void DeleteLink(JGoLink ilink)
ilink - public JGoTreeNetworkLink FindLink(JGoObject obj)
obj -
public JGoTreeNetworkLink LinkNodes(JGoTreeNetworkNode fromNode,
JGoTreeNetworkNode toNode,
JGoObject obj)
fromNode - toNode - obj -
public void ReverseLink(JGoTreeNetworkLink link)
link - public void DeleteSelfLinks()
public void DeleteArtificialNodes()
public java.util.ArrayList SplitIntoSubNetworks()
public JGoObjectCollection GetNodesAndLinks(JGoObjectCollection coll)
coll - a JGoObjectCollection; if null, the method allocates one.
public int getNodeCount()
public int getLinkCount()
public JGoTreeAutoLayout getLayout()
public JGoNodeArrayList getNodes()
public JGoLinkArrayList getLinks()
public void setLayout(JGoTreeAutoLayout value)
value -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||