public class LayoutLensShapePickSupport<V,E> extends ShapePickSupport<V,E> implements GraphElementAccessor<V,E>
ShapePickSupport.Style
pickSize, style, vv
Constructor and Description |
---|
LayoutLensShapePickSupport(VisualizationServer<V,E> vv) |
LayoutLensShapePickSupport(VisualizationServer<V,E> vv,
float pickSize) |
Modifier and Type | Method and Description |
---|---|
E |
getEdge(Layout<V,E> layout,
double x,
double y)
Returns an edge whose shape intersects the 'pickArea' footprint of the passed
x,y, coordinates.
|
V |
getVertex(Layout<V,E> layout,
double x,
double y)
Returns the vertex, if any, whose shape contains (x, y).
|
Collection<V> |
getVertices(Layout<V,E> layout,
Shape rectangle)
Returns the vertices whose layout coordinates are contained in
Shape . |
edgesAreFiltered, getFilteredEdges, getFilteredVertices, getPickSize, getStyle, isEdgeRendered, isVertexRendered, setPickSize, setStyle, verticesAreFiltered
public LayoutLensShapePickSupport(VisualizationServer<V,E> vv, float pickSize)
public LayoutLensShapePickSupport(VisualizationServer<V,E> vv)
public V getVertex(Layout<V,E> layout, double x, double y)
ShapePickSupport
getVertex
in interface GraphElementAccessor<V,E>
getVertex
in class ShapePickSupport<V,E>
layout
- the layout instance that records the positions for all verticesx
- the x coordinate of the pick pointy
- the y coordinate of the pick pointpublic Collection<V> getVertices(Layout<V,E> layout, Shape rectangle)
ShapePickSupport
Shape
.
The shape is in screen coordinates, and the graph vertices
are transformed to screen coordinates before they are tested
for inclusion.getVertices
in interface GraphElementAccessor<V,E>
getVertices
in class ShapePickSupport<V,E>
layout
- the layout instance that records the positions for all verticesrectangle
- the region in which the returned vertices are locatedCollection
of vertices whose layout
coordinates are contained in shape
.public E getEdge(Layout<V,E> layout, double x, double y)
ShapePickSupport
getEdge
in interface GraphElementAccessor<V,E>
getEdge
in class ShapePickSupport<V,E>
layout
- the context in which the location is definedx
- the x coordinate of the locationy
- the y coordinate of the location(x,y)
Copyright © 2015. All rights reserved.