Class ImageViewerDialog.ImageAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.ImageAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,Destroyable
- Direct Known Subclasses:
ImageViewerDialog.ImageNextAction
,ImageViewerDialog.ImagePreviousAction
,ImageViewerDialog.ImageRememberAction
- Enclosing class:
- ImageViewerDialog
private abstract class ImageViewerDialog.ImageAction extends JosmAction
-
-
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 (package private) ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>>
supplier
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields 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
Constructors Constructor Description ImageAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdaptors, ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent event)
(package private) ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>>
getSupplier()
(package private) void
resetRememberActions()
protected void
updateEnabledState()
Override in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e.-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, 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
-
supplier
final ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>> supplier
-
-
Constructor Detail
-
ImageAction
ImageAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdaptors, ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>> supplier)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent event)
-
resetRememberActions
void resetRememberActions()
-
getSupplier
ImageViewerDialog.SerializableUnaryOperator<IImageEntry<?>> getSupplier()
-
updateEnabledState
protected void updateEnabledState()
Description copied from class:JosmAction
Override in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e. when a layer is removed or added. SeeJosmAction.updateEnabledState(Collection)
to respond to changes in the collection of selected primitives. Default behavior is empty.- Overrides:
updateEnabledState
in classJosmAction
- See Also:
JosmAction.updateEnabledState(Collection)
,JosmAction.initEnabledState()
,JosmAction.listenToLayerChange()
-
-