|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ciips.animation.tree.BasicNode | +--ciips.animation.tree.MultiNode
Field Summary | |
protected java.awt.Color |
active
|
protected MultiNode[] |
child
|
protected java.awt.Dimension |
diameter
|
protected java.awt.Color |
inactive
|
protected java.awt.Color |
labelColor
|
protected int |
max_children
|
Fields inherited from class ciips.animation.tree.BasicNode |
depth, diff_x, diff_y, highlight, highlightNode, label, node_dim, nodeColor, weight, x, y |
Constructor Summary | |
MultiNode()
Create a new leaf node with multiple children. |
|
MultiNode(java.lang.Object weight,
int max_children)
Create a new leaf node with multiple children with the weight and number of children as specified by the parameter |
Method Summary | |
void |
append(MultiNode b)
Adds a new node |
void |
displace(int dx,
int dy)
Move the tree starting with node dx pixels to the right and dy pixels down. |
void |
draw(java.awt.Graphics g,
MultiNode sentinel)
Draws the corresponding node and the edge to the child nodes |
void |
drawEdge(java.awt.Graphics g,
MultiNode child)
Draw the edge from node to children |
void |
drawSubTree(java.awt.Graphics g)
Draw a node and its subtree |
int |
getChildCount()
|
MultiNode |
getTreeNode(int index)
Get a specific node .. |
boolean |
isLeaf()
Check if this node is a leaf node. |
void |
move(int x,
int y)
Move the node and all its branches based on the parameters. |
void |
setChildCount()
|
void |
setPosition(int x,
int y,
int width,
int height)
Start at a node and set the positions for the sub-tree elements dx is the distance between two child nodes in x direction dy is the distance between the parent and the child node in y direction |
void |
setTreeNode(MultiNode node,
int index)
Substitute the setLeft and setRight method |
Methods inherited from class ciips.animation.tree.BasicNode |
draw, getData, getDepth, getHighlight, getLabel, getX, getY, initColors, initFonts, setColour, setDepth, setHighlight, setLabel, setLabelColour, setWeight, setX, setXY, setY, unHighlight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected MultiNode[] child
protected int max_children
protected java.awt.Color active
protected java.awt.Color inactive
protected java.awt.Color labelColor
protected java.awt.Dimension diameter
Constructor Detail |
public MultiNode()
public MultiNode(java.lang.Object weight, int max_children)
Method Detail |
public void append(MultiNode b) throws OverflowException
public int getChildCount()
public void setChildCount()
public void setPosition(int x, int y, int width, int height)
setPosition
in class BasicNode
public void drawEdge(java.awt.Graphics g, MultiNode child)
public void draw(java.awt.Graphics g, MultiNode sentinel)
public void move(int x, int y)
move
in class BasicNode
x
- The horizontal destination position of this node.y
- The vertical destination position of this node.public void displace(int dx, int dy)
displace
in class BasicNode
node
- The root node of the tree to be moved.dx
- The change in x direction.dy
- The change in y direction.public void drawSubTree(java.awt.Graphics g)
public void setTreeNode(MultiNode node, int index) throws OverflowException
public MultiNode getTreeNode(int index)
public boolean isLeaf()
isLeaf
in class BasicNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |