public abstract class MapMode extends JosmAction implements MouseListener, MouseMotionListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
alt |
protected boolean |
ctrl |
protected Cursor |
cursor |
protected boolean |
shift |
sc
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 |
---|
MapMode(String name,
String iconName,
String tooltip,
MapFrame mapFrame,
Cursor cursor)
Constructor for mapmodes with an menu (no shortcut will be registered)
|
MapMode(String name,
String iconName,
String tooltip,
Shortcut shortcut,
MapFrame mapFrame,
Cursor cursor)
Constructor for mapmodes without an menu
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Call selectMapMode(this) on the parent mapFrame.
|
void |
enterMode()
Makes this map mode active.
|
void |
exitMode()
Makes this map mode inactive.
|
String |
getModeHelpText() |
boolean |
layerIsSupported(Layer l) |
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
protected void |
requestFocusInMapView() |
protected void |
updateKeyModifiers(InputEvent e) |
protected void |
updateKeyModifiers(int modifiers) |
protected void |
updateKeyModifiers(MouseEvent e) |
protected void |
updateStatusLine() |
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState, updateEnabledState
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor)
public void enterMode()
public void exitMode()
protected void updateStatusLine()
public String getModeHelpText()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public boolean layerIsSupported(Layer l)
protected void updateKeyModifiers(InputEvent e)
protected void updateKeyModifiers(MouseEvent e)
protected void updateKeyModifiers(int modifiers)
protected void requestFocusInMapView()
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener