public abstract class AbstractModifiableLayer extends Layer implements UploadToServer, SaveToFile
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
FILTER_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.
|
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.
|
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.
|
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, estimateMemoryUsage, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getIcon, getInfoComponent, getMenuEntries, getName, getOpacity, getToolTipText, hookUpMapView, isBackgroundLayer, isChanged, isInfoResizable, isMergable, isProjectionSupported, isRenamed, isSavable, isVisible, mergeFrom, nameSupportedProjections, onPostLoadFromFile, paint, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, visitBoundingBox
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSavable
public AbstractModifiableLayer(java.lang.String name)
ModifiableLayer
.name
- Layer namepublic boolean isUploadable()
UploadToServer
interface.isUploadable
in interface UploadToServer
public boolean requiresUploadToServer()
requiresUploadToServer
in interface UploadToServer
public boolean requiresSaveToFile()
requiresSaveToFile
in interface SaveToFile
public boolean isUploadDiscouraged()
isUploadDiscouraged
in interface UploadToServer
public abstract boolean isModified()
public void onPostSaveToFile()
onPostSaveToFile
in interface SaveToFile
public void onPostUploadToServer()
onPostUploadToServer
in interface UploadToServer
public AbstractIOTask createUploadTask(ProgressMonitor monitor)
AbstractIOTask
for uploading data.createUploadTask
in interface UploadToServer
monitor
- The progress monitorAbstractIOTask
for uploading data, or null
if not applicablepublic AbstractUploadDialog getUploadDialog()
getUploadDialog
in interface UploadToServer
null
if not applicable