Class ImageEntry
java.lang.Object
org.openstreetmap.josm.data.gpx.GpxImageEntry
org.openstreetmap.josm.gui.layer.geoimage.ImageEntry
- All Implemented Interfaces:
Comparable<GpxImageEntry>,IImageEntry<ImageEntry>,IQuadBucketType,ImageMetadata
- Direct Known Subclasses:
WikimediaCommonsEntry
Stores info about each image, with an optional thumbnail
- Since:
- 2662
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newImageEntry.ImageEntry(File file) Constructs a newImageEntry.ImageEntry(ImageEntry other) Constructs a newImageEntryfrom an existing instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleandelete()Delete the imagebooleanGet the dataset for this imageGet the first image for the data or sequenceprotected URLGet the last image for the data or sequenceGet what would be the next imageGet the previous imageReturns the thumbnail.inthashCode()booleanDetermines whether a thumbnail is setbooleanCheck if image deletion is supportedbooleanCheck if image removal is supportedvoidLoads the thumbnail if it was not loaded yet.Reads the image represented by this entry in the given target dimension.booleanremove()Remove the imagevoidselectImage(ImageViewerDialog imageViewerDialog, IImageEntry<?> entry) Select a specific imagevoidsetDataSet(ImageData imageData) Set the dataset for this imagevoidsetThumbnail(Image thumbnail) Sets the thumbnail.protected voidIndicate that the temporary copy has been updated.Methods inherited from class org.openstreetmap.josm.data.gpx.GpxImageEntry
applyTmp, asWayPoint, compareTo, createTmp, discardTmp, extractExif, flagNewGpsData, getBBox, getDisplayName, getElevation, getExifCoor, getExifGpsDatum, getExifGpsDop, getExifGpsInstant, getExifGpsProcMethod, getExifGpsTrack, getExifHPosErr, getExifImgDir, getExifInstant, getExifOrientation, getFile, getGps2d3dMode, getGpsDiffMode, getGpsInstant, getHeight, getImageURI, getInputStream, getIptcCaption, getIptcHeadline, getIptcKeywords, getIptcObjectName, getLastModified, getPos, getProjectionType, getSpeed, getTimeSourceInstant, getTmp, getWidth, hasExifGpsTime, hasExifTime, hasGpsTime, hasNewGpsData, isTagged, setElevation, setExifCoor, setExifCoor, setExifGpsDatum, setExifGpsDop, setExifGpsProcMethod, setExifGpsTime, setExifGpsTrack, setExifHPosErr, setExifImgDir, setExifOrientation, setExifTime, setFile, setGps2d3dMode, setGpsDiffMode, setGpsTime, setHeight, setIptcCaption, setIptcHeadline, setIptcKeywords, setIptcObjectName, setPos, setPos, setPos, setProjectionType, setSpeed, setWidth, toString, unflagNewGpsDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.data.imagery.street_level.IImageEntry
getDisplayName, getElevation, getExifGpsDatum, getExifGpsDop, getExifGpsInstant, getExifGpsProcMethod, getExifGpsTrack, getExifHPosErr, getExifImgDir, getExifInstant, getFile, getGps2d3dMode, getGpsDiffMode, getGpsInstant, getImageURI, getIptcCaption, getIptcHeadline, getIptcKeywords, getIptcObjectName, getPos, getProjectionType, getSpeed, hasExifTime, hasGpsTime, selectFirstImage, selectLastImage, selectNextImage, selectPreviousImage, setHeight, setWidth
-
Field Details
-
thumbnail
-
dataSet
-
-
Constructor Details
-
ImageEntry
public ImageEntry()Constructs a newImageEntry. -
ImageEntry
Constructs a newImageEntryfrom an existing instance.- Parameters:
other- existing instance- Since:
- 14625
-
ImageEntry
Constructs a newImageEntry.- Parameters:
file- Path to image file on disk
-
-
Method Details
-
hasThumbnail
Determines whether a thumbnail is set- Returns:
trueif a thumbnail is set
-
getThumbnail
Returns the thumbnail.- Returns:
- the thumbnail
-
setThumbnail
Sets the thumbnail.- Parameters:
thumbnail- thumbnail
-
loadThumbnail
Loads the thumbnail if it was not loaded yet.- See Also:
-
tmpUpdated
Description copied from class:GpxImageEntryIndicate that the temporary copy has been updated. Mostly used to prevent UI issues. By default, this is a no-op. Override when needed in subclasses.- Overrides:
tmpUpdatedin classGpxImageEntry
-
setDataSet
Set the dataset for this image- Parameters:
imageData- The dataset- Since:
- 17574
-
getDataSet
Get the dataset for this image- Returns:
- The dataset
- Since:
- 17574
-
hashCode
- Overrides:
hashCodein classGpxImageEntry
-
equals
- Overrides:
equalsin classGpxImageEntry
-
getNextImage
Description copied from interface:IImageEntryGet what would be the next image- Specified by:
getNextImagein interfaceIImageEntry<ImageEntry>- Returns:
- The next image
-
getPreviousImage
Description copied from interface:IImageEntryGet the previous image- Specified by:
getPreviousImagein interfaceIImageEntry<ImageEntry>- Returns:
- The previous image
-
getFirstImage
Description copied from interface:IImageEntryGet the first image for the data or sequence- Specified by:
getFirstImagein interfaceIImageEntry<ImageEntry>- Returns:
- The first image
-
selectImage
Description copied from interface:IImageEntrySelect a specific image- Specified by:
selectImagein interfaceIImageEntry<ImageEntry>- Parameters:
imageViewerDialog- The image viewer to updateentry- The image to select
-
getLastImage
Description copied from interface:IImageEntryGet the last image for the data or sequence- Specified by:
getLastImagein interfaceIImageEntry<ImageEntry>- Returns:
- The last image
-
isRemoveSupported
Description copied from interface:IImageEntryCheck if image removal is supported- Specified by:
isRemoveSupportedin interfaceIImageEntry<ImageEntry>- Returns:
trueif removal is supported
-
remove
Description copied from interface:IImageEntryRemove the image- Specified by:
removein interfaceIImageEntry<ImageEntry>- Returns:
trueif removal was successful
-
isDeleteSupported
Description copied from interface:IImageEntryCheck if image deletion is supported- Specified by:
isDeleteSupportedin interfaceIImageEntry<ImageEntry>- Returns:
trueif deletion is supported
-
delete
Description copied from interface:IImageEntryDelete the image- Specified by:
deletein interfaceIImageEntry<ImageEntry>- Returns:
trueif deletion was successful
-
read
Reads the image represented by this entry in the given target dimension.- Specified by:
readin interfaceIImageEntry<ImageEntry>- Overrides:
readin classGpxImageEntry- Parameters:
target- the desired dimension used for subsampling ornull- Returns:
- the read image, or
null - Throws:
IOException- if any I/O error occurs
-
getImageUrl
- Throws:
MalformedURLException
-