Package net.sf.jaxodraw.object
Interface JaxoHandle
- All Known Implementing Classes:
AbstractJaxoHandle
,JaxoDefaultHandle
,JaxoRoundHandle
public interface JaxoHandle
A handle for a JaxoObject.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int handleX, int handleY, int x, int y) Determines whether the given point is contained in this handle.getBounds
(int x, int y) Return an enclosing Rectangle that completely contains this handle at the given position.void
paint
(JaxoGraphics2D g2, int x, int y, boolean marked, boolean secondary) Paint the handle at a given position.
-
Method Details
-
paint
Paint the handle at a given position.- Parameters:
g2
- The graphics context to paint to.x
- The x position of the handle.y
- The y position of the handle.marked
- True if the handle should be painted as marked. A marked handle is one that has been selected, eg for an edit operation.secondary
- True if this is a secondary handle. A secondary handle is one that cannot be selected in the current context.
-
contains
boolean contains(int handleX, int handleY, int x, int y) Determines whether the given point is contained in this handle.- Parameters:
handleX
- The x position of the handle.handleY
- The y position of the handle.x
- The x position of the point to check.y
- The y position of the point to check.- Returns:
- True if the handle encloses the point, false otherwise.
-
getBounds
Return an enclosing Rectangle that completely contains this handle at the given position.- Parameters:
x
- the x position of this handle.y
- the x position of this handle.- Returns:
- the bounding box of this handle.
-