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 SaveActioninstanceprivate java.beans.PropertyChangeListenerupdateOnRequireSaveChange-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSaveAction()Construct the action with "Save" as label.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JosmAction.LayerChangeAdapterbuildLayerChangeAdapter()Override this if callingJosmAction.updateEnabledState()on layer change events is not enough.java.io.FilegetFile(Layer layer)static SaveActiongetInstance()Returns the unique instance.protected booleanlistenToSelectionChange()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:JosmActionOverride this if callingJosmAction.updateEnabledState()on layer change events is not enough.- Overrides:
buildLayerChangeAdapterin classJosmAction- Returns:
- the
JosmAction.LayerChangeAdapterthat will be called on layer change events
-
listenToSelectionChange
protected boolean listenToSelectionChange()
Description copied from class:JosmActionOverwrite this ifJosmAction.updateEnabledState()should be called when the selection changed. Default is true.- Overrides:
listenToSelectionChangein classSaveActionBase- Returns:
trueif aDataSelectionListenershould be registered.
-
getFile
public java.io.File getFile(Layer layer)
- Specified by:
getFilein classSaveActionBase
-
-