public class PolygonTool extends Tool
| Modifier and Type | Class and Description |
|---|---|
static class |
PolygonTool.PencilTool
This inner class defines a polygon tool subclass for drawing freehand pencil sketches instead.
|
Tool.RMShapeHandleHandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth| Constructor and Description |
|---|
PolygonTool() |
| Modifier and Type | Method and Description |
|---|---|
void |
deactivateTool()
Overrides standard tool method to trigger polygon creation when the tool is deactivated.
|
java.lang.Class |
getShapeClass()
Returns the class that this tool is responsible for.
|
boolean |
getSmoothPathOnMouseUp()
Returns whether tool should smooth path segments during creation.
|
void |
mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged for polygon creation.
|
void |
mouseDragged(RMShape aShape,
java.awt.event.MouseEvent anEvent)
Event handling for shape editing.
|
void |
mouseMoved(RMShape aShape,
java.awt.event.MouseEvent anEvent)
Event handling - overridden to maintain default cursor.
|
void |
mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed for polygon creation.
|
void |
mousePressed(RMShape aShape,
java.awt.event.MouseEvent anEvent)
Event handling for shape editing.
|
void |
mouseReleased(java.awt.event.MouseEvent anEvent)
Handles mouse released for polygon creation.
|
RMShape |
newInstance()
Returns a new instance of the shape class that this tool is responsible for.
|
void |
paintTool(java.awt.Graphics2D g)
Draws the polygon tool's path durring path creation.
|
void |
reactivateTool()
Overrides standard tool method to trigger polygon creation when the tool is reactivated.
|
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, willLoseSuperSelectionInEditorclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEqualspublic java.lang.Class getShapeClass()
getShapeClass in class Toolpublic RMShape newInstance()
newInstance in class Toolpublic boolean getSmoothPathOnMouseUp()
public void mousePressed(java.awt.event.MouseEvent anEvent)
mousePressed in class Toolpublic void mouseDragged(java.awt.event.MouseEvent anEvent)
mouseDragged in class Toolpublic void mouseReleased(java.awt.event.MouseEvent anEvent)
mouseReleased in class Toolpublic void mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)
mouseMoved in class Toolpublic void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
mousePressed in class Toolpublic void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
mouseDragged in class Toolpublic void deactivateTool()
deactivateTool in class Toolpublic void reactivateTool()
reactivateTool in class Tool