de.cau.cs.kieler.klay.force.graph
Class FNode

java.lang.Object
  extended by de.cau.cs.kieler.core.properties.MapPropertyHolder
      extended by de.cau.cs.kieler.klay.force.graph.FParticle
          extended by de.cau.cs.kieler.klay.force.graph.FNode
All Implemented Interfaces:
IPropertyHolder

public class FNode
extends FParticle

A node in the force graph.

Rating red

Field Summary
 int id
          the identifier number.
 
Constructor Summary
FNode()
          Create a new node.
FNode(String label)
          Create a new node with given label.
FNode(String label, FNode theParent)
          Create a new node with given parent node.
 
Method Summary
 List<FNode> getChildren()
          Returns the list of children, creating it if necessary.
 int getDepth()
          Returns the depth of this node in the compound hierarchy.
 KVector getDisplacement()
          Returns the displacement vector.
 String getLabel()
          Returns the label text of this node.
 FNode getParent()
          Returns the parent node.
 boolean isCompound()
          Returns whether this node is a compound node.
 String toString()
          
 
Methods inherited from class de.cau.cs.kieler.klay.force.graph.FParticle
getPosition, getRadius, getSize
 
Methods inherited from class de.cau.cs.kieler.core.properties.MapPropertyHolder
checkProperties, copyProperties, getAllProperties, getProperty, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public int id
the identifier number.

Constructor Detail

FNode

public FNode()
Create a new node.


FNode

public FNode(String label)
Create a new node with given label.

Parameters:
label - the label text

FNode

public FNode(String label,
             FNode theParent)
Create a new node with given parent node.

Parameters:
label - the label text
theParent - the parent node
Method Detail

toString

public String toString()

Overrides:
toString in class Object

getDisplacement

public final KVector getDisplacement()
Returns the displacement vector.

Returns:
the displacement vector

isCompound

public boolean isCompound()
Returns whether this node is a compound node.

Returns:
true if compound

getLabel

public String getLabel()
Returns the label text of this node.

Returns:
the label

getParent

public FNode getParent()
Returns the parent node.

Returns:
the parent

getChildren

public List<FNode> getChildren()
Returns the list of children, creating it if necessary.

Returns:
the children

getDepth

public int getDepth()
Returns the depth of this node in the compound hierarchy.

Returns:
the depth