Package org.openstreetmap.josm.actions
Class AbstractUploadAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.AbstractUploadAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
- Direct Known Subclasses:
UploadAction
,UploadSelectionAction
public abstract class AbstractUploadAction extends JosmAction
Abstract super-class of all upload actions. Listens to layer change events to update its enabled state.- Since:
- 15513
- 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 java.beans.PropertyChangeListener
updateOnRequireUploadChange
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractUploadAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean registerInToolbar)
Constructs a newAbstractUploadAction
.
-
Method Summary
All 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.-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
updateOnRequireUploadChange
private final java.beans.PropertyChangeListener updateOnRequireUploadChange
-
-
Constructor Detail
-
AbstractUploadAction
protected AbstractUploadAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean registerInToolbar)
Constructs a newAbstractUploadAction
.- Parameters:
name
- the action's text as displayed on the menu (if it is added to a menu)iconName
- the filename of the icon to usetooltip
- a longer description of the action that will be displayed in the tooltip. Please note that html is not supported for menu actions on some platforms.shortcut
- a ready-created shortcut object or null if you don't want a shortcut. But you always do want a shortcut, remember you can always register it with group=none, so you won't be assigned a shortcut unless the user configures one. If you pass null here, the user CANNOT configure a shortcut for your action.registerInToolbar
- register this action for the toolbar preferences?
-
-
Method Detail
-
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
-
-