org.ceryle.graph.tm
Class IVNode

java.lang.Object
  extended by com.touchgraph.graphlayout.Node
      extended by org.ceryle.graph.GraphNode
          extended by org.ceryle.graph.tm.TMNode
              extended by org.ceryle.graph.tm.TNode
                  extended by org.ceryle.graph.tm.IVNode
All Implemented Interfaces:
Comparable

public class IVNode
extends TNode
implements Comparable

Extends TNode as an alternative display mode for Topics. The name is a legacy of now-gone GraphView subclass and will be changed when this is re-integrated into the GraphView. This includes a target and rectangular boundary mode.

Since:
JDK1.4
Version:
$Id: IVNode.java,v 3.10 2007-06-15 12:09:26 altheim Exp $
Author:
Murray Altheim
See Also:
TNode

Field Summary
static Color COLOR_TRANSLUCENT
          The color white with a low alpha: translucency.
static Color COLOR_TRANSLUCENT_SELECT
          The color white with a low alpha: translucency.
static Color COLOR_TRANSPARENT
          The color white with a zero alpha: transparency.
static int TYPE_RECTOPIC
          This Node's type is a Rectangle Topic.
static int TYPE_TARGET
          This Node's type is a Target.
 
Fields inherited from class org.ceryle.graph.tm.TNode
b, COLOR_EARMARK, COLOR_EARMARK_B, COLOR_EARMARK_E, COLOR_NEEDLE, COLOR_OCCUR_COUNT, COLOR_TIMELINE, COLOR_TIMELINE_MASK, COLOR_TOPIC_BORDER, COLOR_TOPIC_BORDER_OUTLINE, COLOR_TOPIC_BORDER_SELECT, COLOR_TOPIC_BORDER_SELECT_MOUSE_OVER, COLOR_TOPIC_COMPONENT, COLOR_TOPIC_COMPONENT_B, COLOR_TOPIC_COMPONENT_D, COLOR_TOPIC_COMPONENT_MOUSE_OVER, COLOR_TOPIC_COMPONENT_SELECT, COLOR_TOPIC_COMPONENT_TEXT, COLOR_TOPIC_NODE, COLOR_TOPIC_NODE_B, COLOR_TOPIC_NODE_D, COLOR_TOPIC_NODE_FIXED, COLOR_TOPIC_NODE_MOUSE_OVER, COLOR_TOPIC_NODE_REM, COLOR_TOPIC_NODE_TEXT, COLOR_TOPIC_NODE_TIMELINE, COLOR_VERNIER_BASE, COLOR_VERNIER_DARK, COLOR_VERNIER_TINT, COLOR_VERNIER_WINDOW, COLOR_VERNIER_WINDOW_TINT, colorAsFlag, component, endDate, flag, flagHilight, ignoreMe, occurCount, paintOccurrences, pox, poy, score, startDate, textHeight, tl_h, tl_w
 
Fields inherited from class org.ceryle.graph.GraphNode
COLOR_BORDER_DRAG, COLOR_BORDER_FIXED, COLOR_BORDER_INACTIVE, COLOR_BORDER_MOUSE_OVER, COLOR_DEFAULT_NODE, COLOR_FIXED_NODE, COLOR_HILIGHTED_NODE, COLOR_NEW_LOCAL_NODE, COLOR_NODE_DOWNSTREAM, COLOR_NODE_REMOVAL, COLOR_NODE_TEXT, COLOR_NODE_UPSTREAM, COLOR_PROVISIONAL, COLOR_SELECT_NODE, COLOR_SELECT_NODE_B, COLOR_SELECT_NODE_D, COLOR_SMALL_TAG, COLOR_TRANSLUCENT_GRAY, defaultMargin, Ellipsis, fontMetrics, h, hidden, hilight, hMargin, m_listener, maxHeight, maxLabelLength, maxWidth, minHeight, minWidth, outlined, provisional, rel_angle, sortCaseSensitive, STROKE_OUTLINE, STROKE_PROVISIONAL, use3D, vMargin, w
 
Fields inherited from class com.touchgraph.graphlayout.Node
BACK_DEFAULT_COLOR, BACK_FIXED_COLOR, BACK_HILIGHT_COLOR, BACK_SELECT_COLOR, backColor, BORDER_DRAG_COLOR, BORDER_INACTIVE_COLOR, BORDER_MOUSE_OVER_COLOR, DEFAULT_TYPE, drawx, drawy, dx, dy, edges, fixed, font, justMadeLocal, lbl, markedForRemoval, massfade, repulsion, simpleDraw, SMALL_TAG_FONT, TEXT_COLOR, TEXT_FONT, textColor, typ, TYPE_CIRCLE, TYPE_ELLIPSE, TYPE_RECTANGLE, TYPE_ROUNDRECT, visible, visibleEdgeCnt, x, y
 
Constructor Summary
IVNode(String id)
          Constructor with the required ID id value.
IVNode(String id, String label)
          Constructor with the required ID id and label.
IVNode(Topic topic)
          Constructor with an Topic topic, using the Topic's ID value for both the IVNode's ID and label.
IVNode(Topic topic, String label)
          Constructor with an Topic topic, and a String used as its label.
IVNode(Topic topic, String id, String label)
          Constructor with an Topic topic and Strings for ID id and label.
 
Method Summary
 Color getNodeBodyColor(TGPanel tgPanel)
          Returns the body color of the node, dependent on context.
 Color getPaintBackColor(TGPanel tgPanel)
          Overrides TNode's method.
 Color getTargetBorderColor(TGPanel tgPanel)
          Returns the border color of the target, dependent on context.
protected  Point getTargetLocation()
          Returns the location of the target's center as a Point.
 int getWidth()
          Overrides GraphNode's method by returning the calculated width of this IVNode.
 void paintNodeBody(Graphics g, TGPanel tgPanel)
          Overrides TNode's method by painting the body of the IVNode.
protected  void setSize(Graphics g)
          Sets the internal width and height variables based on current properties.
 
Methods inherited from class org.ceryle.graph.tm.TNode
getBackColor, getFlag, getHeight, getLocator, getPaintBorderColor, getPaintTextColor, hasFlag, hasLocator, hasPopupMenu, isClickInMenu, isComponent, paint, paintColorFlag, paintLinkBody, paintOccurrenceCount, setAsComponent, setFixed, setFixed, setFlag, setLocator, setPopupMenu, setTopicMapObject, showPopupMenu
 
Methods inherited from class org.ceryle.graph.tm.TMNode
getTopicMapObject
 
Methods inherited from class org.ceryle.graph.GraphNode
compareTo, getDefaultNodeFont, getHilight, getID, getLabel, getMouseListener, getNodeFont, getVerticalTweak, getVerticalTweak, isHidden, isProvisional, jubble, paintProvisional, paintSimple, paintSmallTag, setAlternateFont, setHidden, setHilight, setMargin, setMaximumLabelLength, setMouseListener, setNodeTagFont, setNodeTextFont, setProvisional, setVerticalTweak, toString
 
Methods inherited from class com.touchgraph.graphlayout.Node
addEdge, containsPoint, containsPoint, deleteEdges, edgeAt, edgeCount, edgeNum, getEdges, getFixed, getFont, getLocation, getTextColor, getType, hasEdge, intersects, isFixed, isVisible, removeEdge, setBackColor, setFont, setID, setLabel, setLocation, setLocation, setNodeBackDefaultColor, setNodeBackFixedColor, setNodeBackHilightColor, setNodeBackSelectColor, setNodeBorderDragColor, setNodeBorderInactiveColor, setNodeBorderMouseOverColor, setNodeTextColor, setNodeType, setTextColor, setType, setVisible, visibleEdgeCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

TYPE_TARGET

public static final int TYPE_TARGET
This Node's type is a Target.

See Also:
Constant Field Values

TYPE_RECTOPIC

public static final int TYPE_RECTOPIC
This Node's type is a Rectangle Topic.

See Also:
Constant Field Values

COLOR_TRANSPARENT

public static final Color COLOR_TRANSPARENT
The color white with a zero alpha: transparency.


COLOR_TRANSLUCENT

public static final Color COLOR_TRANSLUCENT
The color white with a low alpha: translucency.


COLOR_TRANSLUCENT_SELECT

public static final Color COLOR_TRANSLUCENT_SELECT
The color white with a low alpha: translucency.

Constructor Detail

IVNode

public IVNode(String id)
       throws GraphException
Constructor with the required ID id value. If this IVNode is meant to correspond to an XTM topic, its ID should match the ID of the topic.

Throws:
GraphException

IVNode

public IVNode(String id,
              String label)
       throws GraphException
Constructor with the required ID id and label. If this IVNode is meant to correspond to an XTM topic, its ID should match the ID of the topic, though this is not enforced here.

Throws:
GraphException

IVNode

public IVNode(Topic topic)
       throws GraphException
Constructor with an Topic topic, using the Topic's ID value for both the IVNode's ID and label.

Throws:
GraphException

IVNode

public IVNode(Topic topic,
              String label)
       throws GraphException
Constructor with an Topic topic, and a String used as its label. The ID of the IVNode will be obtained from the Topic object.

Throws:
GraphException

IVNode

public IVNode(Topic topic,
              String id,
              String label)
       throws GraphException
Constructor with an Topic topic and Strings for ID id and label.

Throws:
GraphException
See Also:
Topic
Method Detail

getTargetLocation

protected Point getTargetLocation()
Returns the location of the target's center as a Point. Note that the node center and the target center are not the same. If the FontMetrics are unavailable, returns the superclass' getLocation() value.


setSize

protected void setSize(Graphics g)
Sets the internal width and height variables based on current properties.

Overrides:
setSize in class GraphNode

getWidth

public int getWidth()
Overrides GraphNode's method by returning the calculated width of this IVNode. This also sets bw, which sets the size of the target node area.

Overrides:
getWidth in class TNode

paintNodeBody

public void paintNodeBody(Graphics g,
                          TGPanel tgPanel)
Overrides TNode's method by painting the body of the IVNode.

Overrides:
paintNodeBody in class TNode

getTargetBorderColor

public Color getTargetBorderColor(TGPanel tgPanel)
Returns the border color of the target, dependent on context.


getNodeBodyColor

public Color getNodeBodyColor(TGPanel tgPanel)
Returns the body color of the node, dependent on context.


getPaintBackColor

public Color getPaintBackColor(TGPanel tgPanel)
Overrides TNode's method.

Overrides:
getPaintBackColor in class TNode


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.