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 void
addTo(com.touchgraph.graphlayout.TGPanel tgpanel)
void
deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
protected void
drawMissingEdgesIndicator(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
AssociationIF
getAssociation()
protected static String
getAssociationText(AssociationIF association, boolean displScopedAssocNames, TopicIF scopingTopic)
RecoveryObjectIF
getDesctructor()
int
getEdgeCount()
int
getLineWeight()
String
getMainText()
RecoveryObjectIF
getRecreator()
List
getTargetsFrom(com.touchgraph.graphlayout.Node find)
TopicIF
getTopicMapType()
int
getWidth()
boolean
isAssociation()
boolean
isEdge()
void
miniPaint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
void
paint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
void
paintAfterEdges(Graphics g)
void
paintFirst(Graphics g)
void
paintLast(Graphics g)
This is our hover help support.boolean
represents(Object object)
void
setColor(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 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:
addTo
in interfaceVizTMObjectIF
-
deleteFrom
public void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
- Specified by:
deleteFrom
in 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:
getTopicMapType
in interfaceVizTMObjectIF
-
getWidth
public int getWidth()
- Overrides:
getWidth
in classcom.touchgraph.graphlayout.Node
-
isAssociation
public boolean isAssociation()
- Specified by:
isAssociation
in interfaceVizTMObjectIF
-
isEdge
public boolean isEdge()
- Specified by:
isEdge
in interfaceVizTMObjectIF
-
paint
public void paint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
- Overrides:
paint
in classcom.touchgraph.graphlayout.Node
-
miniPaint
public void miniPaint(Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
-
paintAfterEdges
public void paintAfterEdges(Graphics g)
- Specified by:
paintAfterEdges
in interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintFirst
public void paintFirst(Graphics g)
- Specified by:
paintFirst
in 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:
paintLast
in interfacecom.touchgraph.graphlayout.TGPaintListener
-
represents
public boolean represents(Object object)
- Specified by:
represents
in interfaceVizTMObjectIF
-
setColor
public void setColor(Color color)
- Specified by:
setColor
in interfaceVizTMObjectIF
-
setLineWeight
public void setLineWeight(int lineWeight)
- Specified by:
setLineWeight
in interfaceVizTMObjectIF
-
setScopingTopic
public void setScopingTopic(TopicIF aTopic)
- Specified by:
setScopingTopic
in interfaceVizTMObjectIF
-
setShape
public void setShape(int shape)
- Specified by:
setShape
in interfaceVizTMObjectIF
-
setShouldDisplayScopedAssociationNames
public void setShouldDisplayScopedAssociationNames(boolean newValue)
- Specified by:
setShouldDisplayScopedAssociationNames
in interfaceVizTMAssociationIF
-
getDesctructor
public RecoveryObjectIF getDesctructor()
- Specified by:
getDesctructor
in interfaceRecoverable
-
getRecreator
public RecoveryObjectIF getRecreator()
- Specified by:
getRecreator
in interfaceRecoverable
-
-