Package org.openstreetmap.josm.data
Class ImageData
java.lang.Object
org.openstreetmap.josm.data.ImageData
- All Implemented Interfaces:
Data
Class to hold
ImageEntry and the current selection- Since:
- 14590
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA listener that is informed when the current selection change -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ImageEntry>private final QuadBuckets<ImageEntry>private Layerprivate final ListenerList<ImageData.ImageDataUpdateListener> -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new image container without imagesImageData(List<ImageEntry> data) Construct a new image container with a list of images -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a listener that listens to image data changesvoidaddImageToSelection(ImageEntry image) Add image to the list of selected imagesprivate voidvoidClear the selected image(s)voidfireNodeMoved(ImageEntry gpxImageEntry) Indicate that an entry has changedReturns the collection of data sources.Get the first image on the layerReturns the imagesGet the last image in the layergetLayer()Get the layer that this data is associated with.Get the image next to the current imageGet the image previous to the current imageReturn the first currently selected imageReturn the current selected imagesbooleanCheck if there is a next image in the sequencebooleanCheck if there is a previous image in the sequencebooleanisImageSelected(ImageEntry image) Determines if the image is selectedbooleanDetermines if one image has modified GPS data.voidMerge 2 ImageDatavoidManually trigger theImageData.ImageDataUpdateListener.imageDataUpdated(ImageData)voidremoveImage(ImageEntry img) Remove the image from the list and trigger update listenervoidremoveImage(ImageEntry img, boolean fireUpdateEvent) Remove the image from the list and optionally trigger update listenervoidRemoves a listener that listens to image data changesprivate voidremoveImages(List<ImageEntry> selectedImages) voidremoveImageToSelection(ImageEntry image) Remove the image from the list of selected imagesvoidRemove the current selected image from the listsearchImages(Bounds bounds) Search for images in a boundsvoidSet the layer for use withImageViewerDialog.displayImages(List)voidsetSelectedImage(ImageEntry image) Select as the selected the given imageprivate voidsetSelectedImageIndex(int index) private voidsetSelectedImageIndex(int index, boolean forceTrigger) voidupdateImageDirection(ImageEntry img, double direction) Update the image direction of the image and trigger updatevoidupdateImageExifGpsDatum(ImageEntry img, String exifGpsDatum) Update the image GPS datum and trigger update.voidupdateImageExifGpsDop(ImageEntry img, Double exifGpsDop) Update the image GPS DOP value and trigger update.voidupdateImageExifGpsProcMethod(ImageEntry img, String exifGpsProcMethod) Update the image GPS processing method and trigger update.voidupdateImageGps2d3dMode(ImageEntry img, Integer gps2d3dMode) Update the image GPS 2d/3d mode value and trigger update.voidupdateImageGpsDiffMode(ImageEntry img, Integer gpsDiffMode) Update the image GPS differential mode and trigger update.voidupdateImageGpsTrack(ImageEntry img, double trackDirection) Update the GPS track direction of the image and trigger update.voidupdateImageHPosErr(ImageEntry img, double hposerr) Update the image horizontal positioning error and trigger update.voidupdateImagePosition(ImageEntry img, LatLon newPos) Update the position of the image and trigger updatevoidUpdate the selected image after removal of one or more images.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.data.Data
getDataSourceArea, getDataSourceBounds
-
Field Details
-
data
-
selectedImagesIndex
-
listeners
-
geoImages
-
layer
-
-
Constructor Details
-
ImageData
public ImageData()Construct a new image container without images -
ImageData
Construct a new image container with a list of images- Parameters:
data- the list ofImageEntry
-
-
Method Details
-
getImages
Returns the images- Returns:
- the images
-
isModified
Determines if one image has modified GPS data.- Returns:
trueif data has been modified;false, otherwise
-
mergeFrom
Merge 2 ImageData- Parameters:
otherData-ImageDatato merge
-
getSelectedImage
Return the first currently selected image- Returns:
- the first selected image as
ImageEntryor null - See Also:
-
getSelectedImages
Return the current selected images- Returns:
- the selected images as list
ImageEntry - Since:
- 15333
-
getFirstImage
Get the first image on the layer- Returns:
- The first image
- Since:
- 18246
-
getLastImage
Get the last image in the layer- Returns:
- The last image
- Since:
- 18246
-
hasNextImage
Check if there is a next image in the sequence- Returns:
trueis there is a next image,falseotherwise
-
searchImages
Search for images in a bounds- Parameters:
bounds- The bounds to search- Returns:
- images in the bounds
- Since:
- 17459
-
getNextImage
Get the image next to the current image- Returns:
- The next image
- Since:
- 18246
-
getPreviousImage
Get the image previous to the current image- Returns:
- The previous image
- Since:
- 18246
-
hasPreviousImage
Check if there is a previous image in the sequence- Returns:
trueis there is a previous image,falseotherwise
-
setSelectedImage
Select as the selected the given image- Parameters:
image- the selected image
-
addImageToSelection
Add image to the list of selected images- Parameters:
image-ImageEntrythe image to add- Since:
- 15333
-
fireNodeMoved
Indicate that an entry has changed- Parameters:
gpxImageEntry- The entry to update- Since:
- 17574
-
removeImageToSelection
Remove the image from the list of selected images- Parameters:
image-ImageEntrythe image to remove- Since:
- 15333
-
clearSelectedImage
Clear the selected image(s) -
setSelectedImageIndex
-
setSelectedImageIndex
-
removeSelectedImages
Remove the current selected image from the list- Since:
- 15348
-
removeImages
-
updateSelectedImage
Update the selected image after removal of one or more images.- Since:
- 18049
-
isImageSelected
Determines if the image is selected- Parameters:
image- theImageEntryimage- Returns:
trueis the image is selected,falseotherwise- Since:
- 15333
-
removeImage
Remove the image from the list and trigger update listener- Parameters:
img- theImageEntryto remove
-
removeImage
Remove the image from the list and optionally trigger update listener- Parameters:
img- theImageEntryto removefireUpdateEvent- iftrue, notifies listeners of image update- Since:
- 18049
-
updateImagePosition
Update the position of the image and trigger update- Parameters:
img- the image to updatenewPos- the new position
-
updateImageDirection
Update the image direction of the image and trigger update- Parameters:
img- the image to updatedirection- the new direction
-
updateImageGpsTrack
Update the GPS track direction of the image and trigger update.- Parameters:
img- the image to updatetrackDirection- the new GPS track direction- Since:
- 19387
-
updateImageHPosErr
Update the image horizontal positioning error and trigger update.- Parameters:
img- the image to updatehposerr- the new horizontal positionning error- Since:
- 19387
-
updateImageGpsDiffMode
Update the image GPS differential mode and trigger update.- Parameters:
img- the image to updategpsDiffMode- the new GPS differential mode- Since:
- 19387
-
updateImageGps2d3dMode
Update the image GPS 2d/3d mode value and trigger update.- Parameters:
img- the image to updategps2d3dMode- the new 2d/3d GPS mode- Since:
- 19387
-
updateImageExifGpsDop
Update the image GPS DOP value and trigger update.- Parameters:
img- the image to updateexifGpsDop- the new GPS DOP value- Since:
- 19387
-
updateImageExifGpsDatum
Update the image GPS datum and trigger update.- Parameters:
img- the image to updateexifGpsDatum- the new datum string value- Since:
- 19387
-
updateImageExifGpsProcMethod
Update the image GPS processing method and trigger update.- Parameters:
img- the image to updateexifGpsProcMethod- the new GPS processing method- Since:
- 19387
-
notifyImageUpdate
Manually trigger theImageData.ImageDataUpdateListener.imageDataUpdated(ImageData) -
afterImageUpdated
-
setLayer
Set the layer for use withImageViewerDialog.displayImages(List)- Parameters:
layer- The layer to use for organization- Since:
- 18591
-
getLayer
Get the layer that this data is associated with. May benull.- Returns:
- The layer this data is associated with.
- Since:
- 18591
-
addImageDataUpdateListener
Add a listener that listens to image data changes- Parameters:
listener- theImageData.ImageDataUpdateListener
-
removeImageDataUpdateListener
Removes a listener that listens to image data changes- Parameters:
listener- The listener
-
getDataSources
Description copied from interface:DataReturns the collection of data sources.- Specified by:
getDataSourcesin interfaceData- Returns:
- the collection of data sources.
-