Class JungRadiusGraphElementAccessor

java.lang.Object
repast.simphony.visualization.visualization3D.layout.JungRadiusGraphElementAccessor
All Implemented Interfaces:
JungGraphElementAccessor

public class JungRadiusGraphElementAccessor extends Object implements 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 Details

    • layout

      protected JungNetworkLayout layout
    • maxDistance

      protected double maxDistance
  • Constructor Details

    • JungRadiusGraphElementAccessor

      public JungRadiusGraphElementAccessor(JungNetworkLayout l)
    • JungRadiusGraphElementAccessor

      public JungRadiusGraphElementAccessor(JungNetworkLayout l, double maxDistance)
  • Method Details

    • getVertex

      public Object getVertex(double x, double y)
      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 interface JungGraphElementAccessor
    • getVertex

      public Object 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. 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

      public RepastEdge getEdge(double x, double y)
      Gets the edge nearest to the location of the (x,y) location selected. Calls the longer form of the call.
      Specified by:
      getEdge in interface JungGraphElementAccessor
    • getEdge

      public RepastEdge 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. Override this method to provide a more efficient implementation.
      Parameters:
      x -
      y -
      maxDistance - temporarily overrides member maxDistance
      Returns:
      Edge closest to the click.
    • setLayout

      public void setLayout(JungNetworkLayout l)
      Description copied from interface: JungGraphElementAccessor
      Sets the Network that is used to specify the locations of vertices and edges in this instance to layout.
      Specified by:
      setLayout in interface JungGraphElementAccessor