Class MemberTable.ZoomToGapAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.relation.MemberTable.ZoomToGapAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,javax.swing.event.ListSelectionListener,LayerManager.LayerChangeListener,MainLayerManager.ActiveLayerChangeListener
- Enclosing class:
- MemberTable
private class MemberTable.ZoomToGapAction extends javax.swing.AbstractAction implements LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener, javax.swing.event.ListSelectionListener
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<WayConnectionType.Direction>connectionTypesOfInterest
-
Constructor Summary
Constructors Constructor Description ZoomToGapAction()Constructs a newZoomToGapAction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)voidactiveOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)Called whenever the active or edit layer changed.private WayConnectionTypegetConnectionType()private booleanhasGap()voidlayerAdded(LayerManager.LayerAddEvent e)Notifies this listener that a layer has been added.voidlayerOrderChanged(LayerManager.LayerOrderChangeEvent e)Notifies this listener that the order of layers was changed.voidlayerRemoving(LayerManager.LayerRemoveEvent e)Notifies this listener that a layer was just removed.private voidupdateEnabledState()voidvalueChanged(javax.swing.event.ListSelectionEvent e)-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
connectionTypesOfInterest
private final java.util.Collection<WayConnectionType.Direction> connectionTypesOfInterest
-
-
Constructor Detail
-
ZoomToGapAction
ZoomToGapAction()
Constructs a newZoomToGapAction.
-
-
Method Detail
-
getConnectionType
private WayConnectionType getConnectionType()
-
hasGap
private boolean hasGap()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
updateEnabledState
private void updateEnabledState()
-
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent e)
- Specified by:
valueChangedin interfacejavax.swing.event.ListSelectionListener
-
activeOrEditLayerChanged
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Description copied from interface:MainLayerManager.ActiveLayerChangeListenerCalled 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:
activeOrEditLayerChangedin interfaceMainLayerManager.ActiveLayerChangeListener- Parameters:
e- The change event.
-
layerAdded
public void layerAdded(LayerManager.LayerAddEvent e)
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer has been added.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
- Specified by:
layerAddedin interfaceLayerManager.LayerChangeListener- Parameters:
e- The new added layer event
-
layerRemoving
public void layerRemoving(LayerManager.LayerRemoveEvent e)
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer was just removed.Listeners are called in the EDT thread after the layer was removed. Use
LayerManager.LayerRemoveEvent.scheduleRemoval(Collection)to remove more layers. You should not do blocking or long-running tasks in this method.- Specified by:
layerRemovingin interfaceLayerManager.LayerChangeListener- Parameters:
e- The layer to be removed (as event)
-
layerOrderChanged
public void layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that the order of layers was changed.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
- Specified by:
layerOrderChangedin interfaceLayerManager.LayerChangeListener- Parameters:
e- The order change event.
-
-