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 Details

    • lineWeight

      protected int lineWeight
    • shape

      protected int shape
    • icon

      protected Icon icon
    • font

      protected Font font
    • stringifier

      protected Function<TopicIF,String> 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

      protected TopicIF 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:
      setVisible in interface VizTMObjectIF
      Overrides:
      setVisible in class com.touchgraph.graphlayout.Edge
    • calculateMidPointBetween

      protected double calculateMidPointBetween(double from, double to)
    • getMidPoint

      public Point getMidPoint()
      Returns the mid point between the two assocaition targets.
    • getFromRolePosition

      protected Point getFromRolePosition()
    • getToRolePosition

      protected Point getToRolePosition()
    • paintAfterEdges

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

      protected void paintConnection(Graphics g)
    • paintLine

      protected void paintLine(Graphics2D g)
    • paintCurvedLine

      protected void paintCurvedLine(Graphics2D g, int index)
    • getCurvedLine

      protected QuadCurve2D getCurvedLine(int index)
    • paintCurvedBowTie

      protected void paintCurvedBowTie(Graphics2D g, int index)
    • getCurvedBowTie

      protected GeneralPath getCurvedBowTie(int index)
    • getIndexInParents

      protected int getIndexInParents()
    • paintBowTie

      protected void paintBowTie(Graphics2D g)
    • calculateOffset

      protected Dimension calculateOffset(double x1, double x2, double y1, double y2, int weight)
    • paintLast

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

      protected void paintToolTip(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 Icon getIcon()
    • setIcon

      public void setIcon(Icon icon)
      Specified by:
      setIcon in interface VizTMObjectIF
    • getFont

      public Font getFont()
    • setFont

      public void setFont(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(Graphics g)
      Specified by:
      paintFirst in interface com.touchgraph.graphlayout.TGPaintListener
    • paintToolTipText

      protected void paintToolTipText(Graphics g, 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(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(Graphics g)
    • paintToolTipText

      protected void paintToolTipText(Graphics g, String text, Point aPoint)
    • getMainHoverHelpText

      protected 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 List getTargetsFrom(com.touchgraph.graphlayout.Node find)
    • getStringifier

      public Function<TopicIF,String> getStringifier()
    • setScopingTopic

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

      protected void setStringifier(Function<TopicIF,String> aStringifier)
    • getTopicMapType

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

      protected Shape getDisplayShape()
    • distFromPoint

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