Package com.reportmill.panels
Class SelectTool
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.panels.Tool
com.reportmill.panels.SelectTool
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
This class handles mouse selection and manipulation of shapes, including:
- Click on a shape selects a shape
- Double click on a shape super-selects a shape
- Drag a rect selects shapes
- Shift click or shift drag XORs selection
- Click and drag handle resizes shape
-
Nested Class Summary
Nested classes/interfaces inherited from class com.reportmill.panels.Tool
Tool.RMShapeHandle
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
Fields inherited from class com.reportmill.panels.Tool
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the last drag mode handled by the select tool.boolean
Returns whether select tool should redo current mouse down.getUI()
Returns the Swing UI for the current selected shape(s).void
mouseDragged
(MouseEvent anEvent) Handles mouse dragged for the select tool.void
mouseMoved
(MouseEvent anEvent) Handles mouse moved - forward on to super selected shape tool.void
mousePressed
(MouseEvent anEvent) Handles mouse pressed for the select tool.void
mouseReleased
(MouseEvent anEvent) Handles mouse released for the select tool.void
Paints tool specific things, like handles.void
Tool callback selects parent of selected shapes (or just shape, if it's super-selected).void
resetUI()
Called to reset the Swing GUI for the currently selected shape.void
setRedoMousePressed
(boolean aFlag) Sets whether select tool should redo current mouse dwon.Methods inherited from class com.reportmill.panels.Tool
activateTool, deactivateTool, didBecomeSuperSelectedShapeInEditor, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandleCount, getHandlePoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeClass, getShapeHandleAtPoint, getTool, getTool, getWindowTitle, isInstance, isSelected, isSuperSelected, mouseDragged, mouseMoved, mousePressed, mousePressedSelection, mouseReleased, moveShapeHandle, newInstance, paintSelectedShape, paintSuperSelectedShape, processKeyEvent, respondUI, willLoseSuperSelectionInEditor
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Field Details
-
DragModeNone
public static final byte DragModeNone- See Also:
-
DragModeMove
public static final byte DragModeMove- See Also:
-
DragModeResize
public static final byte DragModeResize- See Also:
-
DragModeSelect
public static final byte DragModeSelect- See Also:
-
DragModeEventDispatch
public static final byte DragModeEventDispatch- See Also:
-
-
Constructor Details
-
SelectTool
public SelectTool()Creates a new select tool.
-
-
Method Details
-
mouseMoved
Handles mouse moved - forward on to super selected shape tool.- Overrides:
mouseMoved
in classTool
-
mousePressed
Handles mouse pressed for the select tool.- Overrides:
mousePressed
in classTool
-
mouseDragged
Handles mouse dragged for the select tool.- Overrides:
mouseDragged
in classTool
-
mouseReleased
Handles mouse released for the select tool.- Overrides:
mouseReleased
in classTool
-
getUI
Returns the Swing UI for the current selected shape(s). -
resetUI
public void resetUI()Called to reset the Swing GUI for the currently selected shape. -
getDragMode
public int getDragMode()Returns the last drag mode handled by the select tool. -
getRedoMousePressed
public boolean getRedoMousePressed()Returns whether select tool should redo current mouse down. -
setRedoMousePressed
public void setRedoMousePressed(boolean aFlag) Sets whether select tool should redo current mouse dwon. -
paintTool
Paints tool specific things, like handles. -
reactivateTool
public void reactivateTool()Tool callback selects parent of selected shapes (or just shape, if it's super-selected).- Overrides:
reactivateTool
in classTool
-