Package kiyut.sketsa.canvas.tool.point

## Class AbstractPointTool

- java.lang.Object
- - kiyut.sketsa.canvas.tool.AbstractTool
  - - kiyut.sketsa.canvas.tool.point.AbstractPointTool

- All Implemented Interfaces:
    `KeyListener`, `MouseListener`, `MouseMotionListener`, `EventListener`, `MouseInputListener`, `PointTool`, `Tool`
  Direct Known Subclasses:
    `AddPointTool`, `MovePointTool`, `RemovePointTool`

      public abstract class AbstractPointTool
      extends AbstractTool
      implements PointTool

  This is a convenience class to implement PointTool
  Author:
    KIYUT

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected VectorCanvas` | `canvas` |
    `protected PointToolModel` | `model` |
    `protected Stroke` | `stroke` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `endTool()` | Invoked when the tool is ended
    `PointToolModel` | `getModel()` | Return `PointToolModel`
    `void` | `paint​(Graphics2D g2d)` | Invoked by canvas to draw tool.
    `void` | `setVectorCanvas​(VectorCanvas canvas)` | set the canvas for the tool

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

      `addMessageListener, fireMessageReceived, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, removeMessageListener, startTool`

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

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

    - ### Methods inherited from interface java.awt.event.KeyListener

      `keyPressed, keyReleased, keyTyped`

    - ### Methods inherited from interface java.awt.event.MouseListener

      `mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased`

    - ### Methods inherited from interface java.awt.event.MouseMotionListener

      `mouseDragged, mouseMoved`

    - ### Methods inherited from interface kiyut.sketsa.canvas.tool.Tool

      `addMessageListener, removeMessageListener, startTool`

- - ### Field Detail

    - #### canvas

          protected VectorCanvas canvas

    - #### model

          protected PointToolModel model

    - #### stroke

          protected Stroke stroke

  - ### Constructor Detail

    - #### AbstractPointTool

          public AbstractPointTool()

      Creates a new instance of AbstractPointTool

  - ### 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

    - #### getModel

          public PointToolModel getModel()

      Description copied from interface: `PointTool`
      Return `PointToolModel`
      Specified by:
        `getModel` in interface `PointTool`
      Returns:
        `PointToolModel`

    - #### 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`