CH.ifa.draw.standard
Class SelectionTool
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractTool
-
- CH.ifa.draw.standard.SelectionTool
-
- All Implemented Interfaces:
- Tool
- Direct Known Subclasses:
- CustomSelectionTool, MySelectionTool
public class SelectionTool extends AbstractTool
Tool to select and manipulate figures. A selection tool is in one of three states, e.g., background selection, figure selection, handle manipulation. The different states are handled by different child tools.
Design Patterns
State
SelectionTool is the StateContext and child is the State. The SelectionTool delegates state specific behavior to its current child tool.
-
-
Constructor Summary
Constructors Constructor and Description SelectionTool(DrawingView view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidmouseDown(java.awt.event.MouseEvent e, int x, int y)Handles mouse down events and starts the corresponding tracker.voidmouseDrag(java.awt.event.MouseEvent e, int x, int y)Handles mouse drag events.voidmouseUp(java.awt.event.MouseEvent e, int x, int y)Handles mouse up events.-
Methods inherited from class CH.ifa.draw.standard.AbstractTool
activate, deactivate, drawing, editor, keyDown, mouseMove, view
-
-
-
-
Constructor Detail
-
SelectionTool
public SelectionTool(DrawingView view)
-
-
Method Detail
-
mouseDown
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)Handles mouse down events and starts the corresponding tracker.- Specified by:
mouseDownin interfaceTool- Overrides:
mouseDownin classAbstractTool
-
mouseDrag
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)Handles mouse drag events. The events are forwarded to the current tracker.- Specified by:
mouseDragin interfaceTool- Overrides:
mouseDragin classAbstractTool
-
mouseUp
public void mouseUp(java.awt.event.MouseEvent e, int x, int y)Handles mouse up events. The events are forwarded to the current tracker.- Specified by:
mouseUpin interfaceTool- Overrides:
mouseUpin classAbstractTool
-
-
DataMelt 3.0 © DataMelt by jWork.ORG