http://www.jpicedt.org

jpicedt.graphic.toolkit
Class DrawToolFactory.TextDrawTool

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by jpicedt.graphic.toolkit.MouseTool
          extended by jpicedt.graphic.toolkit.DrawToolFactory.TextDrawTool
All Implemented Interfaces:
KeyListener, 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.
author: Sylvain Reynal

Since:
jPicEdt

Nested Class Summary
 
Nested classes/interfaces inherited from class jpicedt.graphic.toolkit.MouseTool
MouseTool.MouseToolType
 
Field Summary
 
Fields inherited from class jpicedt.graphic.toolkit.MouseTool
lastMouseEvent, mouseOutside
 
Constructor Summary
DrawToolFactory.TextDrawTool(PicText prototype)
           
 
Method Summary
 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 keyPressed(KeyEvent e)
          Triggers a fake "mouseMoved" event when a key is pressed.
 void keyReleased(KeyEvent e)
          Triggers a fake "mouseMoved" event when a key is released.
 void keyTyped(KeyEvent e)
           
 void mouseDragged(PEMouseEvent e)
          do nothing
 void mouseMoved(PEMouseEvent e)
          set cursor for canvas, then call mouseDragged
 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.
 
Methods inherited from class jpicedt.graphic.toolkit.MouseTool
getLastMouseEvent, mouseClicked, mouseEntered, mouseExited, mouseReleased, paint, processKeyEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawToolFactory.TextDrawTool

public DrawToolFactory.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): A left- or middle-button SINGLE click either:
author: Sylvain Reynal

Specified by:
mousePressed in interface PEMouseInputListener
Overrides:
mousePressed in class MouseTool
Since:
jPicEdt

mouseDragged

public void mouseDragged(PEMouseEvent e)
do nothing

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

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

keyPressed

public void keyPressed(KeyEvent e)
Description copied from class: MouseTool
Triggers a fake "mouseMoved" event when a key is pressed. Current implementation merely calls MouseTool.processKeyEvent(java.awt.event.KeyEvent, boolean).

Specified by:
keyPressed in interface KeyListener
Overrides:
keyPressed in class MouseTool

keyReleased

public void keyReleased(KeyEvent e)
Description copied from class: MouseTool
Triggers a fake "mouseMoved" event when a key is released. Current implementation merely calls MouseTool.processKeyEvent(java.awt.event.KeyEvent, boolean).

Specified by:
keyReleased in interface KeyListener
Overrides:
keyReleased in class MouseTool

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener
Overrides:
keyTyped in class KeyAdapter

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org