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 java.lang.Object
      implements ITileDownloadingTaskListener, StreetsideDataListener

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `cancelled`
    `private StreetsideCubemap` | `cubemap`
    `private static CubemapBuilder` | `instance`
    `(package private) static org.apache.log4j.Logger` | `logger`
    `private long` | `startTime`
    `private java.util.Map<java.lang.String,java.awt.image.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(java.lang.String imageId)`
    `StreetsideCubemap` | `getCubemap()`
    `static CubemapBuilder` | `getInstance()`
    `java.util.Map<java.lang.String,java.awt.image.BufferedImage>` | `getTileImages()`
    `static boolean` | `hasInstance()`
    `void` | `imagesAdded()` Fired when any image is added to the database.
    `void` | `reload(java.lang.String imageId)`
    `private void` | `resetTileImages()`
    `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(java.util.Map<java.lang.String,java.awt.image.BufferedImage> tileImages)`
    `void` | `tileAdded(java.lang.String tileId)` Fired when a cubemap tile image is downloaded by a download worker.
    `void` | `tilesAdded(java.lang.String[] tileIds)` Fired when multiple cubemap tile images are 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

    - #### logger

          static final org.apache.log4j.Logger logger

    - #### instance

          private static CubemapBuilder instance

    - #### cubemap

          private StreetsideCubemap cubemap

    - #### cancelled

          protected boolean cancelled

    - #### startTime

          private long startTime

    - #### tileImages

          private java.util.Map<java.lang.String,java.awt.image.BufferedImage> tileImages

  - ### Constructor Detail

    - #### CubemapBuilder

          private CubemapBuilder()

  - ### Method Detail

    - #### getTileImages

          public java.util.Map<java.lang.String,java.awt.image.BufferedImage> getTileImages()

      Returns:
        the tileImages

    - #### setTileImages

          public void setTileImages(java.util.Map<java.lang.String,java.awt.image.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(java.lang.String imageId)

    - #### downloadCubemapImages

          public void downloadCubemapImages(java.lang.String imageId)

    - #### tileAdded

          public void tileAdded(java.lang.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

    - #### tilesAdded

          public void tilesAdded(java.lang.String[] tileIds)

      Description copied from interface: `ITileDownloadingTaskListener`
      Fired when multiple cubemap tile images are downloaded by a download worker.
      Specified by:
        `tilesAdded` in interface `ITileDownloadingTaskListener`
      Parameters:
        `tileIds` - image id

    - #### buildCubemapFaces

          private void buildCubemapFaces()

    - #### resetTileImages

          private void resetTileImages()

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