java.lang.Object
org.jhotdraw8.draw.handle.AbstractHandle
org.jhotdraw8.draw.handle.LocatorHandle
- All Implemented Interfaces:
Handle
- Direct Known Subclasses:
MoveHandle,SelectionHandle
A LocatorHandle implements a Handle by delegating the location requests to a
Locator object.
- Author:
- Werner Randelshofer
- See Also:
-
Field Summary
Fields inherited from class org.jhotdraw8.draw.handle.AbstractHandle
owner -
Constructor Summary
ConstructorsConstructorDescriptionLocatorHandle(Figure owner, Locator l) Initializes the LocatorHandle with the given Locator. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@NonNull DrawingView dv, double x, double y, double tolerance) Whether the user picked the handle.protected javafx.geometry.Point2DReturns the location in local figure coordinates.protected javafx.geometry.Point2DMethods inherited from class org.jhotdraw8.draw.handle.AbstractHandle
dispose, getOwner, isCompatibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.handle.Handle
getCursor, getNode, isEditable, isSelectable, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMousePressed, onMouseReleased, updateNode
-
Constructor Details
-
LocatorHandle
Initializes the LocatorHandle with the given Locator.- Parameters:
owner- the figure which owns the handlel- the location
-
-
Method Details
-
getLocation
protected javafx.geometry.Point2D getLocation()Returns the location in local figure coordinates.- Returns:
- the location
-
getLocation
-
contains
Description copied from interface:HandleWhether the user picked the handle.- Parameters:
dv- the drawing viewx- the pointy- the pointtolerance- the tolerance (radius around the point)- Returns:
- true if we picked the handle
-