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:
ActionListener,Serializable,Cloneable,EventListener,Action,Destroyable
- Direct Known Subclasses:
UploadAction,UploadSelectionAction
Abstract super-class of all upload actions.
Listens to layer change events to update its enabled state.
- Since:
- 15513
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.actions.JosmAction
scFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractUploadAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) Constructs a newAbstractUploadAction. -
Method Summary
Modifier and TypeMethodDescriptionprotected JosmAction.LayerChangeAdapterOverride 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, waitFutureMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Field Details
-
updateOnRequireUploadChange
-
-
Constructor Details
-
AbstractUploadAction
protected AbstractUploadAction(String name, String iconName, 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 Details
-
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
-