net.ontopia.topicmaps.viz
Class TMAssociationNode

java.lang.Object
  extended by com.touchgraph.graphlayout.Node
      extended by net.ontopia.topicmaps.viz.TMAbstractNode
          extended by net.ontopia.topicmaps.viz.TMAssociationNode
All Implemented Interfaces:
com.touchgraph.graphlayout.TGPaintListener, java.util.EventListener, Recoverable, VizTMAssociationIF, VizTMObjectIF

public class TMAssociationNode
extends TMAbstractNode
implements VizTMObjectIF, VizTMAssociationIF, com.touchgraph.graphlayout.TGPaintListener

INTERNAL: Node class representing n-ary associations as nodes.


Field Summary
 
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
TMAssociationNode(AssociationIF assoc, TopicIF aScopingTopic, TopicMapView topicMapView)
           
 
Method Summary
 void addTo(com.touchgraph.graphlayout.TGPanel tgpanel)
           
 void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
           
protected  void drawMissingEdgesIndicator(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 AssociationIF getAssociation()
           
protected static java.lang.String getAssociationText(AssociationIF association, boolean displScopedAssocNames, TopicIF scopingTopic)
           
 RecoveryObjectIF getDesctructor()
           
 int getEdgeCount()
           
 int getLineWeight()
           
 java.lang.String getMainText()
           
 RecoveryObjectIF getRecreator()
           
 java.util.List getTargetsFrom(com.touchgraph.graphlayout.Node find)
           
 TopicIF getTopicMapType()
           
 int getWidth()
           
 boolean isAssociation()
           
 boolean isEdge()
           
 void miniPaint(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void paint(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void paintAfterEdges(java.awt.Graphics g)
           
 void paintFirst(java.awt.Graphics g)
           
 void paintLast(java.awt.Graphics g)
          This is our hover help support.
 boolean represents(java.lang.Object object)
           
 void setColor(java.awt.Color color)
           
 void setEdgeCount(int visibleEdgeCount)
           
 void setLineWeight(int lineWeight)
           
 void setRoleCount(int count)
           
 void setScopingTopic(TopicIF aTopic)
           
 void setShape(int shape)
           
 void setShouldDisplayScopedAssociationNames(boolean newValue)
           
 
Methods inherited from class net.ontopia.topicmaps.viz.TMAbstractNode
drawNeighboursInForeground, getEdges, getIcon, getPaintBackColor, getPaintBorderColor, getPaintTextColor, getVisibleEdges, getVisibleEdgesList, hasPathTo, removeMouseoverIcon, setBackColor, setIcon, setUnderMouse, setUnderMouseForced, setVisible, textColourForBackground
 
Methods inherited from class com.touchgraph.graphlayout.Node
addEdge, containsPoint, containsPoint, edgeAt, edgeCount, edgeNum, getBackColor, getFixed, getFont, getHeight, getID, getLabel, getLocation, getTextColor, getType, intersects, isVisible, 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.VizTMObjectIF
setFont, setIcon, setVisible
 

Constructor Detail

TMAssociationNode

public TMAssociationNode(AssociationIF assoc,
                         TopicIF aScopingTopic,
                         TopicMapView topicMapView)
Method Detail

getAssociationText

protected static java.lang.String getAssociationText(AssociationIF association,
                                                     boolean displScopedAssocNames,
                                                     TopicIF scopingTopic)

setEdgeCount

public void setEdgeCount(int visibleEdgeCount)

getEdgeCount

public int getEdgeCount()

setRoleCount

public void setRoleCount(int count)

drawMissingEdgesIndicator

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

addTo

public void addTo(com.touchgraph.graphlayout.TGPanel tgpanel)
Specified by:
addTo in interface VizTMObjectIF

deleteFrom

public void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
Specified by:
deleteFrom in interface VizTMObjectIF

getAssociation

public AssociationIF getAssociation()

getLineWeight

public int getLineWeight()

getMainText

public java.lang.String getMainText()

getTargetsFrom

public java.util.List getTargetsFrom(com.touchgraph.graphlayout.Node find)

getTopicMapType

public TopicIF getTopicMapType()
Specified by:
getTopicMapType in interface VizTMObjectIF

getWidth

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

isAssociation

public boolean isAssociation()
Specified by:
isAssociation in interface VizTMObjectIF

isEdge

public boolean isEdge()
Specified by:
isEdge in interface VizTMObjectIF

paint

public void paint(java.awt.Graphics g,
                  com.touchgraph.graphlayout.TGPanel tgPanel)
Overrides:
paint in class com.touchgraph.graphlayout.Node

miniPaint

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

paintAfterEdges

public void paintAfterEdges(java.awt.Graphics g)
Specified by:
paintAfterEdges in interface com.touchgraph.graphlayout.TGPaintListener

paintFirst

public void paintFirst(java.awt.Graphics g)
Specified by:
paintFirst in interface com.touchgraph.graphlayout.TGPaintListener

paintLast

public void paintLast(java.awt.Graphics g)
This is our hover help support. This method is called after all other painting has been completed, hence ensuring that ToolTips (HoverHelp) is always drawn ontop.

Specified by:
paintLast in interface com.touchgraph.graphlayout.TGPaintListener

represents

public boolean represents(java.lang.Object object)
Specified by:
represents in interface VizTMObjectIF

setColor

public void setColor(java.awt.Color color)
Specified by:
setColor in interface VizTMObjectIF

setLineWeight

public void setLineWeight(int lineWeight)
Specified by:
setLineWeight in interface VizTMObjectIF

setScopingTopic

public void setScopingTopic(TopicIF aTopic)
Specified by:
setScopingTopic in interface VizTMObjectIF

setShape

public void setShape(int shape)
Specified by:
setShape in interface VizTMObjectIF

setShouldDisplayScopedAssociationNames

public void setShouldDisplayScopedAssociationNames(boolean newValue)
Specified by:
setShouldDisplayScopedAssociationNames in interface VizTMAssociationIF

getDesctructor

public RecoveryObjectIF getDesctructor()
Specified by:
getDesctructor in interface Recoverable

getRecreator

public RecoveryObjectIF getRecreator()
Specified by:
getRecreator in interface Recoverable


Copyright © 2000-2012 Ontopia.