net.ontopia.topicmaps.viz
Class TMTopicNode

java.lang.Object
  extended by com.touchgraph.graphlayout.Node
      extended by net.ontopia.topicmaps.viz.TMAbstractNode
          extended by net.ontopia.topicmaps.viz.TMTopicNode
All Implemented Interfaces:
Recoverable

public class TMTopicNode
extends TMAbstractNode

INTERNAL: Node class representing topics.


Field Summary
static int DEFAULT_SHAPE_PADDING
           
protected  boolean forceColor
           
static int MAX_SHAPE_PADDING
           
 
Fields inherited from class net.ontopia.topicmaps.viz.TMAbstractNode
icon, topicMapView, underMouse
 
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, fixed, font, fontMetrics, justMadeLocal, lbl, markedForRemoval, repulsion, SMALL_TAG_FONT, TEXT_COLOR, TEXT_FONT, textColor, typ, TYPE_CIRCLE, TYPE_ELLIPSE, TYPE_RECTANGLE, TYPE_ROUNDRECT, visible, visibleEdgeCnt, x, y
 
Constructor Summary
TMTopicNode(TopicIF topic, TopicIF scopingTopic, TopicMapView topicMapView)
           
 
Method Summary
 boolean containsPoint(double aPx, double aPy)
           
protected  void drawMissingEdgesIndicator(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 RecoveryObjectIF getDesctructor()
           
 int getHeight()
           
 java.awt.Color getPaintBackColor(com.touchgraph.graphlayout.TGPanel tgPanel)
          This method enables TMTopicNode to force a particular color upon a given node, even if it is the focus node.
 RecoveryObjectIF getRecreator()
           
 int getShapePadding()
           
 StringifierIF getStringifier()
           
 TopicIF getTopic()
           
 java.lang.String getTopicName()
           
 int getWidth()
           
 void miniPaint(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void paint(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
          Repaints the name.
 void repaint(java.awt.Color aColor, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void repaint(java.awt.Color aColor, com.touchgraph.graphlayout.TGPanel tgPanel, boolean forceColor)
           
 void setAssociationCount(int count)
           
 void setLabel(java.lang.String name)
           
 void setScopingTopic(TopicIF aScopingTopic)
           
 void setShapePadding(int value)
           
 void updateLabel()
           
 
Methods inherited from class net.ontopia.topicmaps.viz.TMAbstractNode
drawNeighboursInForeground, getEdges, getIcon, getPaintBorderColor, getPaintTextColor, getVisibleEdges, getVisibleEdgesList, hasPathTo, removeMouseoverIcon, setBackColor, setIcon, setUnderMouse, setUnderMouseForced, setVisible, textColourForBackground
 
Methods inherited from class com.touchgraph.graphlayout.Node
addEdge, containsPoint, edgeAt, edgeCount, edgeNum, getBackColor, getFixed, getFont, getID, getLabel, getLocation, getTextColor, getType, intersects, isVisible, paintNodeBody, paintSmallTag, removeEdge, setFixed, setFont, setID, setLocation, setNodeBackDefaultColor, setNodeBackFixedColor, setNodeBackHilightColor, setNodeBackSelectColor, setNodeBorderDragColor, setNodeBorderInactiveColor, setNodeBorderMouseOverColor, setNodeTextColor, setNodeTextFont, setNodeType, setTextColor, setType, visibleEdgeCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

forceColor

protected boolean forceColor

DEFAULT_SHAPE_PADDING

public static int DEFAULT_SHAPE_PADDING

MAX_SHAPE_PADDING

public static int MAX_SHAPE_PADDING
Constructor Detail

TMTopicNode

public TMTopicNode(TopicIF topic,
                   TopicIF scopingTopic,
                   TopicMapView topicMapView)
Method Detail

updateLabel

public void updateLabel()

setScopingTopic

public void setScopingTopic(TopicIF aScopingTopic)

getTopicName

public java.lang.String getTopicName()

paint

public void paint(java.awt.Graphics g,
                  com.touchgraph.graphlayout.TGPanel tgPanel)
Repaints the name. Some topic names are shortened when initially displayed. When the user moves the mouse over the node the full name is displayed.

Overrides:
paint in class com.touchgraph.graphlayout.Node

miniPaint

public void miniPaint(java.awt.Graphics g,
                      com.touchgraph.graphlayout.TGPanel tgPanel)

drawMissingEdgesIndicator

protected void drawMissingEdgesIndicator(java.awt.Graphics g,
                                         com.touchgraph.graphlayout.TGPanel tgPanel)

setLabel

public void setLabel(java.lang.String name)
Overrides:
setLabel in class com.touchgraph.graphlayout.Node

getTopic

public TopicIF getTopic()

setShapePadding

public void setShapePadding(int value)

getShapePadding

public int getShapePadding()

getWidth

public int getWidth()
Overrides:
getWidth in class com.touchgraph.graphlayout.Node

getHeight

public int getHeight()
Overrides:
getHeight in class com.touchgraph.graphlayout.Node

getPaintBackColor

public java.awt.Color getPaintBackColor(com.touchgraph.graphlayout.TGPanel tgPanel)
This method enables TMTopicNode to force a particular color upon a given node, even if it is the focus node. This was necessary because blinking didn't work on the focus node.

Overrides:
getPaintBackColor in class TMAbstractNode

repaint

public void repaint(java.awt.Color aColor,
                    com.touchgraph.graphlayout.TGPanel tgPanel)

repaint

public void repaint(java.awt.Color aColor,
                    com.touchgraph.graphlayout.TGPanel tgPanel,
                    boolean forceColor)

setAssociationCount

public void setAssociationCount(int count)

containsPoint

public boolean containsPoint(double aPx,
                             double aPy)
Overrides:
containsPoint in class com.touchgraph.graphlayout.Node

getStringifier

public StringifierIF getStringifier()

getDesctructor

public RecoveryObjectIF getDesctructor()

getRecreator

public RecoveryObjectIF getRecreator()


Copyright © 2000-2012 Ontopia.