org.openstreetmap.josm.gui.layer.geoimage
Class GeoImageLayer
java.lang.Object
org.openstreetmap.josm.gui.layer.Layer
org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, ProjectionChangeListener, JumpToMarkerActions.JumpToMarkerLayer, MapViewPaintable, Destroyable
public class GeoImageLayer
- extends Layer
- implements java.beans.PropertyChangeListener, JumpToMarkerActions.JumpToMarkerLayer
|
Nested Class Summary |
private static class |
GeoImageLayer.Loader
Loads a set of images, while displaying a dialog that indicates what the plugin is currently doing. |
| Methods inherited from class org.openstreetmap.josm.gui.layer.Layer |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getName, getOpacity, isBackgroundLayer, isChanged, isProjectionSupported, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, setAssociatedFile, setBackgroundLayer, setName, setOpacity, setVisible, toggleVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
java.util.List<ImageEntry> data
gpxLayer
GpxLayer gpxLayer
icon
private javax.swing.Icon icon
selectedIcon
private javax.swing.Icon selectedIcon
currentPhoto
private int currentPhoto
useThumbs
boolean useThumbs
thumbsloader
ThumbsLoader thumbsloader
thumbsLoaded
boolean thumbsLoaded
offscreenBuffer
private java.awt.image.BufferedImage offscreenBuffer
updateOffscreenBuffer
boolean updateOffscreenBuffer
menuAdditions
private static java.util.List<javax.swing.Action> menuAdditions
mouseAdapter
private java.awt.event.MouseAdapter mouseAdapter
mapModeListener
private MapFrame.MapModeChangeListener mapModeListener
GeoImageLayer
public GeoImageLayer(java.util.List<ImageEntry> data,
GpxLayer gpxLayer)
create
public static void create(java.util.Collection<java.io.File> files,
GpxLayer gpxLayer)
getIcon
public javax.swing.Icon getIcon()
- Description copied from class:
Layer
- Return a representative small image for this layer. The image must not
be larger than 64 pixel in any dimension.
- Specified by:
getIcon in class Layer
registerMenuAddition
public static void registerMenuAddition(javax.swing.Action addition)
getMenuEntries
public javax.swing.Action[] getMenuEntries()
- Description copied from class:
Layer
- Returns list of actions. Action can implement LayerAction interface when it needs to be represented by other
menu component than JMenuItem or when it supports multiple layers. Actions that support multiple layers should also
have correct equals implementation.
Use SeparatorLayerAction.INSTANCE instead of new JSeparator
- Specified by:
getMenuEntries in class Layer
infoText
private java.lang.String infoText()
getInfoComponent
public java.lang.Object getInfoComponent()
- Specified by:
getInfoComponent in class Layer
getToolTipText
public java.lang.String getToolTipText()
- Specified by:
getToolTipText in class Layer
- Returns:
- A small tooltip hint about some statistics for this layer.
isMergable
public boolean isMergable(Layer other)
- Specified by:
isMergable in class Layer
- Parameters:
other - The other layer that is tested to be mergable with this.
- Returns:
- Whether the other layer can be merged into this layer.
mergeFrom
public void mergeFrom(Layer from)
- Description copied from class:
Layer
- Merges the given layer into this layer. Throws if the layer types are
incompatible.
- Specified by:
mergeFrom in class Layer
- Parameters:
from - The layer that get merged into this one. After the merge,
the other layer is not usable anymore and passing to one others
mergeFrom should be one of the last things to do with a layer.
scaledDimension
private java.awt.Dimension scaledDimension(java.awt.Image thumb)
paint
public void paint(java.awt.Graphics2D g,
MapView mv,
Bounds bounds)
- Description copied from class:
Layer
- Paint the dataset using the engine set.
- Specified by:
paint in interface MapViewPaintable- Specified by:
paint in class Layer
mv - The object that can translate GeoPoints to screen coordinates.
visitBoundingBox
public void visitBoundingBox(BoundingXYVisitor v)
- Specified by:
visitBoundingBox in class Layer
extractExif
private static void extractExif(ImageEntry e)
showNextPhoto
public void showNextPhoto()
showPreviousPhoto
public void showPreviousPhoto()
checkPreviousNextButtons
public void checkPreviousNextButtons()
removeCurrentPhoto
public void removeCurrentPhoto()
removeCurrentPhotoFromDisk
public void removeCurrentPhotoFromDisk()
hookUpMapView
public void hookUpMapView()
- Description copied from class:
Layer
- Initialization code, that depends on Main.map.mapView.
It is always called in the event dispatching thread.
Note that Main.map is null as long as no layer has been added, so do
not execute code in the constructor, that assumes Main.map.mapView is
not null. Instead override this method.
- Overrides:
hookUpMapView in class Layer
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange in interface java.beans.PropertyChangeListener
loadThumbs
public void loadThumbs()
updateBufferAndRepaint
public void updateBufferAndRepaint()
getImages
public java.util.List<ImageEntry> getImages()
getGpxLayer
public GpxLayer getGpxLayer()
jumpToNextMarker
public void jumpToNextMarker()
- Specified by:
jumpToNextMarker in interface JumpToMarkerActions.JumpToMarkerLayer
jumpToPreviousMarker
public void jumpToPreviousMarker()
- Specified by:
jumpToPreviousMarker in interface JumpToMarkerActions.JumpToMarkerLayer
JOSM