Class VisualGraphShapePickSupport<V extends VisualVertex,E extends VisualEdge<V>>

java.lang.Object
edu.uci.ics.jung.visualization.picking.ShapePickSupport<V,E>
ghidra.graph.viewer.shape.VisualGraphShapePickSupport<V,E>
All Implemented Interfaces:
edu.uci.ics.jung.algorithms.layout.GraphElementAccessor<V,E>

public class VisualGraphShapePickSupport<V extends VisualVertex,E extends VisualEdge<V>> extends edu.uci.ics.jung.visualization.picking.ShapePickSupport<V,E>
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport

    edu.uci.ics.jung.visualization.picking.ShapePickSupport.Style
  • Field Summary

    Fields inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport

    pickSize, style, vv
  • Constructor Summary

    Constructors
    Constructor
    Description
    VisualGraphShapePickSupport(edu.uci.ics.jung.visualization.VisualizationServer<V,E> viewer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double viewSpaceX, double viewSpaceY)
    Overridden to handle edge picking with our custom edge placement.
    protected Collection<V>
    getFilteredVertices(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)
     

    Methods inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport

    edgesAreFiltered, getFilteredEdges, getPickSize, getStyle, getVertex, getVertices, isEdgeRendered, isVertexRendered, setPickSize, setStyle, verticesAreFiltered

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VisualGraphShapePickSupport

      public VisualGraphShapePickSupport(edu.uci.ics.jung.visualization.VisualizationServer<V,E> viewer)
  • Method Details

    • getFilteredVertices

      protected Collection<V> getFilteredVertices(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)
      Overrides:
      getFilteredVertices in class edu.uci.ics.jung.visualization.picking.ShapePickSupport<V extends VisualVertex,E extends VisualEdge<V>>
    • getEdge

      public E getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double viewSpaceX, double viewSpaceY)
      Overridden to handle edge picking with our custom edge placement. The painting and picking algorithms in Jung are all hard-coded to transform loop edges to above the vertex--there is no way to plug our own transformation into Jung :(
      Specified by:
      getEdge in interface edu.uci.ics.jung.algorithms.layout.GraphElementAccessor<V extends VisualVertex,E extends VisualEdge<V>>
      Overrides:
      getEdge in class edu.uci.ics.jung.visualization.picking.ShapePickSupport<V extends VisualVertex,E extends VisualEdge<V>>
      Parameters:
      layout -
      viewSpaceX - The x under which to look for an edge (view coordinates)
      viewSpaceY - The y under which to look for an edge (view coordinates)
      Returns:
      The closest edge to the given point; null if no edge near the point