Class CircleWithLabelVertexShapeProvider

java.lang.Object
ghidra.base.graph.CircleWithLabelVertexShapeProvider
All Implemented Interfaces:
VertexShapeProvider

public class CircleWithLabelVertexShapeProvider extends Object implements VertexShapeProvider
  • Field Details

    • DEFAULT_VERTEX_SHAPE_COLOR

      public static final Color DEFAULT_VERTEX_SHAPE_COLOR
    • EXPAND_ICON

      protected static final Icon EXPAND_ICON
    • COLLAPSE_ICON

      protected static final Icon COLLAPSE_ICON
    • VERTEX_SHAPE_LAYER

      protected static final Integer VERTEX_SHAPE_LAYER
    • TOGGLE_BUTTON_LAYER

      protected static final Integer TOGGLE_BUTTON_LAYER
    • LABEL_LAYER

      protected static final Integer LABEL_LAYER
    • GAP

      protected static final int GAP
      See Also:
    • VERTEX_SHAPE_SIZE

      protected static final int VERTEX_SHAPE_SIZE
      See Also:
    • MAX_NAME_LENGTH

      protected static final int MAX_NAME_LENGTH
      See Also:
    • layeredPane

      protected JLayeredPane layeredPane
    • toggleInsButton

      protected JButton toggleInsButton
    • toggleOutsButton

      protected JButton toggleOutsButton
    • nameLabel

      protected JLabel nameLabel
    • vertexImageLabel

      protected JLabel vertexImageLabel
    • vertexShape

      protected Ellipse2D.Double vertexShape
    • compactShape

      protected Ellipse2D.Double compactShape
    • fullShape

      protected Shape fullShape
    • incomingExpanded

      protected boolean incomingExpanded
    • outgoingExpanded

      protected boolean outgoingExpanded
    • useDebugBorders

      protected boolean useDebugBorders
  • Constructor Details

    • CircleWithLabelVertexShapeProvider

      public CircleWithLabelVertexShapeProvider(String label)
    • CircleWithLabelVertexShapeProvider

      public CircleWithLabelVertexShapeProvider(String label, VertexExpansionListener expansionListener)
  • Method Details

    • getCircleCenterYOffset

      public int getCircleCenterYOffset()
    • buildUi

      protected void buildUi()
    • generateLabelText

      protected String generateLabelText()
    • getVertexShapePaint

      protected Paint getVertexShapePaint()
    • getDefaultVertexShapeColor

      protected Color getDefaultVertexShapeColor()
    • getName

      public String getName()
    • getIncomingToggleButton

      public JButton getIncomingToggleButton()
    • getOutgoingToggleButton

      public JButton getOutgoingToggleButton()
    • setIncomingExpanded

      public void setIncomingExpanded(boolean setExpanded)
      Sets to true if this vertex is showing all edges in the incoming direction
      Parameters:
      setExpanded - true if this vertex is showing all edges in the incoming direction
    • isIncomingExpanded

      public boolean isIncomingExpanded()
      Returns true if this vertex is showing all edges in the incoming direction
      Returns:
      true if this vertex is showing all edges in the incoming direction
    • setOutgoingExpanded

      public void setOutgoingExpanded(boolean setExpanded)
      Sets to true if this vertex is showing all edges in the outgoing direction
      Parameters:
      setExpanded - true if this vertex is showing all edges in the outgoing direction
    • isOutgoingExpanded

      public boolean isOutgoingExpanded()
      Returns true if this vertex is showing all edges in the outgoing direction
      Returns:
      true if this vertex is showing all edges in the outgoing direction
    • isExpanded

      public boolean isExpanded()
      Returns whether this vertex is fully expanded in its current direction
      Returns:
      whether this vertex is fully expanded in its current direction
    • canExpand

      public boolean canExpand()
      Returns true if this node can be expanded
      Returns:
      true if this node can be expanded
    • hasIncomingEdges

      protected boolean hasIncomingEdges()
    • hasOutgoingEdges

      protected boolean hasOutgoingEdges()
    • setTogglesVisible

      public void setTogglesVisible(boolean visible)
    • getComponent

      public JComponent getComponent()
    • getCompactShape

      public Shape getCompactShape()
      Description copied from interface: VertexShapeProvider
      Returns the compact shape that the user will see when full, detailed rendering is not being performed for a vertex, such as in the satellite viewer or when fully-zoomed-out
      Specified by:
      getCompactShape in interface VertexShapeProvider
      Returns:
      the shape
    • getFullShape

      public Shape getFullShape()
      Description copied from interface: VertexShapeProvider
      Returns the full (the actual) shape of a vertex. This can be used to determine if a mouse point intersects a vertex or to get the real bounding-box of a vertex.
      Specified by:
      getFullShape in interface VertexShapeProvider
      Returns:
      the shape
    • toString

      public String toString()
      Overrides:
      toString in class Object