tom.fishEye
Class FishNode

java.lang.Object
  |
  +--tom.util.Node
        |
        +--tom.fishEye.FishNode

public class FishNode
extends tom.util.Node
implements tom.fishEye.util.Comparator, com.sun.java.swing.tree.MutableTreeNode

An element of the fishEye. Implement the Mutable TreeNode to be coherent with the swing tree model


Field Summary
 int distance
           
 
Fields inherited from class tom.util.Node
attributes, CHILD, LAST, NEXT
 
Constructor Summary
FishNode(java.lang.String inName, FishNode parent)
           
FishNode(java.lang.String idKey, java.util.Hashtable attributes, java.util.Vector sortKeys, FishNode parent, int distance)
           
 
Method Summary
 java.util.Enumeration children()
           
 int compare(java.lang.Object obj1, java.lang.Object obj2)
           
 int countAllNodes()
           
 int countLeafNodes()
           
 void draw(tom.fishEye.hyperbolic.Graphics2D g2, FishNodeRender render, FishEye theEye)
           
 boolean getAllowsChildren()
           
 com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
          Return the number of childs of this node
 tom.fishEye.hyperbolic.HCircle getHCircle()
           
 int getIndex(com.sun.java.swing.tree.TreeNode node)
           
 int getMaxDistance()
           
 java.lang.String getName()
           
 void getNodes(int d, java.util.Vector nodes)
           
 void getNodes2(int dist, java.util.Vector nodes)
           
 com.sun.java.swing.tree.TreeNode getParent()
          return parent
 void insert(com.sun.java.swing.tree.MutableTreeNode child, int index)
          insert a child at the indexed position.Call setParent on child.
 boolean isLeaf()
          Return true if this node is a leaf...
 void reflect(tom.fishEye.hyperbolic.Arc arc)
           
 void remove(int index)
          Remove an element...
 void remove(com.sun.java.swing.tree.MutableTreeNode node)
           
 void removeAllChildrens()
          Remove ALL the childrens of this node
 void removeFromParent()
           
 void rotate(tom.fishEye.hyperbolic.Complex t)
           
 void rotateSelf(tom.fishEye.hyperbolic.Complex t)
           
 void setHCircle(tom.fishEye.hyperbolic.Complex centre, double radius, java.awt.Color color)
           
 void setParent(com.sun.java.swing.tree.MutableTreeNode newParent)
           
 void setUserObject(java.lang.Object object)
           
 java.lang.String toString()
           
 java.lang.String toStringLong()
           
 java.lang.String toStringShort()
           
 void translate(tom.fishEye.hyperbolic.Complex t)
           
 
Methods inherited from class tom.util.Node
addChild, getAttr, getAttributes, getChilds, getDistance, getKey, main, readFromFile, readFromStream, readFromString, setAttr, setDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

distance

public int distance
Constructor Detail

FishNode

public FishNode(java.lang.String idKey,
                java.util.Hashtable attributes,
                java.util.Vector sortKeys,
                FishNode parent,
                int distance)

FishNode

public FishNode(java.lang.String inName,
                FishNode parent)
Method Detail

children

public java.util.Enumeration children()

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Specified by:
compare in interface tom.fishEye.util.Comparator

countAllNodes

public int countAllNodes()

countLeafNodes

public int countLeafNodes()

draw

public void draw(tom.fishEye.hyperbolic.Graphics2D g2,
                 FishNodeRender render,
                 FishEye theEye)

getAllowsChildren

public boolean getAllowsChildren()

getChildAt

public com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)

getChildCount

public int getChildCount()
Return the number of childs of this node

getHCircle

public tom.fishEye.hyperbolic.HCircle getHCircle()

getIndex

public int getIndex(com.sun.java.swing.tree.TreeNode node)

getMaxDistance

public int getMaxDistance()

getName

public java.lang.String getName()

getNodes

public void getNodes(int d,
                     java.util.Vector nodes)

getNodes2

public void getNodes2(int dist,
                      java.util.Vector nodes)

getParent

public com.sun.java.swing.tree.TreeNode getParent()
return parent

insert

public void insert(com.sun.java.swing.tree.MutableTreeNode child,
                   int index)
insert a child at the indexed position.Call setParent on child.
Specified by:
insert in interface com.sun.java.swing.tree.MutableTreeNode

isLeaf

public boolean isLeaf()
Return true if this node is a leaf...

reflect

public void reflect(tom.fishEye.hyperbolic.Arc arc)

remove

public void remove(int index)
Remove an element...
Specified by:
remove in interface com.sun.java.swing.tree.MutableTreeNode

remove

public void remove(com.sun.java.swing.tree.MutableTreeNode node)
Specified by:
remove in interface com.sun.java.swing.tree.MutableTreeNode

removeAllChildrens

public void removeAllChildrens()
Remove ALL the childrens of this node

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface com.sun.java.swing.tree.MutableTreeNode

rotate

public void rotate(tom.fishEye.hyperbolic.Complex t)

rotateSelf

public void rotateSelf(tom.fishEye.hyperbolic.Complex t)

setHCircle

public void setHCircle(tom.fishEye.hyperbolic.Complex centre,
                       double radius,
                       java.awt.Color color)

setParent

public void setParent(com.sun.java.swing.tree.MutableTreeNode newParent)
Specified by:
setParent in interface com.sun.java.swing.tree.MutableTreeNode

setUserObject

public void setUserObject(java.lang.Object object)
Specified by:
setUserObject in interface com.sun.java.swing.tree.MutableTreeNode

toString

public java.lang.String toString()
Overrides:
toString in class tom.util.Node

toStringLong

public java.lang.String toStringLong()

toStringShort

public java.lang.String toStringShort()

translate

public void translate(tom.fishEye.hyperbolic.Complex t)