org.ceryle.graph.tm
Class TMNode
java.lang.Object
com.touchgraph.graphlayout.Node
org.ceryle.graph.GraphNode
org.ceryle.graph.tm.TMNode
- All Implemented Interfaces:
- Comparable
- Direct Known Subclasses:
- ANode, ONode, RNode, SNode, TNode
public class TMNode
- extends GraphNode
- implements Comparable
An extension of org.ceryle.graph.GraphNode acting as a graph node
for display of a topic map graph.
This is subclassed as TNode (for topics), ANode (for associations),
SNode (for scopes), and RNode (for association roles).
Please note that in the changes between 0.8.x and 0.9.x of TM4J the
way that Scopes are represented has changed, which has changed hte
way SNodes work SNode.
- Since:
- JDK1.3
- Version:
- $Id: TMNode.java,v 3.2 2007-06-15 12:09:26 altheim Exp $
- Author:
- Murray Altheim
- See Also:
GraphNode,
TNode,
ANode,
SNode,
RNode
| 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 |
TMNode(TopicMapObject object,
int type,
String id,
String label,
Color color)
Constructor with Strings for ID id and label,
using defaults for type (rectangle) and color (a static variable
from TGPanel). |
| Methods inherited from class org.ceryle.graph.GraphNode |
compareTo, getDefaultNodeFont, getHeight, getHilight, getID, getLabel, getMouseListener, getNodeFont, getPaintBackColor, getPaintBorderColor, getVerticalTweak, getVerticalTweak, getWidth, isHidden, isProvisional, jubble, paint, paintNodeBody, 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 |
TMNode
public TMNode(TopicMapObject object,
int type,
String id,
String label,
Color color)
throws GraphException
- Constructor with Strings for ID id and label,
using defaults for type (rectangle) and color (a static variable
from TGPanel). If the label is null, it will be taken from the ID value.
- Throws:
GraphException
setTopicMapObject
public void setTopicMapObject(TopicMapObject object)
- Sets the TopicMapObject reference within this TMNode to
the TopicMapObject object. This can be set to null.
getTopicMapObject
public TopicMapObject getTopicMapObject()
- Returns the TopicMapObject reference within this TMNode.
setFixed
public void setFixed(boolean fixed,
Point p)
- Sets the fixed status of this TMNode to the boolean fixed,
fixing it at the provided Point p. If p is null, the
Node is fixed at its current location.
If the Node has no embedded Topic, its location (and indeed, it) will not
be stored on export.
- Overrides:
setFixed in class GraphNode
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.