Class LayoutLensShapePickSupport<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.picking.ShapePickSupport<V,E>
edu.uci.ics.jung.visualization.picking.LayoutLensShapePickSupport<V,E>
- All Implemented Interfaces:
GraphElementAccessor<V,E>
public class LayoutLensShapePickSupport<V,E>
extends ShapePickSupport<V,E>
implements GraphElementAccessor<V,E>
ShapePickSupport provides access to Vertices and EdgeType based on
their actual shapes.
- Author:
- Tom Nelson
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport
ShapePickSupport.Style -
Field Summary
Fields inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport
pickSize, style, vv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an edge whose shape intersects the 'pickArea' footprint of the passed x,y, coordinates.Returns the vertex, if any, whose shape contains (x, y).getVertices(Layout<V, E> layout, Shape rectangle) Returns the vertices whose layout coordinates are contained inShape.Methods inherited from class edu.uci.ics.jung.visualization.picking.ShapePickSupport
edgesAreFiltered, getFilteredEdges, getFilteredVertices, getPickSize, getStyle, isEdgeRendered, isVertexRendered, setPickSize, setStyle, verticesAreFiltered
-
Constructor Details
-
LayoutLensShapePickSupport
-
LayoutLensShapePickSupport
-
-
Method Details
-
getVertex
Description copied from class:ShapePickSupportReturns the vertex, if any, whose shape contains (x, y). If (x,y) is contained in more than one vertex's shape, returns the vertex whose center is closest to the pick point.- Specified by:
getVertexin interfaceGraphElementAccessor<V,E> - Overrides:
getVertexin classShapePickSupport<V,E> - Parameters:
layout- the layout instance that records the positions for all verticesx- the x coordinate of the pick pointy- the y coordinate of the pick point- Returns:
- the vertex whose shape contains (x,y), and whose center is closest to the pick point
-
getVertices
Description copied from class:ShapePickSupportReturns the vertices whose layout coordinates are contained inShape. The shape is in screen coordinates, and the graph vertices are transformed to screen coordinates before they are tested for inclusion.- Specified by:
getVerticesin interfaceGraphElementAccessor<V,E> - Overrides:
getVerticesin classShapePickSupport<V,E> - Parameters:
layout- the layout instance that records the positions for all verticesrectangle- the region in which the returned vertices are located- Returns:
- the
Collectionof vertices whoselayoutcoordinates are contained inshape.
-
getEdge
Description copied from class:ShapePickSupportReturns an edge whose shape intersects the 'pickArea' footprint of the passed x,y, coordinates.- Specified by:
getEdgein interfaceGraphElementAccessor<V,E> - Overrides:
getEdgein classShapePickSupport<V,E> - Parameters:
layout- the context in which the location is definedx- the x coordinate of the locationy- the y coordinate of the location- Returns:
- an edge whose shape intersects the pick area centered on the location
(x,y)
-