Package kiyut.sketsa.canvas.text

## Class DefaultTextEditor

- java.lang.Object
- - kiyut.sketsa.canvas.text.TextEditor
  - - kiyut.sketsa.canvas.text.DefaultTextEditor

-     public class DefaultTextEditor
      extends TextEditor

  Canvas Text Editor. It is used to handle SVG Text related element.
  Author:
    Kiyut

- - ### Field Summary

    - ### Fields inherited from class kiyut.sketsa.canvas.text.TextEditor

      `canvas, caret, document, editable, textNode`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `keyPressed​(KeyEvent evt)` | Invoked when a key has been pressed.
    `void` | `keyReleased​(KeyEvent evt)` | Invoked when a key has been released.
    `void` | `keyTyped​(KeyEvent evt)` | Invoked when a key has been typed.
    `void` | `mouseDragged​(MouseEvent evt)` | Invoked when a mouse button is pressed on a component and then dragged.
    `void` | `mousePressed​(MouseEvent evt)` | Invoked when a mouse button has been pressed on a component.
    `void` | `mouseReleased​(MouseEvent evt)` | Invoked when a mouse button has been released on a component.
    `void` | `startEdit()` |
    `void` | `stopEdit()` |

    - ### Methods inherited from class kiyut.sketsa.canvas.text.TextEditor

      `getCaret, getDocument, isEditable, mouseClicked, mouseEntered, mouseExited, mouseMoved, paint, setSVGTextElement, setVectorCanvas`

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

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

- - ### Constructor Detail

    - #### DefaultTextEditor

          public DefaultTextEditor()

      Creates a new instance of DefaultTextEditor

  - ### Method Detail

    - #### stopEdit

          public void stopEdit()

      Specified by:
        `stopEdit` in class `TextEditor`

    - #### startEdit

          public void startEdit()

      Specified by:
        `startEdit` in class `TextEditor`

    - #### keyPressed

          public void keyPressed​(KeyEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a key has been pressed. See the class description for `KeyEvent` for a definition of a key pressed event.
      Overrides:
        `keyPressed` in class `TextEditor`
      Parameters:
        `evt` - KeyEvent object

    - #### keyReleased

          public void keyReleased​(KeyEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a key has been released. See the class description for `KeyEvent` for a definition of a key released event.
      Overrides:
        `keyReleased` in class `TextEditor`
      Parameters:
        `evt` - KeyEvent object

    - #### keyTyped

          public void keyTyped​(KeyEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a key has been typed. See the class description for `KeyEvent` for a definition of a key typed event.
      Overrides:
        `keyTyped` in class `TextEditor`
      Parameters:
        `evt` - KeyEvent object

    - #### mouseDragged

          public void mouseDragged​(MouseEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a mouse button is pressed on a component and then dragged. `MOUSE_DRAGGED` events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

      Due to platform-dependent Dra and Drop implementations, `MOUSE_DRAGGED` events may not be delivered during a native Drag&Drop operation.

      Overrides:
        `mouseDragged` in class `TextEditor`
      Parameters:
        `evt` - MouseEvent object

    - #### mousePressed

          public void mousePressed​(MouseEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a mouse button has been pressed on a component.
      Overrides:
        `mousePressed` in class `TextEditor`
      Parameters:
        `evt` - MouseEvent object

    - #### mouseReleased

          public void mouseReleased​(MouseEvent evt)

      Description copied from class: `TextEditor`
      Invoked when a mouse button has been released on a component.
      Overrides:
        `mouseReleased` in class `TextEditor`
      Parameters:
        `evt` - MouseEvent object