Package net.ontopia.topicmaps.viz
Class TMAssociationNode
- java.lang.Object
-
- com.touchgraph.graphlayout.Node
-
- net.ontopia.topicmaps.viz.TMAbstractNode
-
- net.ontopia.topicmaps.viz.TMAssociationNode
-
- All Implemented Interfaces:
com.touchgraph.graphlayout.TGPaintListener,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
Constructors Constructor Description TMAssociationNode(AssociationIF assoc, TopicIF aScopingTopic, TopicMapView topicMapView)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(com.touchgraph.graphlayout.TGPanel tgpanel)voiddeleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)protected voiddrawMissingEdgesIndicator(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)AssociationIFgetAssociation()protected static StringgetAssociationText(AssociationIF association, boolean displScopedAssocNames, TopicIF scopingTopic)RecoveryObjectIFgetDesctructor()intgetEdgeCount()intgetLineWeight()StringgetMainText()RecoveryObjectIFgetRecreator()ListgetTargetsFrom(com.touchgraph.graphlayout.Node find)TopicIFgetTopicMapType()intgetWidth()booleanisAssociation()booleanisEdge()voidminiPaint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)voidpaint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)voidpaintAfterEdges(Graphics g)voidpaintFirst(Graphics g)voidpaintLast(Graphics g)This is our hover help support.booleanrepresents(Object object)voidsetColor(Color color)voidsetEdgeCount(int visibleEdgeCount)voidsetLineWeight(int lineWeight)voidsetRoleCount(int count)voidsetScopingTopic(TopicIF aTopic)voidsetShape(int shape)voidsetShouldDisplayScopedAssociationNames(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 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(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
-
addTo
public void addTo(com.touchgraph.graphlayout.TGPanel tgpanel)
- Specified by:
addToin interfaceVizTMObjectIF
-
deleteFrom
public void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
- Specified by:
deleteFromin interfaceVizTMObjectIF
-
getAssociation
public AssociationIF getAssociation()
-
getLineWeight
public int getLineWeight()
-
getMainText
public String getMainText()
-
getTargetsFrom
public List getTargetsFrom(com.touchgraph.graphlayout.Node find)
-
getTopicMapType
public TopicIF getTopicMapType()
- Specified by:
getTopicMapTypein interfaceVizTMObjectIF
-
getWidth
public int getWidth()
- Overrides:
getWidthin classcom.touchgraph.graphlayout.Node
-
isAssociation
public boolean isAssociation()
- Specified by:
isAssociationin interfaceVizTMObjectIF
-
isEdge
public boolean isEdge()
- Specified by:
isEdgein interfaceVizTMObjectIF
-
paint
public void paint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
- Overrides:
paintin classcom.touchgraph.graphlayout.Node
-
miniPaint
public void miniPaint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
-
paintAfterEdges
public void paintAfterEdges(Graphics g)
- Specified by:
paintAfterEdgesin interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintFirst
public void paintFirst(Graphics g)
- Specified by:
paintFirstin interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintLast
public void paintLast(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:
paintLastin interfacecom.touchgraph.graphlayout.TGPaintListener
-
represents
public boolean represents(Object object)
- Specified by:
representsin interfaceVizTMObjectIF
-
setColor
public void setColor(Color color)
- Specified by:
setColorin interfaceVizTMObjectIF
-
setLineWeight
public void setLineWeight(int lineWeight)
- Specified by:
setLineWeightin interfaceVizTMObjectIF
-
setScopingTopic
public void setScopingTopic(TopicIF aTopic)
- Specified by:
setScopingTopicin interfaceVizTMObjectIF
-
setShape
public void setShape(int shape)
- Specified by:
setShapein interfaceVizTMObjectIF
-
setShouldDisplayScopedAssociationNames
public void setShouldDisplayScopedAssociationNames(boolean newValue)
- Specified by:
setShouldDisplayScopedAssociationNamesin interfaceVizTMAssociationIF
-
getDesctructor
public RecoveryObjectIF getDesctructor()
- Specified by:
getDesctructorin interfaceRecoverable
-
getRecreator
public RecoveryObjectIF getRecreator()
- Specified by:
getRecreatorin interfaceRecoverable
-
-