org.ceryle.graph.tm
Class RNode

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.RNode
All Implemented Interfaces:
Comparable

public class RNode
extends TMNode

An extension of TMNode acting as a Role Node (or R-Node) in a topic map graph. If a value is set by setEdge(GraphEdge), the RNode will be attached to the midpoint of the edge, and alter its length accordingly.

Since:
JDK1.3
Version:
$Id: RNode.java,v 3.8 2007-06-15 12:09:26 altheim Exp $
Author:
Murray Altheim

Field Summary
static Color COLOR_ROLE_NODE
          The color of role nodes.
static Color COLOR_ROLE_NODE_FIXED
          The color of fixed role nodes.
static Color COLOR_ROLE_NODE_MOUSE_OVER
          The color of mouse over'd role nodes.
static Color COLOR_ROLE_NODE_TEXT
          The color of the text of role nodes.
static Color COLOR_ROLE_NODE_TEXT_MOUSE_OVER
          The color of the text of mouse over'd role nodes.
 GraphEdge edge
           
 
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
RNode(String id)
          Constructor with the required ID id value.
RNode(String id, String label)
          Constructor with the required ID id and label.
RNode(Topic role, GraphEdge edge, String id, String label)
          Constructor with an Topic object role and Strings for ID id and label, as well as the anchor GraphEdge edge.
RNode(Topic role, String id)
          Constructor with an Topic role and a String ID id.
RNode(Topic role, String id, String label)
          Constructor with an Topic object role and Strings for ID id and label.
 
Method Summary
 Color getPaintBackColor(TGPanel tgPanel)
          Overrides GraphNode's method by highlighting mouseOvers.
 void paintNodeBody(Graphics g, TGPanel tgPanel)
          Overrides Node's method, painting the background of the node, along with its label.
 void setEdge(GraphEdge edge)
          Set this RNode's GraphEdge to edge.
 
Methods inherited from class org.ceryle.graph.tm.TMNode
getTopicMapObject, setFixed, setTopicMapObject
 
Methods inherited from class org.ceryle.graph.GraphNode
compareTo, getDefaultNodeFont, getHeight, getHilight, getID, getLabel, getMouseListener, getNodeFont, getPaintBorderColor, getVerticalTweak, getVerticalTweak, getWidth, isHidden, isProvisional, jubble, paint, paintProvisional, paintSimple, paintSmallTag, setAlternateFont, setHidden, setHilight, setMargin, setMaximumLabelLength, setMouseListener, setNodeTagFont, setNodeTextFont, setProvisional, setSize, setVerticalTweak, toString
 
Methods inherited from class com.touchgraph.graphlayout.Node
addEdge, containsPoint, containsPoint, deleteEdges, edgeAt, edgeCount, edgeNum, getBackColor, getEdges, getFixed, getFont, getLocation, getPaintTextColor, getTextColor, getType, hasEdge, intersects, isFixed, isVisible, removeEdge, setBackColor, setFixed, 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

COLOR_ROLE_NODE

public static Color COLOR_ROLE_NODE
The color of role nodes. Ceryle property: http://purl.org/ceryle/prop/#graph-color-roleNode.


COLOR_ROLE_NODE_MOUSE_OVER

public static Color COLOR_ROLE_NODE_MOUSE_OVER
The color of mouse over'd role nodes. Ceryle property: http://purl.org/ceryle/prop/#graph-color-roleNodeMouseOver.


COLOR_ROLE_NODE_FIXED

public static Color COLOR_ROLE_NODE_FIXED
The color of fixed role nodes. Ceryle property: http://purl.org/ceryle/prop/#graph-color-roleNodeFixed.


COLOR_ROLE_NODE_TEXT

public static Color COLOR_ROLE_NODE_TEXT
The color of the text of role nodes. Ceryle property: http://purl.org/ceryle/prop/#graph-color-roleNodeText.


COLOR_ROLE_NODE_TEXT_MOUSE_OVER

public static Color COLOR_ROLE_NODE_TEXT_MOUSE_OVER
The color of the text of mouse over'd role nodes. Ceryle property: http://purl.org/ceryle/prop/#graph-color-roleNodeTextMouseOver.


edge

public GraphEdge edge
Constructor Detail

RNode

public RNode(String id)
      throws GraphException
Constructor with the required ID id value. With no edge specified, this floats free.

Throws:
GraphException

RNode

public RNode(String id,
             String label)
      throws GraphException
Constructor with the required ID id and label. With no edge specified, this floats free.

Throws:
GraphException

RNode

public RNode(Topic role,
             String id)
      throws GraphException
Constructor with an Topic role and a String ID id. With no edge specified, this floats free.

Throws:
GraphException

RNode

public RNode(Topic role,
             String id,
             String label)
      throws GraphException
Constructor with an Topic object role and Strings for ID id and label. With no edge specified, this floats free.

Throws:
GraphException

RNode

public RNode(Topic role,
             GraphEdge edge,
             String id,
             String label)
      throws GraphException
Constructor with an Topic object role and Strings for ID id and label, as well as the anchor GraphEdge edge. It should be noted that the Topic ID is not used, and does not correspond with the ID used for the RNode since the Topic already may have a corresponding TNode. With no edge specified, this floats free.

Throws:
GraphException
Method Detail

setEdge

public void setEdge(GraphEdge edge)
Set this RNode's GraphEdge to edge.


getPaintBackColor

public Color getPaintBackColor(TGPanel tgPanel)
Overrides GraphNode's method by highlighting mouseOvers.

Overrides:
getPaintBackColor in class GraphNode

paintNodeBody

public void paintNodeBody(Graphics g,
                          TGPanel tgPanel)
Overrides Node's method, painting the background of the node, along with its label.

Overrides:
paintNodeBody in class GraphNode


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