treebolic.model
Class TreeMutableNode

java.lang.Object
  extended by treebolic.model.NodeData
      extended by treebolic.model.XNodeData
          extended by treebolic.model.Node
              extended by treebolic.model.MutableNode
                  extended by treebolic.model.TreeMutableNode
All Implemented Interfaces:
INode
Direct Known Subclasses:
MutableGraphNode, Provider.MutableGraphNode

public class TreeMutableNode
extends MutableNode

Extended Mutable node (mutable tree links, copy constructor)

Author:
Bernard Bou

Field Summary
private static java.util.Random theRandomizer
          Randomize used to generate ids
 
Fields inherited from class treebolic.model.Node
theChildren, theParent
 
Fields inherited from class treebolic.model.XNodeData
theEdgeImage, theMountPoint
 
Fields inherited from class treebolic.model.NodeData
theBackColor, theContent, theEdgeColor, theEdgeImageFile, theEdgeLabel, theEdgeStyle, theForeColor, theId, theImageFile, theLabel, theLink, theTarget
 
Constructor Summary
TreeMutableNode(INode thatNode)
          Copy constructor (the resulting node node has no tree parent nor tree children)
TreeMutableNode(MutableNode thisParent, java.lang.String thisId)
          Constructor
 
Method Summary
 void addToParent(TreeMutableNode thisParent)
          Add to parent (handles down link and uplink)
static INode makeDefaultTree()
          Make default root node
static java.lang.String makeNodeId()
          Make node id
 void removeFromParent()
          Remove from parent (handles down link and uplink)
 void setChildren(java.util.List<INode> theseChildren)
          Set children
 void setId(java.lang.String thisId)
          Set id
 
Methods inherited from class treebolic.model.MutableNode
setBackColor, setContent, setEdgeColor, setEdgeImageFile, setEdgeLabel, setEdgeStyle, setForeColor, setImageFile, setLabel, setLink, setTarget
 
Methods inherited from class treebolic.model.Node
getChildren, getParent, setParent
 
Methods inherited from class treebolic.model.XNodeData
getChildrenWeight, getEdgeImage, getImage, getLocation, getMinWeight, getMountPoint, getWeight, setChildrenWeight, setEdgeImage, setImage, setMinWeight, setMountPoint, setWeight
 
Methods inherited from class treebolic.model.NodeData
getBackColor, getContent, getEdgeColor, getEdgeImageFile, getEdgeLabel, getEdgeStyle, getForeColor, getId, getImageFile, getLabel, getLink, getTarget, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface treebolic.model.INode
getBackColor, getChildrenWeight, getContent, getEdgeColor, getEdgeImage, getEdgeImageFile, getEdgeLabel, getEdgeStyle, getForeColor, getId, getImage, getImageFile, getLabel, getLink, getLocation, getMinWeight, getMountPoint, getTarget, getWeight, setChildrenWeight, setEdgeImage, setImage, setMinWeight, setMountPoint, setWeight
 

Field Detail

theRandomizer

private static java.util.Random theRandomizer
Randomize used to generate ids

Constructor Detail

TreeMutableNode

public TreeMutableNode(MutableNode thisParent,
                       java.lang.String thisId)
Constructor

Parameters:
thisParent - parent
thisId - id

TreeMutableNode

public TreeMutableNode(INode thatNode)
Copy constructor (the resulting node node has no tree parent nor tree children)

Parameters:
thatNode - node
Method Detail

makeNodeId

public static java.lang.String makeNodeId()
Make node id

Returns:
node id

setId

public void setId(java.lang.String thisId)
Set id

Parameters:
thisId - id

setChildren

public void setChildren(java.util.List<INode> theseChildren)
Set children

Parameters:
theseChildren - children

addToParent

public void addToParent(TreeMutableNode thisParent)
Add to parent (handles down link and uplink)


removeFromParent

public void removeFromParent()
Remove from parent (handles down link and uplink)


makeDefaultTree

public static INode makeDefaultTree()
Make default root node

Returns:
root node