Package jpicedt.graphic.toolkit
Class DrawToolFactory.TextDrawTool
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- jpicedt.graphic.toolkit.MouseTool
-
- jpicedt.graphic.toolkit.DrawToolFactory.TextDrawTool
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.util.EventListener,PEMouseInputListener
- Enclosing class:
- DrawToolFactory
protected class DrawToolFactory.TextDrawTool extends MouseTool
A tool used to place PicText's ; it opens a dialog box for editing text content.- Since:
- jPicEdt
- Author:
- Sylvain Reynal
-
-
Field Summary
-
Fields inherited from class jpicedt.graphic.toolkit.MouseTool
lastMouseEvent, mouseOutside
-
-
Constructor Summary
Constructors Constructor Description TextDrawTool(PicText prototype)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()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 timevoidinit()called when this tool is being activated in the hosting editor kitvoidmouseDragged(PEMouseEvent e)do nothingvoidmouseMoved(PEMouseEvent e)set cursor for canvas, then call mouseDraggedvoidmousePressed(PEMouseEvent e)A popup-trigger mouse event (e.g.-
Methods inherited from class jpicedt.graphic.toolkit.MouseTool
getLastMouseEvent, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, mouseReleased, paint, processKeyEvent
-
-
-
-
Constructor Detail
-
TextDrawTool
public TextDrawTool(PicText prototype)
- Parameters:
prototype- the Element that will serve as the prototype (getting cloned, then added to the drawing).
-
-
Method Detail
-
mousePressed
public void mousePressed(PEMouseEvent e)
A popup-trigger mouse event (e.g. a right click on Unix/Windows) :
- switches back to SELECT_MODE if the task-iterator is completed
- or cancels the current task if the task-iterator is underway.
A left- or middle-button SINGLE click either :
- (re)start the task iterator if it was completed
- or select the next point if there are more points
- or terminate the drawing process if there are no more points.- Specified by:
mousePressedin interfacePEMouseInputListener- Overrides:
mousePressedin classMouseTool- Since:
- jPicEdt
-
mouseDragged
public void mouseDragged(PEMouseEvent e)
do nothing- Specified by:
mouseDraggedin interfacePEMouseInputListener- Overrides:
mouseDraggedin classMouseTool
-
mouseMoved
public void mouseMoved(PEMouseEvent e)
set cursor for canvas, then call mouseDragged- Specified by:
mouseMovedin interfacePEMouseInputListener- Overrides:
mouseMovedin classMouseTool
-
init
public void init()
called when this tool is being activated in the hosting editor kit
-
-