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,java.lang.Cloneable
public class SelectTool extends Tool
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
Fields Modifier and Type Field Description static byteDragModeEventDispatchstatic byteDragModeMovestatic byteDragModeNonestatic byteDragModeResizestatic byteDragModeSelect-
Fields inherited from class com.reportmill.panels.Tool
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
-
-
Constructor Summary
Constructors Constructor Description SelectTool()Creates a new select tool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDragMode()Returns the last drag mode handled by the select tool.booleangetRedoMousePressed()Returns whether select tool should redo current mouse down.RJPanelgetUI()Returns the Swing UI for the current selected shape(s).voidmouseDragged(java.awt.event.MouseEvent anEvent)Handles mouse dragged for the select tool.voidmouseMoved(java.awt.event.MouseEvent anEvent)Handles mouse moved - forward on to super selected shape tool.voidmousePressed(java.awt.event.MouseEvent anEvent)Handles mouse pressed for the select tool.voidmouseReleased(java.awt.event.MouseEvent anEvent)Handles mouse released for the select tool.voidpaintTool(java.awt.Graphics2D g)Paints tool specific things, like handles.voidreactivateTool()Tool callback selects parent of selected shapes (or just shape, if it's super-selected).voidresetUI()Called to reset the Swing GUI for the currently selected shape.voidsetRedoMousePressed(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 Detail
-
DragModeNone
public static final byte DragModeNone
- See Also:
- Constant Field Values
-
DragModeMove
public static final byte DragModeMove
- See Also:
- Constant Field Values
-
DragModeResize
public static final byte DragModeResize
- See Also:
- Constant Field Values
-
DragModeSelect
public static final byte DragModeSelect
- See Also:
- Constant Field Values
-
DragModeEventDispatch
public static final byte DragModeEventDispatch
- See Also:
- Constant Field Values
-
-
Method Detail
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent anEvent)
Handles mouse moved - forward on to super selected shape tool.- Overrides:
mouseMovedin classTool
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed for the select tool.- Overrides:
mousePressedin classTool
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged for the select tool.- Overrides:
mouseDraggedin classTool
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
Handles mouse released for the select tool.- Overrides:
mouseReleasedin classTool
-
getUI
public RJPanel 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
public void paintTool(java.awt.Graphics2D g)
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:
reactivateToolin classTool
-
-