Package com.reportmill.panels
Class PolygonTool
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.panels.Tool
com.reportmill.panels.PolygonTool
- All Implemented Interfaces:
RMArchiver.Archiving,Cloneable
- Direct Known Subclasses:
PolygonTool.PencilTool
This class manages creation and editing of polygon shapes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis inner class defines a polygon tool subclass for drawing freehand pencil sketches instead.Nested classes/interfaces inherited from class com.reportmill.panels.Tool
Tool.RMShapeHandle -
Field Summary
Fields inherited from class com.reportmill.panels.Tool
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidOverrides standard tool method to trigger polygon creation when the tool is deactivated.Returns the class that this tool is responsible for.booleanReturns whether tool should smooth path segments during creation.voidmouseDragged(RMShape aShape, MouseEvent anEvent) Event handling for shape editing.voidmouseDragged(MouseEvent anEvent) Handles mouse dragged for polygon creation.voidmouseMoved(RMShape aShape, MouseEvent anEvent) Event handling - overridden to maintain default cursor.voidmousePressed(RMShape aShape, MouseEvent anEvent) Event handling for shape editing.voidmousePressed(MouseEvent anEvent) Handles mouse pressed for polygon creation.voidmouseReleased(MouseEvent anEvent) Handles mouse released for polygon creation.Returns a new instance of the shape class that this tool is responsible for.voidDraws the polygon tool's path durring path creation.voidOverrides standard tool method to trigger polygon creation when the tool is reactivated.Methods inherited from class com.reportmill.panels.Tool
activateTool, didBecomeSuperSelectedShapeInEditor, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandleCount, getHandlePoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeHandleAtPoint, getTool, getTool, getUI, getWindowTitle, isInstance, isSelected, isSuperSelected, mouseMoved, mousePressedSelection, mouseReleased, moveShapeHandle, paintSelectedShape, paintSuperSelectedShape, processKeyEvent, resetUI, respondUI, willLoseSuperSelectionInEditorMethods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Constructor Details
-
PolygonTool
public PolygonTool()
-
-
Method Details
-
getShapeClass
Returns the class that this tool is responsible for.- Overrides:
getShapeClassin classTool
-
newInstance
Returns a new instance of the shape class that this tool is responsible for.- Overrides:
newInstancein classTool
-
getSmoothPathOnMouseUp
public boolean getSmoothPathOnMouseUp()Returns whether tool should smooth path segments during creation. -
mousePressed
Handles mouse pressed for polygon creation.- Overrides:
mousePressedin classTool
-
mouseDragged
Handles mouse dragged for polygon creation.- Overrides:
mouseDraggedin classTool
-
mouseReleased
Handles mouse released for polygon creation.- Overrides:
mouseReleasedin classTool
-
mouseMoved
Event handling - overridden to maintain default cursor.- Overrides:
mouseMovedin classTool
-
mousePressed
Event handling for shape editing.- Overrides:
mousePressedin classTool
-
mouseDragged
Event handling for shape editing.- Overrides:
mouseDraggedin classTool
-
deactivateTool
public void deactivateTool()Overrides standard tool method to trigger polygon creation when the tool is deactivated.- Overrides:
deactivateToolin classTool
-
reactivateTool
public void reactivateTool()Overrides standard tool method to trigger polygon creation when the tool is reactivated.- Overrides:
reactivateToolin classTool
-
paintTool
Draws the polygon tool's path durring path creation.
-