public class LineSegmentTool extends Tool
Tool.RMShapeHandle
Modifier and Type | Field and Description |
---|---|
static byte |
HandleEndPoint |
static byte |
HandleStartPoint |
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
Constructor and Description |
---|
LineSegmentTool() |
Modifier and Type | Method and Description |
---|---|
int |
getHandleCount(RMShape aShape)
Editor method (returns the number of handles).
|
RMPoint |
getHandlePoint(RMShape aShape,
int anIndex,
boolean isSuperSelected)
Editor method.
|
java.lang.Class |
getShapeClass()
Returns the shape class that this tool is responsible for.
|
java.lang.String |
getWindowTitle()
Returns the name of this tool to be displayed by inspector.
|
void |
mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse drag for line creation.
|
void |
mouseMoved(java.awt.event.MouseEvent anEvent)
Event handling - overridden to install crosshair cursor.
|
void |
mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse press for line creation.
|
void |
moveShapeHandle(RMShape aShape,
int aHandle,
RMPoint aPoint)
Editor method.
|
activateTool, deactivateTool, didBecomeSuperSelectedShapeInEditor, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeHandleAtPoint, getTool, getTool, getUI, isInstance, isSelected, isSuperSelected, mouseDragged, mouseMoved, mousePressed, mousePressedSelection, mouseReleased, mouseReleased, newInstance, paintSelectedShape, paintSuperSelectedShape, paintTool, processKeyEvent, reactivateTool, resetUI, respondUI, willLoseSuperSelectionInEditor
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public static final byte HandleStartPoint
public static final byte HandleEndPoint
public java.lang.Class getShapeClass()
getShapeClass
in class Tool
public java.lang.String getWindowTitle()
getWindowTitle
in class Tool
public void mouseMoved(java.awt.event.MouseEvent anEvent)
mouseMoved
in class Tool
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 int getHandleCount(RMShape aShape)
getHandleCount
in class Tool
public RMPoint getHandlePoint(RMShape aShape, int anIndex, boolean isSuperSelected)
getHandlePoint
in class Tool
public void moveShapeHandle(RMShape aShape, int aHandle, RMPoint aPoint)
moveShapeHandle
in class Tool