org.datamanager.simpleton
Class TouchgraphEntityNode

java.lang.Object
  |
  +--com.touchgraph.graphlayout.Node
        |
        +--org.datamanager.simpleton.TouchgraphEntityNode

public class TouchgraphEntityNode
extends com.touchgraph.graphlayout.Node

TouchgraphEntityNode is a touchgraph node representing an Entity. This code is based on the WikiNode from the Touchgraph WikiBrowser. The Node label is the Subject of the mail message. TouchgraphEntityNodes have dynamic color and size. The color is an indicator of how old the message the node represents is compared to the current time. The size is inversely proportional to the number of Nodes currently being shown. FIXME: that size thing is sort of meaningless chrome.

See Also:
Serialized Form

Constructor Summary
TouchgraphEntityNode(Entity entity)
           
 
Method Summary
 Entity getEntity()
          Retrieves the Entity represented by this node.
 int getHeight()
          Returns the height of the node.
 int getWidth()
          Returns the width of the node.
 void paint(Graphics g, TGPanel tgPanel)
          Paints the Node.
 void paintNodeBody(Graphics g, TGPanel tgPanel)
          Paints the background of the Node.
 void setEntity(Entity entity)
          Sets the Entity represented by this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TouchgraphEntityNode

public TouchgraphEntityNode(Entity entity)
                     throws DataManagerException
Method Detail

setEntity

public void setEntity(Entity entity)
Sets the Entity represented by this node.


getEntity

public Entity getEntity()
Retrieves the Entity represented by this node.


paint

public void paint(Graphics g,
                  TGPanel tgPanel)
Paints the Node. If the node has attached edges that are hidden, a small label of the number of hidden edges is displayed.


paintNodeBody

public void paintNodeBody(Graphics g,
                          TGPanel tgPanel)
Paints the background of the Node.


getHeight

public int getHeight()
Returns the height of the node. This is required by the interface to support things like mouseOver.


getWidth

public int getWidth()
Returns the width of the node. This is required by the interface to support things like mouseOver.



See the Helium Website