Class ShowHideLayerAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.dialogs.layer.ShowHideLayerAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,IEnabledStateUpdating,Layer.LayerAction,MultikeyShortcutAction
public final class ShowHideLayerAction
extends AbstractAction
implements IEnabledStateUpdating, Layer.LayerAction, MultikeyShortcutAction
Action which will toggle the visibility of the currently selected layers.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.util.MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate WeakReference<Layer>private final LayerListDialog.LayerListModelprivate final ShortcutFields 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
ConstructorsConstructorDescriptionCreates aShowHideLayerActionwhich will toggle the visibility of the currently selected layers -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates and return the menu component.booleanvoidexecuteMultikeyAction(int index, boolean repeat) Execute a multi key actioninthashCode()booleansupportLayers(List<Layer> layers) Determines if this action supports a given list of layers.voidCalled after the layer model has changed.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
lastLayer
-
multikeyShortcut
-
model
-
-
Constructor Details
-
ShowHideLayerAction
Creates aShowHideLayerActionwhich will toggle the visibility of the currently selected layers- Parameters:
model- layer list model
-
-
Method Details
-
getMultikeyShortcut
- Specified by:
getMultikeyShortcutin interfaceMultikeyShortcutAction
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
executeMultikeyAction
Description copied from interface:MultikeyShortcutActionExecute a multi key action- Specified by:
executeMultikeyActionin interfaceMultikeyShortcutAction- Parameters:
index- The index to executerepeat-trueif the last action should be executed if no action is found for the given index.
-
updateEnabledState
Description copied from interface:IEnabledStateUpdatingCalled after the layer model has changed.- Specified by:
updateEnabledStatein interfaceIEnabledStateUpdating
-
createMenuComponent
Description copied from interface:Layer.LayerActionCreates and return the menu component.- Specified by:
createMenuComponentin interfaceLayer.LayerAction- Returns:
- the menu component
-
supportLayers
Description copied from interface:Layer.LayerActionDetermines if this action supports a given list of layers.- Specified by:
supportLayersin interfaceLayer.LayerAction- Parameters:
layers- list of layers- Returns:
trueif this action supports the given list of layers,falseotherwise
-
equals
-
hashCode
-
getMultikeyCombinations
- Specified by:
getMultikeyCombinationsin interfaceMultikeyShortcutAction
-
getLastMultikeyAction
- Specified by:
getLastMultikeyActionin interfaceMultikeyShortcutAction
-