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.ToolTool.RMShapeHandle
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static byteDragModeEventDispatchstatic byteDragModeMovestatic byteDragModeNonestatic byteDragModeResizestatic byteDragModeSelect- 
Fields inherited from class com.reportmill.panels.ToolHandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
 
- 
 - 
Constructor SummaryConstructors Constructor Description SelectTool()Creates a new select tool.
 - 
Method SummaryAll 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.ToolactivateTool, 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.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Field Detail- 
DragModeNonepublic static final byte DragModeNone - See Also:
- Constant Field Values
 
 - 
DragModeMovepublic static final byte DragModeMove - See Also:
- Constant Field Values
 
 - 
DragModeResizepublic static final byte DragModeResize - See Also:
- Constant Field Values
 
 - 
DragModeSelectpublic static final byte DragModeSelect - See Also:
- Constant Field Values
 
 - 
DragModeEventDispatchpublic static final byte DragModeEventDispatch - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
mouseMovedpublic void mouseMoved(java.awt.event.MouseEvent anEvent) Handles mouse moved - forward on to super selected shape tool.- Overrides:
- mouseMovedin class- Tool
 
 - 
mousePressedpublic void mousePressed(java.awt.event.MouseEvent anEvent) Handles mouse pressed for the select tool.- Overrides:
- mousePressedin class- Tool
 
 - 
mouseDraggedpublic void mouseDragged(java.awt.event.MouseEvent anEvent) Handles mouse dragged for the select tool.- Overrides:
- mouseDraggedin class- Tool
 
 - 
mouseReleasedpublic void mouseReleased(java.awt.event.MouseEvent anEvent) Handles mouse released for the select tool.- Overrides:
- mouseReleasedin class- Tool
 
 - 
getUIpublic RJPanel getUI() Returns the Swing UI for the current selected shape(s).
 - 
resetUIpublic void resetUI() Called to reset the Swing GUI for the currently selected shape.
 - 
getDragModepublic int getDragMode() Returns the last drag mode handled by the select tool.
 - 
getRedoMousePressedpublic boolean getRedoMousePressed() Returns whether select tool should redo current mouse down.
 - 
setRedoMousePressedpublic void setRedoMousePressed(boolean aFlag) Sets whether select tool should redo current mouse dwon.
 - 
paintToolpublic void paintTool(java.awt.Graphics2D g) Paints tool specific things, like handles.
 - 
reactivateToolpublic void reactivateTool() Tool callback selects parent of selected shapes (or just shape, if it's super-selected).- Overrides:
- reactivateToolin class- Tool
 
 
- 
 
-