Class CorrelationSupportLayer
- java.lang.Object
-
- org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
-
- org.openstreetmap.josm.gui.layer.Layer
-
- org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
-
- org.openstreetmap.josm.gui.layer.AbstractOsmDataLayer
-
- org.openstreetmap.josm.gui.layer.OsmDataLayer
-
- org.openstreetmap.josm.gui.layer.geoimage.CorrelationSupportLayer
-
- All Implemented Interfaces:
GpxDataContainer
,DataSelectionListener
,DataSetListenerAdapter.Listener
,HighlightUpdateListener
,Lockable
,ProjectionChangeListener
,DownloadFromServer
,MapViewPaintable
,SaveToFile
,UploadToServer
,PrimitiveHoverListener
,Destroyable
public final class CorrelationSupportLayer extends OsmDataLayer implements GpxDataContainer
A support layer meant to be modified by the user to provide real-time images correlation.- Since:
- 18078
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.OsmDataLayer
OsmDataLayer.ConvertToGpxLayerAction, OsmDataLayer.DataCountVisitor, OsmDataLayer.LayerStateChangeListener
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.Layer
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
AbstractMapViewPaintable.CompatibilityModeLayerPainter
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.data.osm.DataSelectionListener
DataSelectionListener.AbstractSelectionEvent, DataSelectionListener.SelectionAddEvent, DataSelectionListener.SelectionChangeEvent, DataSelectionListener.SelectionRemoveEvent, DataSelectionListener.SelectionReplaceEvent, DataSelectionListener.SelectionToggleEvent
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.data.osm.HighlightUpdateListener
HighlightUpdateListener.HighlightUpdateEvent
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.layer.MapViewPaintable
MapViewPaintable.LayerPainter, MapViewPaintable.MapViewEvent, MapViewPaintable.PaintableInvalidationEvent, MapViewPaintable.PaintableInvalidationListener
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.PrimitiveHoverListener
PrimitiveHoverListener.PrimitiveHoverEvent
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CORRELATION_PREFIX
private GpxData
gpxData
-
Fields inherited from class org.openstreetmap.josm.gui.layer.OsmDataLayer
data, DEFAULT_RECENT_RELATIONS_NUMBER, PROPERTY_HIDE_LABELS_WHILE_DRAGGING, PROPERTY_RECENT_RELATIONS_NUMBER, PROPERTY_SAVE_EXTENSION, REQUIRES_UPLOAD_TO_SERVER_PROP, validationErrors
-
Fields inherited from class org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
REQUIRES_SAVE_TO_DISK_PROP
-
Fields inherited from class org.openstreetmap.josm.gui.layer.Layer
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
-
-
Constructor Summary
Constructors Constructor Description CorrelationSupportLayer(GpxData fauxGpxData)
Constructs a newCorrelationSupportLayer
with a default nameCorrelationSupportLayer(GpxData fauxGpxData, java.lang.String name)
Constructs a newCorrelationSupportLayer
with a given name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrelationSupportLayer
duplicate(java.lang.String newName)
Duplicates this layer with a new name and a copy of this layer dataset.GpxData
getGpxData()
Returns the GPX data.boolean
isDownloadable()
Determines if the layer is able to download data and implements theDownloadFromServer
interface.boolean
isMergable(Layer other)
Determines if the other layer can be merged into this layer.boolean
isSavable()
Replies the savable state of this layer (i.e., if it can be saved through a "File → Save" dialog).boolean
isUploadable()
Determines if the layer is able to upload data and implements theUploadToServer
interface.void
processDatasetEvent(AbstractDatasetChangedEvent event)
Called when notified about any type of dataset change event.private void
rebuildGpxData()
boolean
requiresSaveToFile()
Determines if the data managed by this layer needs to be saved to a file.boolean
requiresUploadToServer()
Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.protected void
setRequiresSaveToFile(boolean newValue)
protected void
setRequiresUploadToServer(boolean newValue)
GpxData
toGpxData()
Converts OSM data behind this layer to GPX data.-
Methods inherited from class org.openstreetmap.josm.gui.layer.OsmDataLayer
addLayerStateChangeListener, autosave, checkSaveConditions, cleanupAfterUpload, containsPoint, createAndOpenSaveFileChooser, createHatchTexture, createNewName, createUploadTask, destroy, fillGpxData, getBackgroundColor, getBaseIconProvider, getChangesetSourceTag, getConflicts, getData, getDataSet, getIcon, getInfoComponent, getLabel, getMenuEntries, getOutsideColor, getRecentRelations, getToolTipText, getUploadDialog, getViewProjectionBounds, highlightUpdated, isModified, isUploadDiscouraged, isUploadInProgress, mergeFrom, mergeFrom, mergeFrom, nodeToWayPoint, nodeToWayPoint, onPostDownloadFromServer, onPostLoadFromFile, onPostSaveToFile, onPostUploadToServer, paint, primitiveHovered, projectionChanged, removeClipboardDataFor, removeLayerStateChangeListener, removeRecentRelation, selectionChanged, setName, setRecentRelation, setUploadDiscouraged, setUploadInProgress, toGpxData, unsetUploadInProgress, visitBoundingBox
-
Methods inherited from class org.openstreetmap.josm.gui.layer.AbstractOsmDataLayer
clear, isLocked, lock, unlock
-
Methods inherited from class org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
isDirty
-
Methods inherited from class org.openstreetmap.josm.gui.layer.Layer
addPropertyChangeListener, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getDefaultLayerPosition, getName, getOpacity, hasColor, hookUpMapView, isBackgroundLayer, isInfoResizable, isProjectionSupported, isRenamed, isVisible, nameSupportedProjections, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setColor, setFilterStateChanged, setOpacity, setVisible, toggleVisible, toString
-
Methods inherited from class org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
addInvalidationListener, attachToMapView, createMapViewPainter, invalidate, removeInvalidationListener
-
-
-
-
Field Detail
-
CORRELATION_PREFIX
private static final java.lang.String CORRELATION_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CorrelationSupportLayer
public CorrelationSupportLayer(GpxData fauxGpxData)
Constructs a newCorrelationSupportLayer
with a default name- Parameters:
fauxGpxData
- Faux GPX data to be modified using OSM editing tools
-
CorrelationSupportLayer
public CorrelationSupportLayer(GpxData fauxGpxData, java.lang.String name)
Constructs a newCorrelationSupportLayer
with a given name- Parameters:
fauxGpxData
- Faux GPX data to be modified using OSM editing toolsname
- layer name
-
-
Method Detail
-
toGpxData
public GpxData toGpxData()
Description copied from class:OsmDataLayer
Converts OSM data behind this layer to GPX data.- Overrides:
toGpxData
in classOsmDataLayer
- Returns:
- GPX data
-
duplicate
public CorrelationSupportLayer duplicate(java.lang.String newName)
Description copied from class:OsmDataLayer
Duplicates this layer with a new name and a copy of this layer dataset.- Overrides:
duplicate
in classOsmDataLayer
- Parameters:
newName
- name of new layer- Returns:
- A copy of this layer
-
rebuildGpxData
private void rebuildGpxData()
-
getGpxData
public GpxData getGpxData()
Description copied from interface:GpxDataContainer
Returns the GPX data.- Specified by:
getGpxData
in interfaceGpxDataContainer
- Returns:
- the GPX data
-
processDatasetEvent
public void processDatasetEvent(AbstractDatasetChangedEvent event)
Description copied from interface:DataSetListenerAdapter.Listener
Called when notified about any type of dataset change event.- Specified by:
processDatasetEvent
in interfaceDataSetListenerAdapter.Listener
- Overrides:
processDatasetEvent
in classOsmDataLayer
- Parameters:
event
- dataset change event
-
setRequiresSaveToFile
protected void setRequiresSaveToFile(boolean newValue)
- Overrides:
setRequiresSaveToFile
in classOsmDataLayer
-
setRequiresUploadToServer
protected void setRequiresUploadToServer(boolean newValue)
- Overrides:
setRequiresUploadToServer
in classOsmDataLayer
-
isMergable
public boolean isMergable(Layer other)
Description copied from class:Layer
Determines if the other layer can be merged into this layer.- Overrides:
isMergable
in classOsmDataLayer
- Parameters:
other
- The other layer that is tested to be mergable with this.- Returns:
- Whether the other layer can be merged into this layer.
-
isDownloadable
public boolean isDownloadable()
Description copied from interface:DownloadFromServer
Determines if the layer is able to download data and implements theDownloadFromServer
interface. A layer that implements theDownloadFromServer
interface must returntrue
.- Specified by:
isDownloadable
in interfaceDownloadFromServer
- Overrides:
isDownloadable
in classOsmDataLayer
- Returns:
true
if the layer is able to download data;false
, otherwise
-
isUploadable
public boolean isUploadable()
Description copied from interface:UploadToServer
Determines if the layer is able to upload data and implements theUploadToServer
interface. A layer that implements theUploadToServer
interface must returntrue
.- Specified by:
isUploadable
in interfaceUploadToServer
- Overrides:
isUploadable
in classOsmDataLayer
- Returns:
true
if the layer is able to upload data;false
, otherwise
-
requiresUploadToServer
public boolean requiresUploadToServer()
Description copied from interface:UploadToServer
Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.- Specified by:
requiresUploadToServer
in interfaceUploadToServer
- Overrides:
requiresUploadToServer
in classOsmDataLayer
- Returns:
true
if the data managed by this layer needs to be uploaded to the server because it contains modified data;false
, otherwise
-
requiresSaveToFile
public boolean requiresSaveToFile()
Description copied from interface:SaveToFile
Determines if the data managed by this layer needs to be saved to a file. Only replies true if a file is assigned to this layer and if the data managed by this layer has been modified since the last save operation to the file.- Specified by:
requiresSaveToFile
in interfaceSaveToFile
- Overrides:
requiresSaveToFile
in classOsmDataLayer
- Returns:
true
if the data managed by this layer needs to be saved to a file;false
, otherwise
-
isSavable
public boolean isSavable()
Description copied from class:Layer
Replies the savable state of this layer (i.e., if it can be saved through a "File → Save" dialog).- Specified by:
isSavable
in interfaceSaveToFile
- Overrides:
isSavable
in classOsmDataLayer
- Returns:
- true if this layer can be saved to a file
-
-