Class JungRadiusGraphElementAccessor
java.lang.Object
repast.simphony.visualization.visualization3D.layout.JungRadiusGraphElementAccessor
- All Implemented Interfaces:
JungGraphElementAccessor
Returns the vertex or edge
that is closest to the specified location. This implementation
provides the same picking options that were available in
previous versions of AbstractLayout.
See JUNG RadiusGraphElementAccessor for further details
- Author:
- M. Altaweel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEdge(double x, double y) Gets the edge nearest to the location of the (x,y) location selected.getEdge(double x, double y, double maxDistance) Gets the edge nearest to the location of the (x,y) location selected, within a distance of maxDistance, Iterates through all visible edges and checks their distance from the click.getVertex(double x, double y) Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance.getVertex(double x, double y, double maxDistance) Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance.voidSets theNetworkthat is used to specify the locations of vertices and edges in this instance tolayout.
-
Field Details
-
layout
-
maxDistance
protected double maxDistance
-
-
Constructor Details
-
JungRadiusGraphElementAccessor
-
JungRadiusGraphElementAccessor
-
-
Method Details
-
getVertex
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance. Iterates through all visible vertices and checks their distance from the click. Override this method to provde a more efficient implementation.- Specified by:
getVertexin interfaceJungGraphElementAccessor
-
getVertex
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance. Iterates through all visible vertices and checks their distance from the click. Override this method to provde a more efficient implementation.- Parameters:
x-y-maxDistance- temporarily overrides member maxDistance
-
getEdge
Gets the edge nearest to the location of the (x,y) location selected. Calls the longer form of the call.- Specified by:
getEdgein interfaceJungGraphElementAccessor
-
getEdge
Gets the edge nearest to the location of the (x,y) location selected, within a distance of maxDistance, Iterates through all visible edges and checks their distance from the click. Override this method to provide a more efficient implementation.- Parameters:
x-y-maxDistance- temporarily overrides member maxDistance- Returns:
- Edge closest to the click.
-
setLayout
Description copied from interface:JungGraphElementAccessorSets theNetworkthat is used to specify the locations of vertices and edges in this instance tolayout.- Specified by:
setLayoutin interfaceJungGraphElementAccessor
-