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, setEnabledprivate 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 MultikeyShortcutActionpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerboolean isActiveLayer(Layer layer)
public void updateEnabledState()
IEnabledStateUpdatingupdateEnabledState in interface IEnabledStateUpdatingpublic void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListenerYou 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.ActiveLayerChangeListenere - The change event.public void executeMultikeyAction(int index, boolean repeat)
executeMultikeyAction in interface MultikeyShortcutActionpublic java.util.List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
getMultikeyCombinations in interface MultikeyShortcutActionpublic MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
getLastMultikeyAction in interface MultikeyShortcutAction