org.openstreetmap.josm.plugins.streetside.mode

## Class AbstractMode

- java.lang.Object
- - java.awt.event.MouseAdapter
  - - org.openstreetmap.josm.plugins.streetside.mode.AbstractMode

- All Implemented Interfaces:
    MouseListener, MouseMotionListener, MouseWheelListener, EventListener, NavigatableComponent.ZoomChangeListener
  Direct Known Subclasses:
    JoinMode, SelectMode

      public abstract class AbstractMode
      extends MouseAdapter
      implements NavigatableComponent.ZoomChangeListener

  Superclass for all the mode of the `StreetsideLayer`.
  See Also:
    `StreetsideLayer`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private static class` | `AbstractMode.SemiautomaticThread`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `cursor` Cursor that should become active when this mode is activated.
    `private static int` | `DOWNLOAD_COOLDOWN`
    `private static AbstractMode.SemiautomaticThread` | `semiautomaticThread`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMode()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected StreetsideAbstractImage` | `getClosest(Point clickPoint)`
    `abstract void` | `paint(Graphics2D g, MapView mv, Bounds box)` Paint the dataset using the engine set.
    `static void` | `resetThread()` Resets the semiautomatic mode thread.
    `void` | `zoomChanged()`

    - ### Methods inherited from class java.awt.event.MouseAdapter

      `mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved`

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

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

- - ### Field Detail

    - #### DOWNLOAD_COOLDOWN

          private static final int DOWNLOAD_COOLDOWN

      See Also:
        Constant Field Values

    - #### semiautomaticThread

          private static AbstractMode.SemiautomaticThread semiautomaticThread

    - #### cursor

          public int cursor

      Cursor that should become active when this mode is activated.

  - ### Constructor Detail

    - #### AbstractMode

          public AbstractMode()

  - ### Method Detail

    - #### getClosest

          protected StreetsideAbstractImage getClosest(Point clickPoint)

    - #### paint

          public abstract void paint(Graphics2D g,
                                     MapView mv,
                                     Bounds box)

      Paint the dataset using the engine set.
      Parameters:
        `g` - `Graphics2D` used for painting
        `mv` - The object that can translate GeoPoints to screen coordinates.
        `box` - Area where painting is going to be performed

    - #### zoomChanged

          public void zoomChanged()

      Specified by:
        `zoomChanged` in interface `NavigatableComponent.ZoomChangeListener`

    - #### resetThread

          public static void resetThread()

      Resets the semiautomatic mode thread.

JOSM Plugins