public class GeoImageLayer extends Layer implements 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) List<ImageEntry> |
data |
(package private) GpxLayer |
gpxLayer |
private Icon |
icon |
private MapFrame.MapModeChangeListener |
mapModeListener |
private static List<Action> |
menuAdditions |
private MouseAdapter |
mouseAdapter |
private BufferedImage |
offscreenBuffer |
private Icon |
selectedIcon |
private static List<MapMode> |
supportedMapModes |
(package private) boolean |
thumbsLoaded |
(package private) ThumbsLoader |
thumbsloader |
(package private) boolean |
updateOffscreenBuffer |
(package private) boolean |
useThumbs |
ICON_SIZE, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP| Constructor and Description |
|---|
GeoImageLayer(List<ImageEntry> data,
GpxLayer gpxLayer)
Constructs a new
GeoImageLayer. |
GeoImageLayer(List<ImageEntry> data,
GpxLayer gpxLayer,
boolean useThumbs)
Constructs a new
GeoImageLayer. |
GeoImageLayer(List<ImageEntry> data,
GpxLayer gpxLayer,
String name)
Constructs a new
GeoImageLayer. |
GeoImageLayer(List<ImageEntry> data,
GpxLayer gpxLayer,
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. remove select marker, and optionally repaint.
|
private void |
clearOtherCurrentPhotos()
Clears the currentPhoto of the other GeoImageLayer's.
|
static void |
create(Collection<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.
|
Icon |
getIcon()
Return a representative small image for this layer.
|
List<ImageEntry> |
getImages() |
Object |
getInfoComponent() |
Action[] |
getMenuEntries()
Returns list of actions.
|
ImageEntry |
getPhotoUnderMouse(MouseEvent evt)
Returns the image that matches the position of the mouse event.
|
String |
getToolTipText() |
void |
hookUpMapView()
Initialization code, that depends on Main.map.mapView.
|
private String |
infoText() |
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 |
loadThumbs() |
void |
mergeFrom(Layer from)
Merges the given layer into this layer.
|
void |
paint(Graphics2D g,
MapView mv,
Bounds bounds)
Paint the dataset using the engine set.
|
void |
propertyChange(PropertyChangeEvent evt) |
static void |
registerMenuAddition(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 Dimension |
scaledDimension(Image thumb) |
void |
setUseThumbs(boolean useThumbs)
Enables or disables the display of thumbnails.
|
void |
showFirstPhoto() |
void |
showLastPhoto() |
void |
showNextPhoto() |
void |
showPreviousPhoto() |
void |
updateBufferAndRepaint() |
void |
visitBoundingBox(BoundingXYVisitor v) |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getName, getOpacity, isBackgroundLayer, isChanged, isProjectionSupported, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, setAssociatedFile, setBackgroundLayer, setName, setOpacity, setVisible, toggleVisibleList<ImageEntry> data
private Icon selectedIcon
private int currentPhoto
boolean useThumbs
ThumbsLoader thumbsloader
boolean thumbsLoaded
private BufferedImage offscreenBuffer
boolean updateOffscreenBuffer
private static List<Action> menuAdditions
private static List<MapMode> supportedMapModes
private MouseAdapter mouseAdapter
private MapFrame.MapModeChangeListener mapModeListener
public GeoImageLayer(List<ImageEntry> data, GpxLayer gpxLayer)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layerpublic GeoImageLayer(List<ImageEntry> data, GpxLayer gpxLayer, String name)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layername - Layer namepublic GeoImageLayer(List<ImageEntry> data, GpxLayer gpxLayer, boolean useThumbs)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layeruseThumbs - Thumbnail display flagpublic GeoImageLayer(List<ImageEntry> data, GpxLayer gpxLayer, String name, boolean useThumbs)
GeoImageLayer.data - The list of images to displaygpxLayer - The associated GPX layername - Layer nameuseThumbs - Thumbnail display flagpublic static void create(Collection<File> files, GpxLayer gpxLayer)
public Icon getIcon()
Layerpublic static void registerMenuAddition(Action addition)
public Action[] getMenuEntries()
LayergetMenuEntries in class Layerpublic Object getInfoComponent()
getInfoComponent in class Layerpublic 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 Dimension scaledDimension(Image thumb)
public void paint(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 removePhotoByIdx(int idx)
idx - Image indexpublic ImageEntry getPhotoUnderMouse(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)
mapMode - Map mode to be checkedtrue if the map mode is supported,
false otherwisepublic void hookUpMapView()
LayerhookUpMapView in class Layerpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic void loadThumbs()
public void updateBufferAndRepaint()
public 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