Class AbstractVisualVertex

java.lang.Object
ghidra.graph.viewer.vertex.AbstractVisualVertex
All Implemented Interfaces:
GVertex, VisualVertex
Direct Known Subclasses:
DockingVisualVertex

public abstract class AbstractVisualVertex extends Object implements VisualVertex
A VisualVertex implementation that implements most of the methods on the interface
  • Constructor Details

    • AbstractVisualVertex

      public AbstractVisualVertex()
  • Method Details

    • setFocused

      public void setFocused(boolean focused)
      Description copied from interface: VisualVertex
      Sets this vertex to be focused. This differs from being selected in that multiple vertices in a graph can be selected, but only one can be the focused vertex.
      Specified by:
      setFocused in interface VisualVertex
      Parameters:
      focused - true to focus; false to be marked as not focused
    • isFocused

      public boolean isFocused()
      Description copied from interface: VisualVertex
      Returns true if this vertex is focused (see VisualVertex.setFocused(boolean)
      Specified by:
      isFocused in interface VisualVertex
      Returns:
      true if focused
    • setSelected

      public void setSelected(boolean selected)
      Description copied from interface: VisualVertex
      Sets this vertex selected
      Specified by:
      setSelected in interface VisualVertex
      Parameters:
      selected - true to select this vertex; false to de-select this vertex
    • isSelected

      public boolean isSelected()
      Description copied from interface: VisualVertex
      Returns true if this vertex is selected
      Specified by:
      isSelected in interface VisualVertex
      Returns:
      true if this vertex is selected
    • setHovered

      public void setHovered(boolean hovered)
      Description copied from interface: VisualVertex
      Sets this vertex to be hovered
      Specified by:
      setHovered in interface VisualVertex
      Parameters:
      hovered - true to be marked as hovered; false to be marked as not hovered
    • isHovered

      public boolean isHovered()
      Description copied from interface: VisualVertex
      Returns true if this vertex is being hovered by the mouse
      Specified by:
      isHovered in interface VisualVertex
      Returns:
      true if this vertex is being hovered by the mouse
    • setEmphasis

      public void setEmphasis(double emphasisLevel)
      Description copied from interface: VisualVertex
      Sets the emphasis value for this vertex. A value of 0 indicates no emphasis.
      Specified by:
      setEmphasis in interface VisualVertex
      Parameters:
      emphasisLevel - the emphasis
    • getEmphasis

      public double getEmphasis()
      Description copied from interface: VisualVertex
      Returns the emphasis value of this vertex. 0 if not emphasized.
      Specified by:
      getEmphasis in interface VisualVertex
      Returns:
      the emphasis value of this vertex.
    • getLocation

      public Point2D getLocation()
      Description copied from interface: VisualVertex
      Returns the location of this vertex in the view
      Specified by:
      getLocation in interface VisualVertex
      Returns:
      the location of this vertex in the view
    • setLocation

      public void setLocation(Point2D location)
      Description copied from interface: VisualVertex
      Sets the location of this vertex in the view
      Specified by:
      setLocation in interface VisualVertex
      Parameters:
      location - the location of this vertex in the view
    • setAlpha

      public void setAlpha(double alpha)
      Description copied from interface: VisualVertex
      Set the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.
      Specified by:
      setAlpha in interface VisualVertex
      Parameters:
      alpha - the alpha value
    • getAlpha

      public double getAlpha()
      Description copied from interface: VisualVertex
      Get the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.
      Specified by:
      getAlpha in interface VisualVertex
      Returns:
      the alpha value
    • isGrabbable

      public boolean isGrabbable(Component c)
      Description copied from interface: VisualVertex
      Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.

      This is used to differentiate components within a vertex that should receive mouse events versus those components that will not be given mouse events.

      Specified by:
      isGrabbable in interface VisualVertex
      Parameters:
      c - the component
      Returns:
      true if the component is grabbable