public class GeoImageLayer extends Layer implements java.beans.PropertyChangeListener, JumpToMarkerActions.JumpToMarkerLayer
| Modifier and Type | Class and Description |
|---|---|
private static class |
GeoImageLayer.Loader
Loads a set of images, while displaying a dialog that indicates what the plugin is currently doing.
|
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction| Modifier and Type | Field and Description |
|---|---|
private int |
currentPhoto |
(package private) java.util.List<ImageEntry> |
data |
(package private) GpxLayer |
gpxLayer |
private javax.swing.Icon |
icon |
private MapFrame.MapModeChangeListener |
mapModeListener |
private static java.util.List<javax.swing.Action> |
menuAdditions |
private java.awt.event.MouseAdapter |
mouseAdapter |
private java.awt.image.BufferedImage |
offscreenBuffer |
private javax.swing.Icon |
selectedIcon |
private static java.util.List<MapMode> |
supportedMapModes |
(package private) boolean |
thumbsLoaded |
(package private) ThumbsLoader |
thumbsloader |
(package private) java.util.concurrent.ExecutorService |
thumbsLoaderExecutor |
(package private) boolean |
thumbsLoaderRunning |
(package private) boolean |
updateOffscreenBuffer |
(package private) boolean |
useThumbs |
ICON_SIZE, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP| Constructor and Description |
|---|
GeoImageLayer(java.util.List<ImageEntry> data,
GpxLayer gpxLayer)
Constructs a new
GeoImageLayer. |
GeoImageLayer(java.util.List<ImageEntry> data,
GpxLayer gpxLayer,
boolean useThumbs)
Constructs a new
GeoImageLayer. |
GeoImageLayer(java.util.List<ImageEntry> data,
GpxLayer gpxLayer,
java.lang.String name)
Constructs a new
GeoImageLayer. |
GeoImageLayer(java.util.List<ImageEntry> data,
GpxLayer gpxLayer,
java.lang.String name,
boolean useThumbs)
Constructs a new
GeoImageLayer. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPreviousNextButtons() |
void |
clearCurrentPhoto(boolean repaint)
Clears the currentPhoto, i.e.
|
private void |
clearOtherCurrentPhotos()
Clears the currentPhoto of the other GeoImageLayer's.
|
void |
copyCurrentPhotoPath() |
static void |
create(java.util.Collection<java.io.File> files,
GpxLayer gpxLayer) |
private static void |
extractExif(ImageEntry e)
Extract GPS metadata from image EXIF
If successful, fills in the LatLon and EastNorth attributes of passed in image
|
GpxLayer |
getGpxLayer()
Returns the associated GPX layer.
|
javax.swing.Icon |
getIcon()
Return a representative small image for this layer.
|
java.util.List<ImageEntry> |
getImages()
Get list of images in layer.
|
java.lang.Object |
getInfoComponent() |
javax.swing.Action[] |
getMenuEntries()
Returns list of actions.
|
ImageEntry |
getPhotoUnderMouse(java.awt.event.MouseEvent evt)
Returns the image that matches the position of the mouse event.
|
java.lang.String |
getToolTipText() |
void |
hookUpMapView()
Initialization code, that depends on Main.map.mapView.
|
private java.lang.String |
infoText()
Prepare the string that is displayed if layer information is requested.
|
boolean |
isMergable(Layer other) |
private static boolean |
isSupportedMapMode(MapMode mapMode)
Determines if the functionality of this layer is available in
the specified map mode.
|
boolean |
isUseThumbs()
Returns the current thumbnail display status.
|
void |
jumpToNextMarker() |
void |
jumpToPreviousMarker() |
void |
mergeFrom(Layer from)
Merges the given layer into this layer.
|
void |
paint(java.awt.Graphics2D g,
MapView mv,
Bounds bounds)
Paint the dataset using the engine set.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
static void |
registerMenuAddition(javax.swing.Action addition) |
static void |
registerSupportedMapMode(MapMode mapMode)
Registers a map mode for which the functionality of this layer should be available.
|
void |
removeCurrentPhoto() |
void |
removeCurrentPhotoFromDisk() |
void |
removePhotoByIdx(int idx)
Removes a photo from the list of images by index.
|
private java.awt.Dimension |
scaledDimension(java.awt.Image thumb) |
void |
setUseThumbs(boolean useThumbs)
Enables or disables the display of thumbnails.
|
void |
showFirstPhoto() |
void |
showLastPhoto() |
void |
showNextPhoto() |
void |
showPreviousPhoto() |
void |
startLoadThumbs()
Start to load thumbnails.
|
void |
stopLoadThumbs()
Stop to load thumbnails.
|
void |
thumbsLoaded()
Called to signal that the loading of thumbnails has finished.
|
void |
updateBufferAndRepaint() |
void |
visitBoundingBox(BoundingXYVisitor v) |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getName, getOpacity, isBackgroundLayer, isChanged, isInfoResizable, isProjectionSupported, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, setAssociatedFile, setBackgroundLayer, setName, setOpacity, setVisible, toggleVisiblejava.util.List<ImageEntry> data
private javax.swing.Icon icon
private javax.swing.Icon selectedIcon
private int currentPhoto
boolean useThumbs
java.util.concurrent.ExecutorService thumbsLoaderExecutor
ThumbsLoader thumbsloader
boolean thumbsLoaderRunning
volatile boolean thumbsLoaded
private java.awt.image.BufferedImage offscreenBuffer
boolean updateOffscreenBuffer
private static java.util.List<javax.swing.Action> menuAdditions
private static java.util.List<MapMode> supportedMapModes
private java.awt.event.MouseAdapter mouseAdapter
private MapFrame.MapModeChangeListener mapModeListener
public GeoImageLayer(java.util.List<ImageEntry> data, GpxLayer gpxLayer)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layerpublic GeoImageLayer(java.util.List<ImageEntry> data, GpxLayer gpxLayer, java.lang.String name)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layername - Layer namepublic GeoImageLayer(java.util.List<ImageEntry> data, GpxLayer gpxLayer, boolean useThumbs)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layeruseThumbs - Thumbnail display flagpublic GeoImageLayer(java.util.List<ImageEntry> data, GpxLayer gpxLayer, java.lang.String name, boolean useThumbs)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layername - Layer nameuseThumbs - Thumbnail display flagpublic javax.swing.Icon getIcon()
Layerpublic static void registerMenuAddition(javax.swing.Action addition)
public javax.swing.Action[] getMenuEntries()
LayergetMenuEntries in class Layerprivate java.lang.String infoText()
public java.lang.Object getInfoComponent()
getInfoComponent in class Layerpublic java.lang.String getToolTipText()
getToolTipText in class Layerpublic boolean isMergable(Layer other)
isMergable in class Layerother - The other layer that is tested to be mergable with this.public void mergeFrom(Layer from)
Layerprivate java.awt.Dimension scaledDimension(java.awt.Image thumb)
public void paint(java.awt.Graphics2D g, MapView mv, Bounds bounds)
Layerpaint in interface MapViewPaintablepaint in class Layermv - The object that can translate GeoPoints to screen coordinates.public void visitBoundingBox(BoundingXYVisitor v)
visitBoundingBox in class Layerprivate static void extractExif(ImageEntry e)
public void showNextPhoto()
public void showPreviousPhoto()
public void showFirstPhoto()
public void showLastPhoto()
public void checkPreviousNextButtons()
public void removeCurrentPhoto()
public void removeCurrentPhotoFromDisk()
public void copyCurrentPhotoPath()
public void removePhotoByIdx(int idx)
idx - Image indexpublic ImageEntry getPhotoUnderMouse(java.awt.event.MouseEvent evt)
evt - Mouse eventnull if there is no image at the mouse positionpublic void clearCurrentPhoto(boolean repaint)
repaint - Repaint flagprivate void clearOtherCurrentPhotos()
public static void registerSupportedMapMode(MapMode mapMode)
mapMode - Map mode to be registeredprivate static final boolean isSupportedMapMode(MapMode mapMode)
SelectAction and LassoModeAction are supported by default,
other map modes can be registered.mapMode - Map mode to be checkedtrue if the map mode is supported,
false otherwisepublic void hookUpMapView()
LayerhookUpMapView in class Layerpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void startLoadThumbs()
public void stopLoadThumbs()
public void thumbsLoaded()
ThumbsLoader in another thread.public void updateBufferAndRepaint()
public java.util.List<ImageEntry> getImages()
public GpxLayer getGpxLayer()
public void jumpToNextMarker()
jumpToNextMarker in interface JumpToMarkerActions.JumpToMarkerLayerpublic void jumpToPreviousMarker()
jumpToPreviousMarker in interface JumpToMarkerActions.JumpToMarkerLayerpublic boolean isUseThumbs()
true: thumbnails are displayed, false: an icon is displayed instead of thumbnails.public void setUseThumbs(boolean useThumbs)
useThumbs - New thumbnail display status