Package org.openstreetmap.josm.actions
Class SaveAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.DiskAccessAction
-
- org.openstreetmap.josm.actions.SaveActionBase
-
- org.openstreetmap.josm.actions.SaveAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
public final class SaveAction extends SaveActionBase
Export the data as an OSM xml file.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private static SaveAction
instance
private java.beans.PropertyChangeListener
updateOnRequireSaveChange
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SaveAction()
Construct the action with "Save" as label.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JosmAction.LayerChangeAdapter
buildLayerChangeAdapter()
Override this if callingJosmAction.updateEnabledState()
on layer change events is not enough.java.io.File
getFile(Layer layer)
static SaveAction
getInstance()
Returns the unique instance.protected boolean
listenToSelectionChange()
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed.-
Methods inherited from class org.openstreetmap.josm.actions.SaveActionBase
actionPerformed, addToFileOpenHistory, checkFileAndConfirmOverWrite, confirmOverwrite, createAndOpenSaveFileChooser, createAndOpenSaveFileChooser, doSave, doSave, doSave, doSave, doSave, showAndLogException, updateEnabledState
-
Methods inherited from class org.openstreetmap.josm.actions.DiskAccessAction
createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, showSavedNotification, showSavingNotification
-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
instance
private static final SaveAction instance
-
updateOnRequireSaveChange
private final java.beans.PropertyChangeListener updateOnRequireSaveChange
-
-
Constructor Detail
-
SaveAction
private SaveAction()
Construct the action with "Save" as label.
-
-
Method Detail
-
getInstance
public static SaveAction getInstance()
Returns the unique instance.- Returns:
- the unique instance
-
buildLayerChangeAdapter
protected JosmAction.LayerChangeAdapter buildLayerChangeAdapter()
Description copied from class:JosmAction
Override this if callingJosmAction.updateEnabledState()
on layer change events is not enough.- Overrides:
buildLayerChangeAdapter
in classJosmAction
- Returns:
- the
JosmAction.LayerChangeAdapter
that will be called on layer change events
-
listenToSelectionChange
protected boolean listenToSelectionChange()
Description copied from class:JosmAction
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed. Default is true.- Overrides:
listenToSelectionChange
in classSaveActionBase
- Returns:
true
if aDataSelectionListener
should be registered.
-
getFile
public java.io.File getFile(Layer layer)
- Specified by:
getFile
in classSaveActionBase
-
-