public final class LayerListDialog.ActivateLayerAction extends AbstractAction implements LayerListDialog.IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo
Modifier and Type | Field and Description |
---|---|
private Layer |
layer |
private Shortcut |
multikeyShortcut |
changeSupport, enabled
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 and Description |
---|
ActivateLayerAction()
Constructs a new
ActivateLayerAction . |
ActivateLayerAction(Layer layer)
Constructs a new
ActivateLayerAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
private void |
execute(Layer layer) |
void |
executeMultikeyAction(int index,
boolean repeat) |
MultikeyShortcutAction.MultikeyInfo |
getLastMultikeyAction() |
List<MultikeyShortcutAction.MultikeyInfo> |
getMultikeyCombinations() |
Shortcut |
getMultikeyShortcut() |
protected boolean |
isActiveLayer(Layer layer) |
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added.
|
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed.
|
void |
updateEnabledState() |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private transient Shortcut multikeyShortcut
public ActivateLayerAction(Layer layer)
ActivateLayerAction
.layer
- the layerpublic ActivateLayerAction()
ActivateLayerAction
.public Shortcut getMultikeyShortcut()
getMultikeyShortcut
in interface MultikeyShortcutAction
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
protected boolean isActiveLayer(Layer layer)
public void updateEnabledState()
updateEnabledState
in interface LayerListDialog.IEnabledStateUpdating
public void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layerpublic void executeMultikeyAction(int index, boolean repeat)
executeMultikeyAction
in interface MultikeyShortcutAction
public List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
getMultikeyCombinations
in interface MultikeyShortcutAction
public MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
getLastMultikeyAction
in interface MultikeyShortcutAction