protected class DrawToolFactory.AbstractCurveDrawTool extends MouseTool
The drawing sequence is as follows : OPEN curve : mpress add 0,1,2,3->drag 1->move 3->mpress add 4,5,6->drag 4->move 6->... CLOSED curve : mpress add 0,1,2->drag 1->mrel add 3,4,5->move 3->mpress->drag 4->mrel add 6,7,8->move and is terminated by a right-button click.
lastMouseEvent, mouseOutside| Constructor and Description |
|---|
AbstractCurveDrawTool(AbstractCurve prototype) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
called when this tool is being replaced by another mouse-tool in the hosting
editor kit ; this is mainly for mousetools using more than one sequence, for it
gives them a chance to clean themselves up for the next time
|
void |
init()
called when this tool is being activated in the hosting editor kit
|
void |
mouseDragged(PEMouseEvent e)
set the current point
|
void |
mouseMoved(PEMouseEvent e)
set cursor for canvas, then call mouseDragged
|
void |
mousePressed(PEMouseEvent e)
A popup-trigger mouse event (e.g.
|
void |
mouseReleased(PEMouseEvent e)
CLOSED curve only : add a new point by splitting last segment
|
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
This method is called by the hosting EditorKit : this implementation paints
the current element's highlighter.
|
getLastMouseEvent, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, processKeyEventpublic AbstractCurveDrawTool(AbstractCurve prototype)
prototype - Prototype which will be cloned, then added to the drawing.public void mousePressed(PEMouseEvent e)
mousePressed in interface PEMouseInputListenermousePressed in class MouseToolpublic void mouseReleased(PEMouseEvent e)
mouseReleased in interface PEMouseInputListenermouseReleased in class MouseToolpublic void mouseDragged(PEMouseEvent e)
mouseDragged in interface PEMouseInputListenermouseDragged in class MouseToolpublic void mouseMoved(PEMouseEvent e)
mouseMoved in interface PEMouseInputListenermouseMoved in class MouseToolpublic void init()
public void flush()
Submit a bug : syd@jpicedt.org