Class TMAbstractNode

  • All Implemented Interfaces:
    Recoverable
    Direct Known Subclasses:
    TMAssociationNode, TMTopicNode

    public abstract class TMAbstractNode
    extends com.touchgraph.graphlayout.Node
    implements Recoverable
    INTERNAL: Common abstract superclass for all nodes representing Topic Maps constructs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Icon icon  
      protected TopicMapView topicMapView  
      protected boolean 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
    • Field Detail

      • icon

        protected Icon icon
      • underMouse

        protected boolean underMouse
    • Constructor Detail

      • TMAbstractNode

        public TMAbstractNode​(String id)
    • Method Detail

      • setVisible

        public final void setVisible​(boolean visible)
        setVisible is not supported in Vizigator.
        Overrides:
        setVisible in class com.touchgraph.graphlayout.Node
      • removeMouseoverIcon

        public void removeMouseoverIcon()
        Workaround that avoids mouseover icon hanging around after hiding node.
      • textColourForBackground

        public static Color textColourForBackground​(Color c)
      • getEdges

        public Iterator getEdges()
        Overrides:
        getEdges in class com.touchgraph.graphlayout.Node
        Returns:
        An iterator on all the edges.
      • getVisibleEdges

        public Iterator getVisibleEdges()
        Returns:
        An iterator on the edges that are currently visible.
      • getVisibleEdgesList

        public List getVisibleEdgesList()
        Returns:
        A list of the edges that are currently visible.
      • setBackColor

        public void setBackColor​(Color bgColor)
        Set the node background color. Also applies a simple colour inversion algorithm on the text colour.
        Overrides:
        setBackColor in class com.touchgraph.graphlayout.Node
      • getIcon

        public Icon getIcon()
      • setIcon

        public void setIcon​(Icon icon)
      • getPaintBorderColor

        public Color getPaintBorderColor​(com.touchgraph.graphlayout.TGPanel tgPanel)
        Overrides:
        getPaintBorderColor in class com.touchgraph.graphlayout.Node
      • getPaintBackColor

        public Color getPaintBackColor​(com.touchgraph.graphlayout.TGPanel tgPanel)
        Overrides:
        getPaintBackColor in class com.touchgraph.graphlayout.Node
      • drawNeighboursInForeground

        protected void drawNeighboursInForeground​(Graphics g,
                                                  com.touchgraph.graphlayout.TGPanel tgPanel)
      • getPaintTextColor

        public Color getPaintTextColor​(com.touchgraph.graphlayout.TGPanel tgPanel)
        This is how TG gets the color it actually uses for the painting, which in our case may be different from the preset text color.
        Overrides:
        getPaintTextColor in class com.touchgraph.graphlayout.Node
      • setUnderMouse

        protected void setUnderMouse​(com.touchgraph.graphlayout.TGPanel tgPanel)
      • setUnderMouseForced

        public void setUnderMouseForced​(boolean under)