Package kiyut.sketsa.canvas.tool

## Class DropperTool

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

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

      public class DropperTool
      extends AbstractTool

  Implementation of Dropper Tool aka Color Picker
  Author:
    Kiyut

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected VectorCanvas` | `canvas` |
    `protected Color` | `color` |
    `static String` | `COLOR_PROPERTY` |
    `protected Cursor` | `cursor` |
    `protected EventListenerList` | `listenerList` |
    `protected GeneralPath` | `path` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPropertyChangeListener​(PropertyChangeListener listener)` |
    `void` | `endTool()` | Invoked when the tool is ended
    `protected void` | `firePropertyChange​(String propertyName, Object oldValue, Object newValue)` |
    `Color` | `getColor()` | Return the Dropper acquired `Color`
    `void` | `mouseReleased​(MouseEvent evt)` |
    `void` | `removePropertyChangeListener​(PropertyChangeListener listener)` |
    `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, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, paint, removeMessageListener`

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

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

- - ### Field Detail

    - #### COLOR_PROPERTY

          public static final String COLOR_PROPERTY

      See Also:
        Constant Field Values

    - #### canvas

          protected VectorCanvas canvas

    - #### path

          protected GeneralPath path

    - #### cursor

          protected Cursor cursor

    - #### color

          protected Color color

    - #### listenerList

          protected EventListenerList listenerList

  - ### Constructor Detail

    - #### DropperTool

          public DropperTool()

      Creates a new instance of LassoTool

  - ### Method Detail

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

    - #### getColor

          public Color getColor()

      Return the Dropper acquired `Color`
      Returns:
        `Color` or null

    - #### mouseReleased

          public void mouseReleased​(MouseEvent evt)

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

    - #### addPropertyChangeListener

          public void addPropertyChangeListener​(PropertyChangeListener listener)

    - #### removePropertyChangeListener

          public void removePropertyChangeListener​(PropertyChangeListener listener)

    - #### firePropertyChange

          protected void firePropertyChange​(String propertyName,
                                            Object oldValue,
                                            Object newValue)