Package net.ontopia.topicmaps.viz
Class TMAbstractEdge
java.lang.Object
com.touchgraph.graphlayout.Edge
net.ontopia.topicmaps.viz.TMAbstractEdge
- All Implemented Interfaces:
com.touchgraph.graphlayout.TGPaintListener,EventListener,Recoverable,VizTMObjectIF
- Direct Known Subclasses:
TMAssociationEdge,TMClassInstanceAssociation,TMRoleEdge
public abstract class TMAbstractEdge
extends com.touchgraph.graphlayout.Edge
implements VizTMObjectIF, com.touchgraph.graphlayout.TGPaintListener
INTERNAL: Common abstract superclass for all edges representing
Topic Maps constructs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intprotected Fontprotected Iconprotected static int[]protected intprotected static final intprotected TopicIFprotected intstatic final intstatic final intprotected booleanprotected booleanFields inherited from class com.touchgraph.graphlayout.Edge
col, DEFAULT_COLOR, DEFAULT_LENGTH, from, id, length, MOUSE_OVER_COLOR, to, visible -
Constructor Summary
ConstructorsConstructorDescriptionTMAbstractEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTo(com.touchgraph.graphlayout.TGPanel tgpanel) protected doublecalculateMidPointBetween(double from, double to) protected DimensioncalculateOffset(double x1, double x2, double y1, double y2, int weight) voiddeleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel) doubledistFromPoint(double x, double y) protected GeneralPathgetCurvedBowTie(int index) protected QuadCurve2DgetCurvedLine(int index) protected ShapegetFont()protected PointgetIcon()protected intintprotected StringReturns the mid point between the two assocaition targets.intgetShape()getTargetsFrom(com.touchgraph.graphlayout.Node find) protected PointbooleanbooleanisEdge()voidvoidprotected voidprotected voidprotected voidpaintCurvedBowTie(Graphics2D g, int index) protected voidpaintCurvedLine(Graphics2D g, int index) voidvoidprotected voidprotected voidprotected voidpaintToolTipText(Graphics g, String string, int x, int y) protected voidpaintToolTipText(Graphics g, String text, Point aPoint) protected voidvoidvoidvoidsetLineWeight(int lineWeight) voidsetScopingTopic(TopicIF aTopic) voidsetShape(int shape) voidsetShouldDisplayRoleHoverHelp(boolean newValue) protected voidsetStringifier(Function<TopicIF, String> aStringifier) final voidsetVisible(boolean visible) setVisible is not supported in Vizigator.Methods inherited from class com.touchgraph.graphlayout.Edge
containsPoint, getColor, getFrom, getID, getLength, getOtherEndpt, getTo, intersects, isVisible, paintArrow, reverse, setColor, setEdgeDefaultColor, setEdgeDefaultLength, setEdgeMouseOverColor, setID, setLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ontopia.topicmaps.viz.Recoverable
getDesctructor, getRecreatorMethods inherited from interface net.ontopia.topicmaps.viz.VizTMObjectIF
represents, setColor
-
Field Details
-
lineWeight
protected int lineWeight -
shape
protected int shape -
icon
-
font
-
stringifier
-
underMouse
protected boolean underMouse -
LOADING
protected static final int LOADING- See Also:
-
SHAPE_BOWTIE
public static final int SHAPE_BOWTIE- See Also:
-
SHAPE_LINE
public static final int SHAPE_LINE- See Also:
-
DEFAULT_SHAPE
public static int DEFAULT_SHAPE -
DEFAULT_LINE_WEIGHT
public static int DEFAULT_LINE_WEIGHT -
intBuffer
protected static int[] intBuffer -
shouldDisplayRoleHoverHelp
protected boolean shouldDisplayRoleHoverHelp -
scopingTopic
-
-
Constructor Details
-
TMAbstractEdge
public TMAbstractEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t)
-
-
Method Details
-
setVisible
public final void setVisible(boolean visible) setVisible is not supported in Vizigator.- Specified by:
setVisiblein interfaceVizTMObjectIF- Overrides:
setVisiblein classcom.touchgraph.graphlayout.Edge
-
calculateMidPointBetween
protected double calculateMidPointBetween(double from, double to) -
getMidPoint
Returns the mid point between the two assocaition targets. -
getFromRolePosition
-
getToRolePosition
-
paintAfterEdges
- Specified by:
paintAfterEdgesin interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintConnection
-
paintLine
-
paintCurvedLine
-
getCurvedLine
-
paintCurvedBowTie
-
getCurvedBowTie
-
getIndexInParents
protected int getIndexInParents() -
paintBowTie
-
calculateOffset
-
paintLast
- Specified by:
paintLastin interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintToolTip
-
setLineWeight
public void setLineWeight(int lineWeight) - Specified by:
setLineWeightin interfaceVizTMObjectIF
-
getShape
public int getShape() -
setShape
public void setShape(int shape) - Specified by:
setShapein interfaceVizTMObjectIF
-
getIcon
-
setIcon
- Specified by:
setIconin interfaceVizTMObjectIF
-
getFont
-
setFont
- Specified by:
setFontin interfaceVizTMObjectIF
-
addTo
public void addTo(com.touchgraph.graphlayout.TGPanel tgpanel) - Specified by:
addToin interfaceVizTMObjectIF
-
getLineWeight
public int getLineWeight() -
paintFirst
- Specified by:
paintFirstin interfacecom.touchgraph.graphlayout.TGPaintListener
-
paintToolTipText
- Parameters:
g- - The graphic context for the drawing operation.string- - The String to be rendered.x- - The x coordinate where the String should be positioned.y- - The y coordinate where the String should be positioned. NOTE: The text is centered over the given coordinates.
-
paint
- Overrides:
paintin classcom.touchgraph.graphlayout.Edge
-
deleteFrom
public void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel) - Specified by:
deleteFromin interfaceVizTMObjectIF
-
paintTypeToolTip
-
paintToolTipText
-
getMainHoverHelpText
-
setShouldDisplayRoleHoverHelp
public void setShouldDisplayRoleHoverHelp(boolean newValue) -
isEdge
public boolean isEdge()- Specified by:
isEdgein interfaceVizTMObjectIF
-
isAssociation
public boolean isAssociation()- Specified by:
isAssociationin interfaceVizTMObjectIF
-
getTargetsFrom
-
getStringifier
-
setScopingTopic
- Specified by:
setScopingTopicin interfaceVizTMObjectIF
-
setStringifier
-
getTopicMapType
- Specified by:
getTopicMapTypein interfaceVizTMObjectIF
-
getDisplayShape
-
distFromPoint
public double distFromPoint(double x, double y) - Overrides:
distFromPointin classcom.touchgraph.graphlayout.Edge
-