Class 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
    • Constructor Detail

      • JungRadiusGraphElementAccessor

        public JungRadiusGraphElementAccessor​(JungNetworkLayout l)
      • JungRadiusGraphElementAccessor

        public JungRadiusGraphElementAccessor​(JungNetworkLayout l,
                                              double maxDistance)
    • Method Detail

      • 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.