public final class ActivateLayerAction extends javax.swing.AbstractAction implements IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo
Modifier and Type | Field and Description |
---|---|
private Layer |
layer |
private LayerListDialog.LayerListModel |
model |
private Shortcut |
multikeyShortcut |
Constructor and Description |
---|
ActivateLayerAction(Layer layer,
LayerListDialog.LayerListModel model)
Constructs a new
ActivateLayerAction . |
ActivateLayerAction(LayerListDialog.LayerListModel model)
Constructs a new
ActivateLayerAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.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() |
java.util.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()
Called after the layer model has changed.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private transient Shortcut multikeyShortcut
private final LayerListDialog.LayerListModel model
public ActivateLayerAction(Layer layer, LayerListDialog.LayerListModel model)
ActivateLayerAction
.layer
- the layermodel
- layer list modelpublic ActivateLayerAction(LayerListDialog.LayerListModel model)
ActivateLayerAction
.model
- layer list modelpublic Shortcut getMultikeyShortcut()
getMultikeyShortcut
in interface MultikeyShortcutAction
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
protected boolean isActiveLayer(Layer layer)
public void updateEnabledState()
IEnabledStateUpdating
updateEnabledState
in interface 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 java.util.List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
getMultikeyCombinations
in interface MultikeyShortcutAction
public MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
getLastMultikeyAction
in interface MultikeyShortcutAction