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.RMShapeHandle
HandleMaxXMaxY, 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, willLoseSuperSelectionInEditor
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public java.lang.Class getShapeClass()
getShapeClass
in class Tool
public RMShape newInstance()
newInstance
in class Tool
public boolean getSmoothPathOnMouseUp()
public void mousePressed(java.awt.event.MouseEvent anEvent)
mousePressed
in class Tool
public void mouseDragged(java.awt.event.MouseEvent anEvent)
mouseDragged
in class Tool
public void mouseReleased(java.awt.event.MouseEvent anEvent)
mouseReleased
in class Tool
public void mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)
mouseMoved
in class Tool
public void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
mousePressed
in class Tool
public void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
mouseDragged
in class Tool
public void deactivateTool()
deactivateTool
in class Tool
public void reactivateTool()
reactivateTool
in class Tool