net.ontopia.topicmaps.viz
Class TMAbstractEdge

java.lang.Object
  extended by com.touchgraph.graphlayout.Edge
      extended by net.ontopia.topicmaps.viz.TMAbstractEdge
All Implemented Interfaces:
com.touchgraph.graphlayout.TGPaintListener, java.util.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
static int DEFAULT_LINE_WEIGHT
           
static int DEFAULT_SHAPE
           
protected  java.awt.Font font
           
protected  javax.swing.Icon icon
           
protected static int[] intBuffer
           
protected  int lineWeight
           
protected static int LOADING
           
protected  TopicIF scopingTopic
           
protected  int shape
           
static int SHAPE_BOWTIE
           
static int SHAPE_LINE
           
protected  boolean shouldDisplayRoleHoverHelp
           
protected  StringifierIF stringifier
           
protected  boolean underMouse
           
 
Fields inherited from class com.touchgraph.graphlayout.Edge
col, DEFAULT_COLOR, DEFAULT_LENGTH, from, id, length, MOUSE_OVER_COLOR, to, visible
 
Constructor Summary
TMAbstractEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t)
           
 
Method Summary
 void addTo(com.touchgraph.graphlayout.TGPanel tgpanel)
           
protected  double calculateMidPointBetween(double from, double to)
           
protected  java.awt.Dimension calculateOffset(double x1, double x2, double y1, double y2, int weight)
           
 void deleteFrom(com.touchgraph.graphlayout.TGPanel tgpanel)
           
 double distFromPoint(double x, double y)
           
protected  java.awt.geom.GeneralPath getCurvedBowTie(int index)
           
protected  java.awt.geom.QuadCurve2D getCurvedLine(int index)
           
protected  java.awt.Shape getDisplayShape()
           
 java.awt.Font getFont()
           
protected  java.awt.Point getFromRolePosition()
           
 javax.swing.Icon getIcon()
           
protected  int getIndexInParents()
           
 int getLineWeight()
           
protected  java.lang.String getMainHoverHelpText()
           
 java.awt.Point getMidPoint()
          Returns the mid point between the two assocaition targets.
 int getShape()
           
 StringifierIF getStringifier()
           
 java.util.List getTargetsFrom(com.touchgraph.graphlayout.Node find)
           
 TopicIF getTopicMapType()
           
protected  java.awt.Point getToRolePosition()
           
 boolean isAssociation()
           
 boolean isEdge()
           
 void paint(java.awt.Graphics g, com.touchgraph.graphlayout.TGPanel tgPanel)
           
 void paintAfterEdges(java.awt.Graphics g)
           
protected  void paintBowTie(java.awt.Graphics2D g)
           
protected  void paintConnection(java.awt.Graphics g)
           
protected  void paintCurvedBowTie(java.awt.Graphics2D g, int index)
           
protected  void paintCurvedLine(java.awt.Graphics2D g, int index)
           
 void paintFirst(java.awt.Graphics g)
           
 void paintLast(java.awt.Graphics g)
           
protected  void paintLine(java.awt.Graphics2D g)
           
protected  void paintToolTip(java.awt.Graphics g)
           
protected  void paintToolTipText(java.awt.Graphics g, java.lang.String string, int x, int y)
           
protected  void paintToolTipText(java.awt.Graphics g, java.lang.String text, java.awt.Point aPoint)
           
protected  void paintTypeToolTip(java.awt.Graphics g)
           
 void setFont(java.awt.Font font)
           
 void setIcon(javax.swing.Icon icon)
           
 void setLineWeight(int lineWeight)
           
 void setScopingTopic(TopicIF aTopic)
           
 void setShape(int shape)
           
 void setShouldDisplayRoleHoverHelp(boolean newValue)
           
protected  void setStringifier(StringifierIF aStringifier)
           
 void setVisible(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, setLength
 
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
represents, setColor
 
Methods inherited from interface net.ontopia.topicmaps.viz.Recoverable
getDesctructor, getRecreator
 

Field Detail

lineWeight

protected int lineWeight

shape

protected int shape

icon

protected javax.swing.Icon icon

font

protected java.awt.Font font

stringifier

protected StringifierIF stringifier

underMouse

protected boolean underMouse

LOADING

protected static final int LOADING
See Also:
Constant Field Values

SHAPE_BOWTIE

public static final int SHAPE_BOWTIE
See Also:
Constant Field Values

SHAPE_LINE

public static final int SHAPE_LINE
See Also:
Constant Field Values

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

protected TopicIF scopingTopic
Constructor Detail

TMAbstractEdge

public TMAbstractEdge(com.touchgraph.graphlayout.Node f,
                      com.touchgraph.graphlayout.Node t)
Method Detail

setVisible

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

Specified by:
setVisible in interface VizTMObjectIF
Overrides:
setVisible in class com.touchgraph.graphlayout.Edge

calculateMidPointBetween

protected double calculateMidPointBetween(double from,
                                          double to)

getMidPoint

public java.awt.Point getMidPoint()
Returns the mid point between the two assocaition targets.


getFromRolePosition

protected java.awt.Point getFromRolePosition()

getToRolePosition

protected java.awt.Point getToRolePosition()

paintAfterEdges

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

paintConnection

protected void paintConnection(java.awt.Graphics g)

paintLine

protected void paintLine(java.awt.Graphics2D g)

paintCurvedLine

protected void paintCurvedLine(java.awt.Graphics2D g,
                               int index)

getCurvedLine

protected java.awt.geom.QuadCurve2D getCurvedLine(int index)

paintCurvedBowTie

protected void paintCurvedBowTie(java.awt.Graphics2D g,
                                 int index)

getCurvedBowTie

protected java.awt.geom.GeneralPath getCurvedBowTie(int index)

getIndexInParents

protected int getIndexInParents()

paintBowTie

protected void paintBowTie(java.awt.Graphics2D g)

calculateOffset

protected java.awt.Dimension calculateOffset(double x1,
                                             double x2,
                                             double y1,
                                             double y2,
                                             int weight)

paintLast

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

paintToolTip

protected void paintToolTip(java.awt.Graphics g)

setLineWeight

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

getShape

public int getShape()

setShape

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

getIcon

public javax.swing.Icon getIcon()

setIcon

public void setIcon(javax.swing.Icon icon)
Specified by:
setIcon in interface VizTMObjectIF

getFont

public java.awt.Font getFont()

setFont

public void setFont(java.awt.Font font)
Specified by:
setFont in interface VizTMObjectIF

addTo

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

getLineWeight

public int getLineWeight()

paintFirst

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

paintToolTipText

protected void paintToolTipText(java.awt.Graphics g,
                                java.lang.String string,
                                int x,
                                int y)
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

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

deleteFrom

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

paintTypeToolTip

protected void paintTypeToolTip(java.awt.Graphics g)

paintToolTipText

protected void paintToolTipText(java.awt.Graphics g,
                                java.lang.String text,
                                java.awt.Point aPoint)

getMainHoverHelpText

protected java.lang.String getMainHoverHelpText()

setShouldDisplayRoleHoverHelp

public void setShouldDisplayRoleHoverHelp(boolean newValue)

isEdge

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

isAssociation

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

getTargetsFrom

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

getStringifier

public StringifierIF getStringifier()

setScopingTopic

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

setStringifier

protected void setStringifier(StringifierIF aStringifier)

getTopicMapType

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

getDisplayShape

protected java.awt.Shape getDisplayShape()

distFromPoint

public double distFromPoint(double x,
                            double y)
Overrides:
distFromPoint in class com.touchgraph.graphlayout.Edge


Copyright © 2000-2012 Ontopia.