Class ChangesetContentPanel.SelectionBasedAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.changeset.ChangesetContentPanel.SelectionBasedAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,ListSelectionListener
,MainLayerManager.ActiveLayerChangeListener
- Direct Known Subclasses:
ChangesetContentPanel.SelectInCurrentLayerAction
,ChangesetContentPanel.ZoomInCurrentLayerAction
- Enclosing class:
- ChangesetContentPanel
abstract class ChangesetContentPanel.SelectionBasedAction extends AbstractAction implements ListSelectionListener, MainLayerManager.ActiveLayerChangeListener
-
-
Field Summary
-
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
Constructors Constructor Description SelectionBasedAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.protected Set<OsmPrimitive>
getTarget()
void
updateEnabledState()
void
valueChanged(ListSelectionEvent e)
-
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 java.awt.event.ActionListener
actionPerformed
-
-
-
-
Constructor Detail
-
SelectionBasedAction
SelectionBasedAction()
-
-
Method Detail
-
getTarget
protected Set<OsmPrimitive> getTarget()
-
updateEnabledState
public final void updateEnabledState()
-
valueChanged
public void valueChanged(ListSelectionEvent e)
- Specified by:
valueChanged
in interfaceListSelectionListener
-
activeOrEditLayerChanged
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Description copied from interface:MainLayerManager.ActiveLayerChangeListener
Called whenever the active or edit layer changed.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.
- Specified by:
activeOrEditLayerChanged
in interfaceMainLayerManager.ActiveLayerChangeListener
- Parameters:
e
- The change event.
-
-