package ballWorlds; import java.awt.geom.Point2D; /** * A Selectable is an object that can be selected by determining its distance * from a given point. It is typically used to select the Ball in a World that * is closest to the mouse point. * * @author David Mutchler, Salman Azhar, Curt Clifton and others, January 2005. * Modified September 2008, September 2009. */ public interface Selectable { /** * Returns the distance that this Selectable object is from the given * Point2D. * * @param point * the Point2D from which the distance is desired. * @return the distance that this Selectable object is from the given * Point2D. */ public double distanceFrom(Point2D point); }