public class ZoomToAction extends AbstractAction implements MapView.LayerChangeListener, ListSelectionListener
Modifier and Type | Field and Description |
---|---|
private String |
descriptionInactiveLayer |
private String |
descriptionNominal |
private String |
descriptionNoSelection |
private OsmPrimitivesTable |
table |
changeSupport, enabled
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 and Description |
---|
ZoomToAction(MemberTable table) |
ZoomToAction(NodeListTable table) |
ZoomToAction(OsmPrimitivesTable table,
String descriptionNominal,
String descriptionInactiveLayer,
String descriptionNoSelection) |
ZoomToAction(RelationMemberTable table) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
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.
|
protected void |
updateEnabledState() |
void |
valueChanged(ListSelectionEvent e) |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private final OsmPrimitivesTable table
private final String descriptionNominal
private final String descriptionInactiveLayer
private final String descriptionNoSelection
public ZoomToAction(OsmPrimitivesTable table, String descriptionNominal, String descriptionInactiveLayer, String descriptionNoSelection)
public ZoomToAction(MemberTable table)
public ZoomToAction(RelationMemberTable table)
public ZoomToAction(NodeListTable table)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
protected final void updateEnabledState()
public void valueChanged(ListSelectionEvent e)
valueChanged
in interface ListSelectionListener
public void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layer