public final class ShowHideLayerAction extends javax.swing.AbstractAction implements IEnabledStateUpdating, Layer.LayerAction, MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo| Modifier and Type | Field and Description |
|---|---|
private java.lang.ref.WeakReference<Layer> |
lastLayer |
private LayerListDialog.LayerListModel |
model |
private Shortcut |
multikeyShortcut |
| Constructor and Description |
|---|
ShowHideLayerAction(LayerListDialog.LayerListModel model)
Creates a
ShowHideLayerAction which will toggle the visibility of the currently selected layers |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
java.awt.Component |
createMenuComponent()
Creates and return the menu component.
|
boolean |
equals(java.lang.Object obj) |
void |
executeMultikeyAction(int index,
boolean repeat) |
MultikeyShortcutAction.MultikeyInfo |
getLastMultikeyAction() |
java.util.List<MultikeyShortcutAction.MultikeyInfo> |
getMultikeyCombinations() |
Shortcut |
getMultikeyShortcut() |
int |
hashCode() |
boolean |
supportLayers(java.util.List<Layer> layers)
Determines if this action supports a given list of layers.
|
void |
updateEnabledState()
Called after the layer model has changed.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledprivate final transient Shortcut multikeyShortcut
private final LayerListDialog.LayerListModel model
public ShowHideLayerAction(LayerListDialog.LayerListModel model)
ShowHideLayerAction which will toggle the visibility of the currently selected layersmodel - layer list modelpublic Shortcut getMultikeyShortcut()
getMultikeyShortcut in interface MultikeyShortcutActionpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void executeMultikeyAction(int index, boolean repeat)
executeMultikeyAction in interface MultikeyShortcutActionpublic void updateEnabledState()
IEnabledStateUpdatingupdateEnabledState in interface IEnabledStateUpdatingpublic java.awt.Component createMenuComponent()
Layer.LayerActioncreateMenuComponent in interface Layer.LayerActionpublic boolean supportLayers(java.util.List<Layer> layers)
Layer.LayerActionsupportLayers in interface Layer.LayerActionlayers - list of layerstrue if this action supports the given list of layers, false otherwisepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
getMultikeyCombinations in interface MultikeyShortcutActionpublic MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
getLastMultikeyAction in interface MultikeyShortcutAction