public final class LayerListDialog.ShowHideLayerAction extends javax.swing.AbstractAction implements LayerListDialog.IEnabledStateUpdating, Layer.LayerAction, MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo
Modifier and Type | Field and Description |
---|---|
private java.lang.ref.WeakReference<Layer> |
lastLayer |
private Shortcut |
multikeyShortcut |
Constructor and Description |
---|
ShowHideLayerAction()
Creates a
LayerListDialog.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() |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private final transient Shortcut multikeyShortcut
public ShowHideLayerAction()
LayerListDialog.ShowHideLayerAction
which will toggle the visibility of
the currently selected layerspublic Shortcut getMultikeyShortcut()
getMultikeyShortcut
in interface MultikeyShortcutAction
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void executeMultikeyAction(int index, boolean repeat)
executeMultikeyAction
in interface MultikeyShortcutAction
public void updateEnabledState()
updateEnabledState
in interface LayerListDialog.IEnabledStateUpdating
public java.awt.Component createMenuComponent()
Layer.LayerAction
createMenuComponent
in interface Layer.LayerAction
public boolean supportLayers(java.util.List<Layer> layers)
Layer.LayerAction
supportLayers
in interface Layer.LayerAction
layers
- 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.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
getMultikeyCombinations
in interface MultikeyShortcutAction
public MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
getLastMultikeyAction
in interface MultikeyShortcutAction