Package edu.cnu.mdi.splot.plot
Interface Draggable
- All Known Implementing Classes:
DraggableRectangle,ExtraText,Legend
public interface Draggable
Common interaction state for draggable plot overlays.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoidvoidsetDragging(boolean dragging) voidsetDraggingPrimed(boolean primed)
-
Method Details
-
contains
- Parameters:
p- screen point @return whether the overlay contains the point
-
isDraggingPrimed
boolean isDraggingPrimed()- Returns:
- whether a press has primed a possible drag
-
isDragging
boolean isDragging()- Returns:
- whether a drag is currently active
-
setDraggingPrimed
void setDraggingPrimed(boolean primed) - Parameters:
primed- whether a possible drag is primed
-
setDragging
void setDragging(boolean dragging) - Parameters:
dragging- whether a drag is active; setting this totruemarks the overlay as having been moved (see implementation notes on "been moved" tracking)
-
setCurrentPoint
- Parameters:
p- current screen point, ornull
-
getCurrentPoint
Point getCurrentPoint()- Returns:
- defensive copy of the current screen point, or
null
-