jpicedt.graphic.toolkit
Class ConvexZoneToolFactory.ConvexZoneToolBase
java.lang.Object
java.awt.event.KeyAdapter
jpicedt.graphic.toolkit.MouseTool
jpicedt.graphic.toolkit.ConvexZoneTool
jpicedt.graphic.toolkit.ConvexZoneToolFactory.ConvexZoneToolBase
- All Implemented Interfaces:
- KeyListener, EventListener, PEMouseInputListener
- Direct Known Subclasses:
- ConvexZoneToolFactory.BandShapedConvexZoneTool, ConvexZoneToolFactory.ExtensibleConvexZoneTool, ConvexZoneToolFactory.HalfPlaneConvexZoneTool, ConvexZoneToolFactory.RectangleConvexZoneTool, ConvexZoneToolFactory.UShapedConvexZoneTool
- Enclosing class:
- ConvexZoneToolFactory
protected abstract class ConvexZoneToolFactory.ConvexZoneToolBase
- extends ConvexZoneTool
Method Summary |
protected void |
doMouseMoved(PEMouseEvent e)
|
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 |
Cursor |
getCursor()
|
void |
init()
called when this tool is being activated in the hosting editor kit |
void |
mouseDragged(PEMouseEvent e)
set current point |
void |
mouseMoved(PEMouseEvent e)
set cursor for canvas, then call mouseDragged |
void |
mousePressed(PEMouseEvent e)
this default implementation simply stores the given mouse-event in lastMouseEvent field |
void |
paint(Graphics2D g,
Rectangle2D allocation,
double scale)
This method is called by the hosting EditorKit : this implementation paints
the current element's highlighter. |
void |
setCurrentPoint(PEMouseEvent e)
move the points indexed in drawPoints[currentTaskIndex] to the current click-point
(possibly after grid alignment). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pointCount
protected int pointCount
ConvexZoneToolFactory.ConvexZoneToolBase
public ConvexZoneToolFactory.ConvexZoneToolBase(int pointCount,
String type)
mousePressed
public void mousePressed(PEMouseEvent e)
- Description copied from class:
MouseTool
- this default implementation simply stores the given mouse-event in
lastMouseEvent
field
- Specified by:
mousePressed
in interface PEMouseInputListener
- Overrides:
mousePressed
in class MouseTool
doMouseMoved
protected void doMouseMoved(PEMouseEvent e)
mouseDragged
public void mouseDragged(PEMouseEvent e)
- set current point
- Specified by:
mouseDragged
in interface PEMouseInputListener
- Overrides:
mouseDragged
in class MouseTool
mouseMoved
public void mouseMoved(PEMouseEvent e)
- set cursor for canvas, then call mouseDragged
- Specified by:
mouseMoved
in interface PEMouseInputListener
- Overrides:
mouseMoved
in class MouseTool
setCurrentPoint
public void setCurrentPoint(PEMouseEvent e)
- move the points indexed in drawPoints[currentTaskIndex] to the current click-point
(possibly after grid alignment).
init
public void init()
- called when this tool is being activated in the hosting editor kit
- Overrides:
init
in class MouseTool
flush
public 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
- Overrides:
flush
in class MouseTool
paint
public void paint(Graphics2D g,
Rectangle2D allocation,
double scale)
- This method is called by the hosting EditorKit : this implementation paints
the current element's highlighter.
- Overrides:
paint
in class MouseTool
getCursor
public Cursor getCursor()
Submit a bug : syd@jpicedt.org