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.StringCORRELATION_PREFIXprivate GpxDatagpxData-
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 newCorrelationSupportLayerwith a default nameCorrelationSupportLayer(GpxData fauxGpxData, java.lang.String name)Constructs a newCorrelationSupportLayerwith a given name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrelationSupportLayerduplicate(java.lang.String newName)Duplicates this layer with a new name and a copy of this layer dataset.GpxDatagetGpxData()Returns the GPX data.booleanisDownloadable()Determines if the layer is able to download data and implements theDownloadFromServerinterface.booleanisMergable(Layer other)Determines if the other layer can be merged into this layer.booleanisSavable()Replies the savable state of this layer (i.e., if it can be saved through a "File → Save" dialog).booleanisUploadable()Determines if the layer is able to upload data and implements theUploadToServerinterface.voidprocessDatasetEvent(AbstractDatasetChangedEvent event)Called when notified about any type of dataset change event.private voidrebuildGpxData()booleanrequiresSaveToFile()Determines if the data managed by this layer needs to be saved to a file.booleanrequiresUploadToServer()Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.protected voidsetRequiresSaveToFile(boolean newValue)protected voidsetRequiresUploadToServer(boolean newValue)GpxDatatoGpxData()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 newCorrelationSupportLayerwith 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 newCorrelationSupportLayerwith 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:OsmDataLayerConverts OSM data behind this layer to GPX data.- Overrides:
toGpxDatain classOsmDataLayer- Returns:
- GPX data
-
duplicate
public CorrelationSupportLayer duplicate(java.lang.String newName)
Description copied from class:OsmDataLayerDuplicates this layer with a new name and a copy of this layer dataset.- Overrides:
duplicatein 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:GpxDataContainerReturns the GPX data.- Specified by:
getGpxDatain interfaceGpxDataContainer- Returns:
- the GPX data
-
processDatasetEvent
public void processDatasetEvent(AbstractDatasetChangedEvent event)
Description copied from interface:DataSetListenerAdapter.ListenerCalled when notified about any type of dataset change event.- Specified by:
processDatasetEventin interfaceDataSetListenerAdapter.Listener- Overrides:
processDatasetEventin classOsmDataLayer- Parameters:
event- dataset change event
-
setRequiresSaveToFile
protected void setRequiresSaveToFile(boolean newValue)
- Overrides:
setRequiresSaveToFilein classOsmDataLayer
-
setRequiresUploadToServer
protected void setRequiresUploadToServer(boolean newValue)
- Overrides:
setRequiresUploadToServerin classOsmDataLayer
-
isMergable
public boolean isMergable(Layer other)
Description copied from class:LayerDetermines if the other layer can be merged into this layer.- Overrides:
isMergablein 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:DownloadFromServerDetermines if the layer is able to download data and implements theDownloadFromServerinterface. A layer that implements theDownloadFromServerinterface must returntrue.- Specified by:
isDownloadablein interfaceDownloadFromServer- Overrides:
isDownloadablein classOsmDataLayer- Returns:
trueif the layer is able to download data;false, otherwise
-
isUploadable
public boolean isUploadable()
Description copied from interface:UploadToServerDetermines if the layer is able to upload data and implements theUploadToServerinterface. A layer that implements theUploadToServerinterface must returntrue.- Specified by:
isUploadablein interfaceUploadToServer- Overrides:
isUploadablein classOsmDataLayer- Returns:
trueif the layer is able to upload data;false, otherwise
-
requiresUploadToServer
public boolean requiresUploadToServer()
Description copied from interface:UploadToServerDetermines if the data managed by this layer needs to be uploaded to the server because it contains modified data.- Specified by:
requiresUploadToServerin interfaceUploadToServer- Overrides:
requiresUploadToServerin classOsmDataLayer- Returns:
trueif 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:SaveToFileDetermines 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:
requiresSaveToFilein interfaceSaveToFile- Overrides:
requiresSaveToFilein classOsmDataLayer- Returns:
trueif the data managed by this layer needs to be saved to a file;false, otherwise
-
isSavable
public boolean isSavable()
Description copied from class:LayerReplies the savable state of this layer (i.e., if it can be saved through a "File → Save" dialog).- Specified by:
isSavablein interfaceSaveToFile- Overrides:
isSavablein classOsmDataLayer- Returns:
- true if this layer can be saved to a file
-
-