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
-
Constructor Summary
-
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.void
Sets theNetwork
that 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:
getVertex
in 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:
getEdge
in 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:JungGraphElementAccessor
Sets theNetwork
that is used to specify the locations of vertices and edges in this instance tolayout
.- Specified by:
setLayout
in interfaceJungGraphElementAccessor
-