java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.draw.tool.AbstractTracker
org.jhotdraw8.draw.tool.SimpleSelectAreaTracker
- All Implemented Interfaces:
SelectAreaTracker,Tracker,Disableable
SimpleSelectAreaTracker implements interactions with the background
area of a Drawing.
The DefaultSelectAreaTracker handles one of the three states of the
SelectionTool. It comes into action, when the user presses the mouse
button over the background of a Drawing.
This tool draws a Rectangle with style class "tool-rubberband".
Design pattern:
Name: Chain of Responsibility.
Role: Handler.
Partners: SelectionTool as Handler, DragTracker as Handler,
HandleTracker as Handler.
Design pattern:
Name: State.
Role: State.
Partners: SelectionTool as Context, DragTracker as State,
HandleTracker as State.
- Author:
- Werner Randelshofer
- See Also:
-
Property Summary
Properties inherited from class org.jhotdraw8.application.AbstractDisableable
disabled -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis tool draws a JavaFXRectanglewith style class "tool-rubberband".Fields inherited from class org.jhotdraw8.draw.tool.AbstractTracker
compositeEdit, nodeFields inherited from class org.jhotdraw8.application.AbstractDisableable
disabled, disablersFields inherited from interface org.jhotdraw8.fxbase.control.Disableable
DISABLED_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinitNode(javafx.scene.shape.Rectangle r) voidtrackKeyPressed(javafx.scene.input.KeyEvent event, DrawingView view) voidtrackKeyReleased(javafx.scene.input.KeyEvent event, DrawingView view) voidtrackKeyTyped(javafx.scene.input.KeyEvent event, DrawingView view) voidtrackMouseClicked(javafx.scene.input.MouseEvent event, DrawingView view) Handle input event forwarded from the parent Tool.voidtrackMouseDragged(javafx.scene.input.MouseEvent event, DrawingView dv) Handle input event forwarded from the parent Tool.voidtrackMousePressed(javafx.scene.input.MouseEvent event, DrawingView dv) Handle input event forwarded from the parent Tool.voidtrackMouseReleased(javafx.scene.input.MouseEvent event, DrawingView dv) Handle input event forwarded from the parent Tool.Methods inherited from class org.jhotdraw8.draw.tool.AbstractTracker
getNode, startCompositeEdit, stopCompositeEditMethods inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperty, disablersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.control.Disableable
addDisabler, isDisabled, removeDisabler
-
Field Details
-
STYLECLASS_TOOL_RUBBERBAND
This tool draws a JavaFXRectanglewith style class "tool-rubberband".- See Also:
-
-
Constructor Details
-
SimpleSelectAreaTracker
public SimpleSelectAreaTracker() -
SimpleSelectAreaTracker
-
-
Method Details
-
initNode
protected void initNode(javafx.scene.shape.Rectangle r) -
trackMousePressed
Description copied from interface:TrackerHandle input event forwarded from the parent Tool.- Specified by:
trackMousePressedin interfaceTracker- Parameters:
event- an eventdv- a view
-
trackMouseReleased
Description copied from interface:TrackerHandle input event forwarded from the parent Tool.- Specified by:
trackMouseReleasedin interfaceTracker- Parameters:
event- an eventdv- a view
-
trackMouseDragged
Description copied from interface:TrackerHandle input event forwarded from the parent Tool.- Specified by:
trackMouseDraggedin interfaceTracker- Parameters:
event- an eventdv- a view
-
trackMouseClicked
Description copied from interface:TrackerHandle input event forwarded from the parent Tool.- Specified by:
trackMouseClickedin interfaceTracker- Parameters:
event- an eventview- a view
-
trackKeyPressed
- Specified by:
trackKeyPressedin interfaceTracker
-
trackKeyReleased
- Specified by:
trackKeyReleasedin interfaceTracker
-
trackKeyTyped
- Specified by:
trackKeyTypedin interfaceTracker
-