net.ontopia.topicmaps.viz
Class TMAbstractNode

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

public abstract class TMAbstractNode
extends com.touchgraph.graphlayout.Node
implements Recoverable

INTERNAL: Common abstract superclass for all nodes representing Topic Maps constructs.


Field Summary
protected  javax.swing.Icon icon
           
protected  TopicMapView topicMapView
           
protected  boolean 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
TMAbstractNode(java.lang.String id)
           
 
Method Summary
protected  void drawNeighboursInForeground(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 java.util.Iterator getEdges()
           
 javax.swing.Icon getIcon()
           
 java.awt.Color getPaintBackColor(com.touchgraph.graphlayout.TGPanel tgPanel)
           
 java.awt.Color getPaintBorderColor(com.touchgraph.graphlayout.TGPanel tgPanel)
           
 java.awt.Color getPaintTextColor(com.touchgraph.graphlayout.TGPanel tgPanel)
          This is how TG gets the color it actually uses for the painting, which in our case may be different from the preset text color.
 java.util.Iterator getVisibleEdges()
           
 java.util.List getVisibleEdgesList()
           
 boolean hasPathTo(TMAbstractNode target, java.util.Set visited)
           
 void removeMouseoverIcon()
          Workaround that avoids mouseover icon hanging around after hiding node.
 void setBackColor(java.awt.Color bgColor)
          Set the node background color.
 void setIcon(javax.swing.Icon icon)
           
protected  void setUnderMouse(com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void setUnderMouseForced(boolean under)
           
 void setVisible(boolean visible)
          setVisible is not supported in Vizigator.
static java.awt.Color textColourForBackground(java.awt.Color c)
           
 
Methods inherited from class com.touchgraph.graphlayout.Node
addEdge, containsPoint, containsPoint, edgeAt, edgeCount, edgeNum, getBackColor, getFixed, getFont, getHeight, getID, getLabel, getLocation, getTextColor, getType, getWidth, intersects, isVisible, paint, paintNodeBody, paintSmallTag, removeEdge, setFixed, setFont, setID, setLabel, 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
 
Methods inherited from interface net.ontopia.topicmaps.viz.Recoverable
getDesctructor, getRecreator
 

Field Detail

icon

protected javax.swing.Icon icon

underMouse

protected boolean underMouse

topicMapView

protected TopicMapView topicMapView
Constructor Detail

TMAbstractNode

public TMAbstractNode(java.lang.String id)
Method Detail

setVisible

public final void setVisible(boolean visible)
setVisible is not supported in Vizigator.

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

removeMouseoverIcon

public void removeMouseoverIcon()
Workaround that avoids mouseover icon hanging around after hiding node.


textColourForBackground

public static java.awt.Color textColourForBackground(java.awt.Color c)

hasPathTo

public boolean hasPathTo(TMAbstractNode target,
                         java.util.Set visited)

getEdges

public java.util.Iterator getEdges()
Overrides:
getEdges in class com.touchgraph.graphlayout.Node
Returns:
An iterator on all the edges.

getVisibleEdges

public java.util.Iterator getVisibleEdges()
Returns:
An iterator on the edges that are currently visible.

getVisibleEdgesList

public java.util.List getVisibleEdgesList()
Returns:
A list of the edges that are currently visible.

setBackColor

public void setBackColor(java.awt.Color bgColor)
Set the node background color. Also applies a simple colour inversion algorithm on the text colour.

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

getIcon

public javax.swing.Icon getIcon()

setIcon

public void setIcon(javax.swing.Icon icon)

getPaintBorderColor

public java.awt.Color getPaintBorderColor(com.touchgraph.graphlayout.TGPanel tgPanel)
Overrides:
getPaintBorderColor in class com.touchgraph.graphlayout.Node

getPaintBackColor

public java.awt.Color getPaintBackColor(com.touchgraph.graphlayout.TGPanel tgPanel)
Overrides:
getPaintBackColor in class com.touchgraph.graphlayout.Node

drawNeighboursInForeground

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

getPaintTextColor

public java.awt.Color getPaintTextColor(com.touchgraph.graphlayout.TGPanel tgPanel)
This is how TG gets the color it actually uses for the painting, which in our case may be different from the preset text color.

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

setUnderMouse

protected void setUnderMouse(com.touchgraph.graphlayout.TGPanel tgPanel)

setUnderMouseForced

public void setUnderMouseForced(boolean under)


Copyright © 2000-2012 Ontopia.