Package kiyut.sketsa.canvas.tool

## Class TextTool

- java.lang.Object
- - kiyut.sketsa.canvas.tool.AbstractTool
  - - kiyut.sketsa.canvas.tool.TextTool

- All Implemented Interfaces:
    `KeyListener`, `MouseListener`, `MouseMotionListener`, `EventListener`, `MouseInputListener`, `Tool`

      public class TextTool
      extends AbstractTool

  Implementation of Text Tool
  Author:
    Kiyut

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TextTool()` | Creates a new instance of TextTool

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected org.w3c.dom.svg.SVGElement` | `createSVGElement()` |
    `void` | `endTool()` | Invoked when the tool is ended
    `void` | `keyPressed​(KeyEvent evt)` |
    `void` | `keyReleased​(KeyEvent evt)` |
    `void` | `keyTyped​(KeyEvent evt)` |
    `void` | `mouseClicked​(MouseEvent evt)` |
    `void` | `mouseDragged​(MouseEvent evt)` |
    `void` | `mousePressed​(MouseEvent evt)` |
    `void` | `mouseReleased​(MouseEvent evt)` |
    `void` | `paint​(Graphics2D g2d)` | Invoked by canvas to draw tool.
    `void` | `setVectorCanvas​(VectorCanvas canvas)` | set the canvas for the tool
    `void` | `startTool()` | Invoked when the tool is started

    - ### Methods inherited from class kiyut.sketsa.canvas.tool.AbstractTool

      `addMessageListener, fireMessageReceived, mouseEntered, mouseExited, mouseMoved, removeMessageListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextTool

          public TextTool()

      Creates a new instance of TextTool

  - ### Method Detail

    - #### paint

          public void paint​(Graphics2D g2d)

      Description copied from interface: `Tool`
      Invoked by canvas to draw tool.
      Specified by:
        `paint` in interface `Tool`
      Overrides:
        `paint` in class `AbstractTool`
      Parameters:
        `g2d` - the Graphics2D context in which to paint

    - #### setVectorCanvas

          public void setVectorCanvas​(VectorCanvas canvas)

      Description copied from interface: `Tool`
      set the canvas for the tool
      Specified by:
        `setVectorCanvas` in interface `Tool`
      Overrides:
        `setVectorCanvas` in class `AbstractTool`
      Parameters:
        `canvas` - VectorCanvas

    - #### startTool

          public void startTool()

      Description copied from interface: `Tool`
      Invoked when the tool is started
      Specified by:
        `startTool` in interface `Tool`
      Overrides:
        `startTool` in class `AbstractTool`

    - #### endTool

          public void endTool()

      Description copied from interface: `Tool`
      Invoked when the tool is ended
      Specified by:
        `endTool` in interface `Tool`
      Overrides:
        `endTool` in class `AbstractTool`

    - #### createSVGElement

          protected org.w3c.dom.svg.SVGElement createSVGElement()

    - #### mouseClicked

          public void mouseClicked​(MouseEvent evt)

      Specified by:
        `mouseClicked` in interface `MouseListener`
      Overrides:
        `mouseClicked` in class `AbstractTool`

    - #### mousePressed

          public void mousePressed​(MouseEvent evt)

      Specified by:
        `mousePressed` in interface `MouseListener`
      Overrides:
        `mousePressed` in class `AbstractTool`

    - #### mouseReleased

          public void mouseReleased​(MouseEvent evt)

      Specified by:
        `mouseReleased` in interface `MouseListener`
      Overrides:
        `mouseReleased` in class `AbstractTool`

    - #### mouseDragged

          public void mouseDragged​(MouseEvent evt)

      Specified by:
        `mouseDragged` in interface `MouseMotionListener`
      Overrides:
        `mouseDragged` in class `AbstractTool`

    - #### keyTyped

          public void keyTyped​(KeyEvent evt)

      Specified by:
        `keyTyped` in interface `KeyListener`
      Overrides:
        `keyTyped` in class `AbstractTool`

    - #### keyPressed

          public void keyPressed​(KeyEvent evt)

      Specified by:
        `keyPressed` in interface `KeyListener`
      Overrides:
        `keyPressed` in class `AbstractTool`

    - #### keyReleased

          public void keyReleased​(KeyEvent evt)

      Specified by:
        `keyReleased` in interface `KeyListener`
      Overrides:
        `keyReleased` in class `AbstractTool`