public final class ActivateLayerAction extends javax.swing.AbstractAction implements IEnabledStateUpdating, MainLayerManager.ActiveLayerChangeListener, 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 |
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.
|
private void |
execute(Layer layer) |
void |
executeMultikeyAction(int index,
boolean repeat) |
MultikeyShortcutAction.MultikeyInfo |
getLastMultikeyAction() |
java.util.List<MultikeyShortcutAction.MultikeyInfo> |
getMultikeyCombinations() |
Shortcut |
getMultikeyShortcut() |
(package private) boolean |
isActiveLayer(Layer layer) |
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
boolean isActiveLayer(Layer layer)
public void updateEnabledState()
IEnabledStateUpdating
updateEnabledState
in interface IEnabledStateUpdating
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListener
You can be sure that this layer is still contained in this set.
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
activeOrEditLayerChanged
in interface MainLayerManager.ActiveLayerChangeListener
e
- The change event.public 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