public class ZoomAction extends MapMode implements SelectionManager.SelectionEnded
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
Modifier and Type | Field and Description |
---|---|
private SelectionManager |
selectionManager
Manager that manages the selection rectangle with the aspect ratio of the MapView.
|
sc
Constructor and Description |
---|
ZoomAction(MapFrame mapFrame)
Construct a ZoomAction without a label.
|
Modifier and Type | Method and Description |
---|---|
void |
enterMode()
Makes this map mode active.
|
void |
exitMode()
Makes this map mode inactive.
|
java.lang.String |
getModeHelpText() |
void |
selectionEnded(java.awt.Rectangle r,
java.awt.event.MouseEvent e)
Zoom to the rectangle on the map.
|
actionPerformed, layerIsSupported, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, preferenceChanged, readPreferences, requestFocusInMapView, updateKeyModifiers, updateKeyModifiers, updateKeyModifiers, updateStatusLine
destroy, getCurrentDataSet, getEditLayer, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, waitFuture
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
private final transient SelectionManager selectionManager
public ZoomAction(MapFrame mapFrame)
mapFrame
- The MapFrame, whose zoom mode should be enabled.public void selectionEnded(java.awt.Rectangle r, java.awt.event.MouseEvent e)
selectionEnded
in interface SelectionManager.SelectionEnded
r
- The rectangle that encloses the current selection.e
- The mouse event.InputEvent.getModifiersEx()
,
SelectionManager.getSelectedObjects(boolean)
public void enterMode()
MapMode
public void exitMode()
MapMode
public java.lang.String getModeHelpText()
getModeHelpText
in class MapMode