Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nwoods.jgo.layout
Class JGoNetworkLink

    java.lang.Object
      com.nwoods.jgo.layout.JGoNetworkLink

public class JGoNetworkLink
extends java.lang.Object

JGoNetworkLink provides an abstract view of a JGoLink as a link in a network (graph) of nodes and directed links. Links can also be created which do not correspond to any top-level JGoLink in a JGoDocument. The JGoNetworkLink class provides a framework for manipulating the state of links without corrupting the JGoDocument objects.

See Also:
  `JGoNetwork`, `JGoNetworkNode`

Constructor Summary
`JGoNetworkLink()` Constructs a JGoNetworkLink with null values.
`JGoNetworkLink(JGoNetwork network, JGoObject object, JGoNetworkNode pFromNode, JGoNetworkNode pToNode)` Constructs a JGoNetworkLink with JGoNetwork network, JGoObject object, myFromNode pFromNode, and myToNode of pToNode.

Method Summary
`void` | `commitPosition()` Commits the position of the link to the corresponding JGoObject.
`JGoNetworkNode` | `getFromNode()` Returns the JGoNetworkNode from which the link is directed.
`JGoObject` | `getJGoObject()` Returns the JGoObject to which the link corresponds.
`JGoAutoLayoutLinkData` | `getLinkData()` Gets the link's layout-specific linkData.
`java.lang.Object` | `getLinkUserData()` Gets the link's linkUserData.
`JGoNetwork` | `getNetwork()` Returns the JGoNetwork that this network link is part of.
`JGoNetworkNode` | `getToNode()` Returns the JGoNetworkNode to which the link is directed.
`void` | `reverseLink()` Reverses the link; i.e., reverses the from and to nodes.
`void` | `setFromNode(JGoNetworkNode node)` Change the FromNode, a JGoNetworkNode that this link establishes as a predecessor to the ToNode.
`void` | `setJGoObject(JGoObject obj)` Change the JGoObject (normally a JGoLink) that this JGoNetworkLink is associated with.
`void` | `setLinkData(JGoAutoLayoutLinkData data)` Sets the link's layout-specific linkData to data.
`void` | `setLinkUserData(java.lang.Object obj)` Sets the link's linkUserData to obj.
`void` | `setNetwork(JGoNetwork net)` Set the "back-pointer" to the owning JGoNetwork.
`void` | `setToNode(JGoNetworkNode node)` Change the ToNode, a JGoNetworkNode that this link establishes as a successor to the FromNode.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JGoNetworkLink

    public JGoNetworkLink()

  Constructs a JGoNetworkLink with null values.

### JGoNetworkLink

    public JGoNetworkLink(JGoNetwork network,
                          JGoObject object,
                          JGoNetworkNode pFromNode,
                          JGoNetworkNode pToNode)

  Constructs a JGoNetworkLink with JGoNetwork network, JGoObject object, myFromNode pFromNode, and myToNode of pToNode.

Parameters:
  `network` - the JGoNetwork to which link node will belong
  `object` - the JGoObject to which the link will correspond (usually a CGoLink)
  `pFromNode` - the JGoNetworkNode from which the link will be directed
  `pToNode` - the JGoNetworkNode to which the link will be directed

Method Detail

### getNetwork

    public JGoNetwork getNetwork()

  Returns the JGoNetwork that this network link is part of.

### setNetwork

    public void setNetwork(JGoNetwork net)

  Set the "back-pointer" to the owning JGoNetwork.

### getJGoObject

    public JGoObject getJGoObject()

  Returns the JGoObject to which the link corresponds.

### setJGoObject

    public void setJGoObject(JGoObject obj)

  Change the JGoObject (normally a JGoLink) that this JGoNetworkLink is associated with.

### getFromNode

    public JGoNetworkNode getFromNode()

  Returns the JGoNetworkNode from which the link is directed.

### setFromNode

    public void setFromNode(JGoNetworkNode node)

  Change the FromNode, a JGoNetworkNode that this link establishes as a predecessor to the ToNode.

### getToNode

    public JGoNetworkNode getToNode()

  Returns the JGoNetworkNode to which the link is directed.

### setToNode

    public void setToNode(JGoNetworkNode node)

  Change the ToNode, a JGoNetworkNode that this link establishes as a successor to the FromNode.

### reverseLink

    public void reverseLink()

  Reverses the link; i.e., reverses the from and to nodes. This does not update either the FromNode or the ToNode, but is called by JGoNetwork.reverseLink.

### commitPosition

    public void commitPosition()

  Commits the position of the link to the corresponding JGoObject. Currently, this only causes a JGoLabeledLink to reposition its labels.

### getLinkData

    public JGoAutoLayoutLinkData getLinkData()

  Gets the link's layout-specific linkData.

### setLinkData

    public void setLinkData(JGoAutoLayoutLinkData data)

  Sets the link's layout-specific linkData to data.

### getLinkUserData

    public java.lang.Object getLinkUserData()

  Gets the link's linkUserData. Note: linkUserData is not used by any of the auto-layout routines. It is meant to contain customizable data associated with a link.

### setLinkUserData

    public void setLinkUserData(java.lang.Object obj)

  Sets the link's linkUserData to obj. Note: linkUserData is not used by any of the auto-layout routines. It is meant to contain customizable data associated with a link.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD