public class StreetsideData extends Object
StreetsideAbstractImage
objects.StreetsideAbstractImage
,
StreetsideSequence
Modifier and Type | Field and Description |
---|---|
private List<Bounds> |
bounds
The bounds of the areas for which the pictures have been downloaded.
|
private StreetsideAbstractImage |
highlightedImage
The image under the cursor.
|
private Set<StreetsideAbstractImage> |
images |
private List<StreetsideDataListener> |
listeners
Listeners of the class.
|
private Set<StreetsideAbstractImage> |
multiSelectedImages
All the images selected, can be more than one.
|
private StreetsideAbstractImage |
selectedImage
The image currently selected, this is the one being shown.
|
Modifier | Constructor and Description |
---|---|
protected |
StreetsideData()
Creates a new object and adds the initial set of listeners.
|
Modifier and Type | Method and Description |
---|---|
void |
add(StreetsideAbstractImage image)
Adds an StreetsideImage to the object, and then repaints mapView.
|
void |
add(StreetsideAbstractImage image,
boolean update)
Adds a StreetsideImage to the object, but doesn't repaint mapView.
|
void |
addAll(Collection<? extends StreetsideAbstractImage> images)
Adds a set of StreetsideImages to the object, and then repaints mapView.
|
void |
addAll(Collection<? extends StreetsideAbstractImage> newImages,
boolean update)
Adds a set of {link StreetsideAbstractImage} objects to this object.
|
void |
addListener(StreetsideDataListener lis)
Adds a new listener.
|
void |
addMultiSelectedImage(Collection<StreetsideAbstractImage> images)
Adds a set of
StreetsideAbstractImage objects to the list of
selected images. |
void |
addMultiSelectedImage(StreetsideAbstractImage image)
Adds a
StreetsideImage object to the list of selected images, (when
ctrl + click) |
static void |
downloadSurroundingCubemaps(StreetsideImage streetsideImage)
Downloads surrounding images of this mapillary image in background threads
|
private static void |
downloadSurroundingImages(StreetsideImage streetsideImage)
Downloads surrounding images of this mapillary image in background threads
|
private void |
fireImagesAdded() |
private void |
fireSelectedImageChanged(StreetsideAbstractImage oldImage,
StreetsideAbstractImage newImage) |
List<Bounds> |
getBounds() |
StreetsideAbstractImage |
getHighlightedImage()
Returns the image under the mouse cursor.
|
Set<StreetsideAbstractImage> |
getImages()
Returns a Set containing all images.
|
Set<StreetsideAbstractImage> |
getMultiSelectedImages()
Returns a List containing all
StreetsideAbstractImage objects
selected with ctrl + click. |
StreetsideAbstractImage |
getSelectedImage()
Returns the StreetsideImage object that is currently selected.
|
Set<StreetsideSequence> |
getSequences()
Returns a Set of all sequences, that the images are part of.
|
void |
removeListener(StreetsideDataListener lis)
Removes a listener.
|
void |
selectNext()
If the selected StreetsideImage is part of a StreetsideSequence then the
following visible StreetsideImage is selected.
|
void |
selectNext(boolean moveToPicture)
If the selected StreetsideImage is part of a StreetsideSequence then the
following visible StreetsideImage is selected.
|
void |
selectPrevious()
If the selected StreetsideImage is part of a StreetsideSequence then the
previous visible StreetsideImage is selected.
|
void |
selectPrevious(boolean moveToPicture)
If the selected StreetsideImage is part of a StreetsideSequence then the
previous visible StreetsideImage is selected.
|
void |
setHighlightedImage(StreetsideAbstractImage image)
Highlights the image under the cursor.
|
void |
setImages(Collection<StreetsideAbstractImage> newImages)
Sets a new
Collection object as the used set of images. |
void |
setSelectedImage(StreetsideAbstractImage image)
Selects a new image.If the user does ctrl + click, this isn't triggered.
|
void |
setSelectedImage(StreetsideAbstractImage image,
boolean zoom)
Selects a new image.If the user does ctrl+click, this isn't triggered.
|
private final Set<StreetsideAbstractImage> images
private StreetsideAbstractImage selectedImage
private StreetsideAbstractImage highlightedImage
private final Set<StreetsideAbstractImage> multiSelectedImages
private final List<StreetsideDataListener> listeners
protected StreetsideData()
public void add(StreetsideAbstractImage image)
image
- The image to be added.public void add(StreetsideAbstractImage image, boolean update)
image
- The image to be added.update
- Whether the map must be updated or not
(updates are currently unsupported by Streetside).public void addAll(Collection<? extends StreetsideAbstractImage> images)
images
- The set of images to be added.public void addAll(Collection<? extends StreetsideAbstractImage> newImages, boolean update)
newImages
- The set of images to be added.update
- Whether the map must be updated or not.public final void addListener(StreetsideDataListener lis)
lis
- Listener to be added.public void addMultiSelectedImage(StreetsideAbstractImage image)
StreetsideImage
object to the list of selected images, (when
ctrl + click)image
- The StreetsideImage
object to be added.public void addMultiSelectedImage(Collection<StreetsideAbstractImage> images)
StreetsideAbstractImage
objects to the list of
selected images.images
- A Collection
object containing the set of images to be added.public void removeListener(StreetsideDataListener lis)
lis
- Listener to be removed.public void setHighlightedImage(StreetsideAbstractImage image)
image
- The image under the cursor.public StreetsideAbstractImage getHighlightedImage()
public Set<StreetsideAbstractImage> getImages()
public Set<StreetsideSequence> getSequences()
public StreetsideAbstractImage getSelectedImage()
private void fireImagesAdded()
public void selectNext()
IllegalStateException
- if the selected image is null or the selected image doesn't
belong to a sequence.public void selectNext(boolean moveToPicture)
moveToPicture
- True if the view must me moved to the next picture.IllegalStateException
- if the selected image is null or the selected image doesn't
belong to a sequence.public void selectPrevious()
IllegalStateException
- if the selected image is null or the selected image doesn't
belong to a sequence.public void selectPrevious(boolean moveToPicture)
moveToPicture
- True if the view must me moved to the previous picture.IllegalStateException
- if the selected image is null or the selected image doesn't
belong to a sequence.public void setSelectedImage(StreetsideAbstractImage image)
image
- The StreetsideImage which is going to be selectedpublic void setSelectedImage(StreetsideAbstractImage image, boolean zoom)
image
- The StreetsideImage
which is going to be selected.zoom
- True if the view must be centered on the image; false otherwise.private static void downloadSurroundingImages(StreetsideImage streetsideImage)
streetsideImage
- the image for which the surrounding images should be downloadedpublic static void downloadSurroundingCubemaps(StreetsideImage streetsideImage)
streetsideImage
- the image for which the surrounding images should be downloadedprivate void fireSelectedImageChanged(StreetsideAbstractImage oldImage, StreetsideAbstractImage newImage)
public Set<StreetsideAbstractImage> getMultiSelectedImages()
StreetsideAbstractImage
objects
selected with ctrl + click.public void setImages(Collection<StreetsideAbstractImage> newImages)
Collection
object as the used set of images.
Any images that are already present, are removed.newImages
- the new image list (previously set images are completely replaced)