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,- java.lang.Cloneable
 - Direct Known Subclasses:
- PolygonTool.PencilTool
 
 public class PolygonTool extends Tool This class manages creation and editing of polygon shapes.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPolygonTool.PencilToolThis inner class defines a polygon tool subclass for drawing freehand pencil sketches instead.- 
Nested classes/interfaces inherited from class com.reportmill.panels.ToolTool.RMShapeHandle
 
- 
 - 
Field Summary- 
Fields inherited from class com.reportmill.panels.ToolHandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
 
- 
 - 
Constructor SummaryConstructors Constructor Description PolygonTool()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeactivateTool()Overrides standard tool method to trigger polygon creation when the tool is deactivated.java.lang.ClassgetShapeClass()Returns the class that this tool is responsible for.booleangetSmoothPathOnMouseUp()Returns whether tool should smooth path segments during creation.voidmouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)Event handling for shape editing.voidmouseDragged(java.awt.event.MouseEvent anEvent)Handles mouse dragged for polygon creation.voidmouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)Event handling - overridden to maintain default cursor.voidmousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)Event handling for shape editing.voidmousePressed(java.awt.event.MouseEvent anEvent)Handles mouse pressed for polygon creation.voidmouseReleased(java.awt.event.MouseEvent anEvent)Handles mouse released for polygon creation.RMShapenewInstance()Returns a new instance of the shape class that this tool is responsible for.voidpaintTool(java.awt.Graphics2D g)Draws the polygon tool's path durring path creation.voidreactivateTool()Overrides standard tool method to trigger polygon creation when the tool is reactivated.- 
Methods inherited from class com.reportmill.panels.ToolactivateTool, 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, willLoseSuperSelectionInEditor
 - 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getShapeClasspublic java.lang.Class getShapeClass() Returns the class that this tool is responsible for.- Overrides:
- getShapeClassin class- Tool
 
 - 
newInstancepublic RMShape newInstance() Returns a new instance of the shape class that this tool is responsible for.- Overrides:
- newInstancein class- Tool
 
 - 
getSmoothPathOnMouseUppublic boolean getSmoothPathOnMouseUp() Returns whether tool should smooth path segments during creation.
 - 
mousePressedpublic void mousePressed(java.awt.event.MouseEvent anEvent) Handles mouse pressed for polygon creation.- Overrides:
- mousePressedin class- Tool
 
 - 
mouseDraggedpublic void mouseDragged(java.awt.event.MouseEvent anEvent) Handles mouse dragged for polygon creation.- Overrides:
- mouseDraggedin class- Tool
 
 - 
mouseReleasedpublic void mouseReleased(java.awt.event.MouseEvent anEvent) Handles mouse released for polygon creation.- Overrides:
- mouseReleasedin class- Tool
 
 - 
mouseMovedpublic void mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling - overridden to maintain default cursor.- Overrides:
- mouseMovedin class- Tool
 
 - 
mousePressedpublic void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling for shape editing.- Overrides:
- mousePressedin class- Tool
 
 - 
mouseDraggedpublic void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling for shape editing.- Overrides:
- mouseDraggedin class- Tool
 
 - 
deactivateToolpublic void deactivateTool() Overrides standard tool method to trigger polygon creation when the tool is deactivated.- Overrides:
- deactivateToolin class- Tool
 
 - 
reactivateToolpublic void reactivateTool() Overrides standard tool method to trigger polygon creation when the tool is reactivated.- Overrides:
- reactivateToolin class- Tool
 
 
- 
 
-