Class LocatorHandle

java.lang.Object
org.jhotdraw8.draw.handle.AbstractHandle
org.jhotdraw8.draw.handle.LocatorHandle
All Implemented Interfaces:
Handle
Direct Known Subclasses:
MoveHandle, SelectionHandle

public abstract class LocatorHandle extends AbstractHandle
A LocatorHandle implements a Handle by delegating the location requests to a Locator object.
Author:
Werner Randelshofer
See Also:
  • Constructor Details

    • LocatorHandle

      public LocatorHandle(Figure owner, Locator l)
      Initializes the LocatorHandle with the given Locator.
      Parameters:
      owner - the figure which owns the handle
      l - the location
  • Method Details

    • getLocation

      protected javafx.geometry.Point2D getLocation()
      Returns the location in local figure coordinates.
      Returns:
      the location
    • getLocation

      protected javafx.geometry.Point2D getLocation(@NonNull DrawingView dv)
    • contains

      public boolean contains(@NonNull DrawingView dv, double x, double y, double tolerance)
      Description copied from interface: Handle
      Whether the user picked the handle.
      Parameters:
      dv - the drawing view
      x - the point
      y - the point
      tolerance - the tolerance (radius around the point)
      Returns:
      true if we picked the handle