org.openstreetmap.josm.gui.dialogs
Class LayerListDialog.ActivateLayerAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.openstreetmap.josm.gui.dialogs.LayerListDialog.ActivateLayerAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, LayerListDialog.IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction
Enclosing class:
LayerListDialog

public final class LayerListDialog.ActivateLayerAction
extends javax.swing.AbstractAction
implements LayerListDialog.IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction

The action to activate the currently selected layer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openstreetmap.josm.tools.MultikeyShortcutAction
MultikeyShortcutAction.MultikeyInfo
 
Field Summary
private  Layer layer
           
private  Shortcut multikeyShortcut
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
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 Summary
LayerListDialog.ActivateLayerAction()
           
LayerListDialog.ActivateLayerAction(Layer layer)
           
 
Method Summary
 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()
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Field Detail

layer

private Layer layer

multikeyShortcut

private Shortcut multikeyShortcut
Constructor Detail

LayerListDialog.ActivateLayerAction

public LayerListDialog.ActivateLayerAction(Layer layer)

LayerListDialog.ActivateLayerAction

public LayerListDialog.ActivateLayerAction()
Method Detail

getMultikeyShortcut

public Shortcut getMultikeyShortcut()
Specified by:
getMultikeyShortcut in interface MultikeyShortcutAction

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

execute

private void execute(Layer layer)

isActiveLayer

protected boolean isActiveLayer(Layer layer)

updateEnabledState

public void updateEnabledState()
Specified by:
updateEnabledState in interface LayerListDialog.IEnabledStateUpdating

activeLayerChange

public void activeLayerChange(Layer oldLayer,
                              Layer newLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that the active layer has changed.

Specified by:
activeLayerChange in interface MapView.LayerChangeListener
Parameters:
oldLayer - The previous active layer
newLayer - The new activer layer

layerAdded

public void layerAdded(Layer newLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that a layer has been added.

Specified by:
layerAdded in interface MapView.LayerChangeListener
Parameters:
newLayer - The new added layer

layerRemoved

public void layerRemoved(Layer oldLayer)
Description copied from interface: MapView.LayerChangeListener
Notifies this listener that a layer has been removed.

Specified by:
layerRemoved in interface MapView.LayerChangeListener
Parameters:
oldLayer - The old removed layer

executeMultikeyAction

public void executeMultikeyAction(int index,
                                  boolean repeat)
Specified by:
executeMultikeyAction in interface MultikeyShortcutAction

getMultikeyCombinations

public java.util.List<MultikeyShortcutAction.MultikeyInfo> getMultikeyCombinations()
Specified by:
getMultikeyCombinations in interface MultikeyShortcutAction

getLastMultikeyAction

public MultikeyShortcutAction.MultikeyInfo getLastMultikeyAction()
Specified by:
getLastMultikeyAction in interface MultikeyShortcutAction


JOSM