Package ghidra.graph.viewer.shape
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
ConstructorDescriptionVisualGraphShapePickSupport
(edu.uci.ics.jung.visualization.VisualizationServer<V, E> viewer) -
Method Summary
Modifier and TypeMethodDescriptiongetEdge
(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
-
Constructor Details
-
VisualGraphShapePickSupport
-
-
Method Details
-
getFilteredVertices
- Overrides:
getFilteredVertices
in classedu.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 interfaceedu.uci.ics.jung.algorithms.layout.GraphElementAccessor<V extends VisualVertex,
E extends VisualEdge<V>> - Overrides:
getEdge
in classedu.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
-