org.openstreetmap.josm.plugins.streetside.cubemap

## Class CubemapBuilder

- java.lang.Object
- - org.openstreetmap.josm.plugins.streetside.cubemap.CubemapBuilder

- All Implemented Interfaces:
    ITileDownloadingTaskListener, StreetsideDataListener

      public class CubemapBuilder
      extends Object
      implements ITileDownloadingTaskListener, StreetsideDataListener

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `cancelled`
    `private StreetsideCubemap` | `cubemap`
    `private static CubemapBuilder` | `instance`
    `private long` | `startTime`
    `private StreetsideViewerHelpPopup` | `streetsideViewerHelp`
    `private Map<String,BufferedImage>` | `tileImages`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `CubemapBuilder()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `buildCubemapFaces()`
    `static void` | `destroyInstance()` Destroys the unique instance of the class.
    `void` | `downloadCubemapImages(String imageId)`
    `StreetsideCubemap` | `getCubemap()`
    `static CubemapBuilder` | `getInstance()`
    `Map<String,BufferedImage>` | `getTileImages()`
    `static boolean` | `hasInstance()`
    `void` | `imagesAdded()` Fired when any image is added to the database.
    `void` | `reload(String imageId)`
    `void` | `selectedImageChanged(StreetsideAbstractImage oldImage, StreetsideAbstractImage newImage)` Fired when the selected image is changed by something different from manually clicking on the icon.
    `static void` | `setCubemap(StreetsideCubemap cubemap)`
    `void` | `setTileImages(Map<String,BufferedImage> tileImages)`
    `void` | `tileAdded(String tileId)` Fired when a cubemap tile image is downloaded by a download worker.

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

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

- - ### Field Detail

    - #### instance

          private static CubemapBuilder instance

    - #### streetsideViewerHelp

          private StreetsideViewerHelpPopup streetsideViewerHelp

    - #### cubemap

          private StreetsideCubemap cubemap

    - #### cancelled

          protected boolean cancelled

    - #### startTime

          private long startTime

    - #### tileImages

          private Map<String,BufferedImage> tileImages

  - ### Constructor Detail

    - #### CubemapBuilder

          private CubemapBuilder()

      Parameters:
        `tileImages` - the tileImages to set

  - ### Method Detail

    - #### getTileImages

          public Map<String,BufferedImage> getTileImages()

      Returns:
        the tileImages

    - #### setTileImages

          public void setTileImages(Map<String,BufferedImage> tileImages)

      Parameters:
        `tileImages` - the tileImages to set

    - #### imagesAdded

          public void imagesAdded()

      Description copied from interface: `StreetsideDataListener`
      Fired when any image is added to the database.
      Specified by:
        `imagesAdded` in interface `StreetsideDataListener`

    - #### selectedImageChanged

          public void selectedImageChanged(StreetsideAbstractImage oldImage,
                                           StreetsideAbstractImage newImage)

      Description copied from interface: `StreetsideDataListener`
      Fired when the selected image is changed by something different from manually clicking on the icon.
      Specified by:
        `selectedImageChanged` in interface `StreetsideDataListener`
      Parameters:
        `oldImage` - Old selected `StreetsideAbstractImage`
        `newImage` - New selected `StreetsideAbstractImage`

    - #### reload

          public void reload(String imageId)

    - #### downloadCubemapImages

          public void downloadCubemapImages(String imageId)

    - #### tileAdded

          public void tileAdded(String tileId)

      Description copied from interface: `ITileDownloadingTaskListener`
      Fired when a cubemap tile image is downloaded by a download worker.
      Specified by:
        `tileAdded` in interface `ITileDownloadingTaskListener`
      Parameters:
        `tileId` - image id

    - #### buildCubemapFaces

          private void buildCubemapFaces()

    - #### getCubemap

          public StreetsideCubemap getCubemap()

      Returns:
        the cubemap

    - #### setCubemap

          public static void setCubemap(StreetsideCubemap cubemap)

      Parameters:
        `cubemap` - the cubemap to set

    - #### getInstance

          public static CubemapBuilder getInstance()

    - #### hasInstance

          public static boolean hasInstance()

      Returns:
        true, iff the singleton instance is present

    - #### destroyInstance

          public static void destroyInstance()

      Destroys the unique instance of the class.

JOSM Plugins