public abstract class AbstractModifiableLayer extends Layer implements DownloadFromServer, UploadToServer, SaveToFile, Lockable
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerActionAbstractMapViewPaintable.CompatibilityModeLayerPainterMapViewPaintable.LayerPainter, MapViewPaintable.MapViewEvent, MapViewPaintable.PaintableInvalidationEvent, MapViewPaintable.PaintableInvalidationListenerFILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP| Constructor and Description |
|---|
AbstractModifiableLayer(java.lang.String name)
Constructs a new
ModifiableLayer. |
| Modifier and Type | Method and Description |
|---|---|
AbstractIOTask |
createUploadTask(ProgressMonitor monitor)
Creates a new
AbstractIOTask for uploading data. |
AbstractUploadDialog |
getUploadDialog()
Returns the upload dialog for this layer.
|
boolean |
isDownloadable()
Determines if the layer is able to download data and implements the
DownloadFromServer interface. |
boolean |
isLocked()
Determines if this is read-only/locked (thus it cannot be modified).
|
abstract boolean |
isModified()
Determines if data managed by this layer has been modified.
|
boolean |
isUploadable()
Determines if the layer is able to upload data and implements the
UploadToServer interface. |
boolean |
isUploadDiscouraged()
Determines if upload of data managed by this layer is discouraged.
|
boolean |
isUploadInProgress()
Determines if upload of data managed by this layer is currently in progress.
|
void |
lock()
Enables the read-only/locked mode.
|
void |
onPostSaveToFile()
Initializes the layer after a successful save of data to a file.
|
void |
onPostUploadToServer()
Initializes the layer after a successful upload to the server.
|
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.
|
void |
unlock()
Disables the read-only/locked mode.
|
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getChangesetSourceTag, getColor, getDefaultLayerPosition, getIcon, getInfoComponent, getMenuEntries, getName, getOpacity, getToolTipText, getViewProjectionBounds, hasColor, hookUpMapView, isBackgroundLayer, isInfoResizable, isMergable, isProjectionSupported, isRenamed, isSavable, isVisible, mergeFrom, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setColor, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, toString, visitBoundingBoxaddInvalidationListener, attachToMapView, createMapViewPainter, invalidate, removeInvalidationListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSavablepaintpublic AbstractModifiableLayer(java.lang.String name)
ModifiableLayer.name - Layer namepublic boolean isDownloadable()
DownloadFromServerDownloadFromServer interface. A layer that implements the
DownloadFromServer interface must return true.isDownloadable in interface DownloadFromServertrue if the layer is able to download data; false, otherwisepublic boolean isUploadable()
UploadToServerUploadToServer interface. A layer that implements the
UploadToServer interface must return true.isUploadable in interface UploadToServertrue if the layer is able to upload data; false, otherwisepublic boolean requiresUploadToServer()
UploadToServerrequiresUploadToServer in interface UploadToServertrue if the data managed by this layer needs to be
uploaded to the server because it contains modified data;
false, otherwisepublic boolean requiresSaveToFile()
SaveToFilerequiresSaveToFile in interface SaveToFiletrue if the data managed by this layer needs to be saved to a file; false, otherwisepublic boolean isUploadDiscouraged()
UploadToServerisUploadDiscouraged in interface UploadToServertrue if upload is discouraged for this layer; false, otherwisepublic abstract boolean isModified()
public void onPostSaveToFile()
SaveToFileonPostSaveToFile in interface SaveToFilepublic void onPostUploadToServer()
onPostUploadToServer in interface UploadToServerpublic AbstractIOTask createUploadTask(ProgressMonitor monitor)
UploadToServerAbstractIOTask for uploading data.createUploadTask in interface UploadToServermonitor - The progress monitorAbstractIOTask for uploading data, or null if not applicablepublic AbstractUploadDialog getUploadDialog()
UploadToServergetUploadDialog in interface UploadToServernull if not applicablepublic boolean isUploadInProgress()
UploadToServerisUploadInProgress in interface UploadToServertrue if upload is in progresspublic void lock()
Lockablepublic void unlock()
Lockable