private class MemberTable.ZoomToGapAction extends javax.swing.AbstractAction implements LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener, javax.swing.event.ListSelectionListener
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<WayConnectionType.Direction> |
connectionTypesOfInterest |
Constructor and Description |
---|
ZoomToGapAction()
Constructs a new
ZoomToGapAction . |
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 WayConnectionType |
getConnectionType() |
private boolean |
hasGap() |
void |
layerAdded(LayerManager.LayerAddEvent e)
Notifies this listener that a layer has been added.
|
void |
layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
Notifies this listener that the order of layers was changed.
|
void |
layerRemoving(LayerManager.LayerRemoveEvent e)
Notifies this listener that a alayer was just removed.
|
private void |
updateEnabledState() |
void |
valueChanged(javax.swing.event.ListSelectionEvent e) |
private final java.util.Collection<WayConnectionType.Direction> connectionTypesOfInterest
ZoomToGapAction()
ZoomToGapAction
.private WayConnectionType getConnectionType()
private boolean hasGap()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
private void updateEnabledState()
public void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
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 layerAdded(LayerManager.LayerAddEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerAdded
in interface LayerManager.LayerChangeListener
e
- The new added layer eventpublic void layerRemoving(LayerManager.LayerRemoveEvent e)
LayerManager.LayerChangeListener
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.
layerRemoving
in interface LayerManager.LayerChangeListener
e
- The layer to be removed (as event)public void layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerOrderChanged
in interface LayerManager.LayerChangeListener
e
- The order change event.