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:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener
  Direct Known Subclasses:
    JoinMode, SelectMode

      public abstract class AbstractMode
      extends java.awt.event.MouseAdapter
      implements org.openstreetmap.josm.gui.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(java.awt.Point clickPoint)`
    `abstract void` | `paint(java.awt.Graphics2D g, org.openstreetmap.josm.gui.MapView mv, org.openstreetmap.josm.data.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(java.awt.Point clickPoint)

    - #### paint

          public abstract void paint(java.awt.Graphics2D g,
                                     org.openstreetmap.josm.gui.MapView mv,
                                     org.openstreetmap.josm.data.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 `org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener`

    - #### resetThread

          public static void resetThread()

      Resets the semiautomatic mode thread.

JOSM Plugins