Package kiyut.sketsa.canvas.tool

## Interface Tool

- All Superinterfaces:
    `EventListener`, `KeyListener`, `MouseInputListener`, `MouseListener`, `MouseMotionListener`
  All Known Subinterfaces:
    `MoveTool`, `PointTool`, `ResizeTool`, `SelectionTool`
  All Known Implementing Classes:
    `AbstractPointTool`, `AbstractSelectionTool`, `AbstractTool`, `AddPointTool`, `DefaultMoveTool`, `DefaultResizeTool`, `DefaultSelectionTool`, `DirectSelectionTool`, `DropperTool`, `EllipseTool`, `ImageTool`, `LassoTool`, `LineTool`, `MovePointTool`, `PanTool`, `PencilTool`, `PenTool`, `PolyTool`, `RectangleTool`, `RemovePointTool`, `RotateTool`, `ScaleTool`, `SkewTool`, `TextTool`, `TranslateTool`, `ZoomInTool`, `ZoomOutTool`, `ZoomTool`

      public interface Tool
      extends KeyListener, MouseInputListener

  Canvas Tool interface
  Author:
    Kiyut

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMessageListener​(MessageListener l)` | Add listener to the tool that notifies about message
    `void` | `endTool()` | Invoked when the tool is ended
    `void` | `paint​(Graphics2D g2d)` | Invoked by canvas to draw tool.
    `void` | `removeMessageListener​(MessageListener l)` | remove listener to the tool that notifies about message
    `void` | `setVectorCanvas​(VectorCanvas canvas)` | set the canvas for the tool
    `void` | `startTool()` | Invoked when the tool is started

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

- - ### Method Detail

    - #### paint

          void paint​(Graphics2D g2d)

      Invoked by canvas to draw tool.
      Parameters:
        `g2d` - the Graphics2D context in which to paint

    - #### setVectorCanvas

          void setVectorCanvas​(VectorCanvas canvas)

      set the canvas for the tool
      Parameters:
        `canvas` - VectorCanvas

    - #### startTool

          void startTool()

      Invoked when the tool is started

    - #### endTool

          void endTool()

      Invoked when the tool is ended

    - #### addMessageListener

          void addMessageListener​(MessageListener l)

      Add listener to the tool that notifies about message
      Parameters:
        `l` - `MessageListener`

    - #### removeMessageListener

          void removeMessageListener​(MessageListener l)

      remove listener to the tool that notifies about message
      Parameters:
        `l` - `MessageListener`