Package edu.cnu.mdi.graphics.rubberband
Class APolyClickRubberband
java.lang.Object
edu.cnu.mdi.graphics.rubberband.ARubberband
edu.cnu.mdi.graphics.rubberband.AClickRubberband
edu.cnu.mdi.graphics.rubberband.APolyClickRubberband
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener
- Direct Known Subclasses:
RubberPolygon,RubberPolyline
Click-based multi-point gesture:
- single click adds a vertex
- double click ends (by default does not add a final point)
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.cnu.mdi.graphics.rubberband.ARubberband
ARubberband.Policy -
Field Summary
Fields inherited from class edu.cnu.mdi.graphics.rubberband.ARubberband
active, backgroundImage, component, currentPt, fillColor, highlightColor1, highlightColor2, image, policy, poly, rubberbanded, started, startPt, tempPoly -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAPolyClickRubberband(Component component, IRubberbanded rubberbanded, ARubberband.Policy policy) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanWhether the double-click should also add a final point.protected intMinimum required points before accepting end.voidMethods inherited from class edu.cnu.mdi.graphics.rubberband.AClickRubberband
ensureStarted, isClickBased, mouseMovedMethods inherited from class edu.cnu.mdi.graphics.rubberband.ARubberband
addPoint, begin, cancel, computeVertices, draw, endRubberbanding, getCurrent, getRubberbandBounds, getRubberbandVertices, getStart, isActive, isGestureValid, modifyCurrentPoint, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseReleased, setActive, setCurrent, setFillColor, setHighlightColor1, setHighlightColor2, startRubberbanding
-
Constructor Details
-
APolyClickRubberband
protected APolyClickRubberband(Component component, IRubberbanded rubberbanded, ARubberband.Policy policy)
-
-
Method Details
-
minPointsToAccept
protected int minPointsToAccept()Minimum required points before accepting end. -
addPointOnDoubleClick
protected boolean addPointOnDoubleClick()Whether the double-click should also add a final point. Old monolith behavior typically ended without adding. -
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classARubberband
-