Class AddNoteAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.actions.JosmAction
org.openstreetmap.josm.actions.mapmode.MapMode
org.openstreetmap.josm.actions.mapmode.AddNoteAction
- All Implemented Interfaces:
ActionListener,MouseListener,MouseMotionListener,Serializable,Cloneable,EventListener,Action,KeyPressReleaseListener,PreferenceChangedListener,Destroyable
Map mode to add a new note. Listens for a mouse click and then
prompts the user for text and adds a note to the note layer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.actions.mapmode.MapMode
alt, ctrl, cursor, meta, platformMenuShortcutKeyMask, shiftFields inherited from class org.openstreetmap.josm.actions.JosmAction
scFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis is called when key press event is actually pressed (no fake events while holding key)voidThis is called when key press event is actually released (no fake events while holding key)voidMakes this map mode active.voidexitMode()Makes this map mode inactive.Returns a short translated help message describing how this map mode can be used, to be displayed in status line.protected booleanOverwrite this ifJosmAction.updateEnabledState()should be called when the active / available layers change.protected booleanOverwrite this ifJosmAction.updateEnabledState()should be called when the selection changed.voidMethods inherited from class org.openstreetmap.josm.actions.mapmode.MapMode
actionPerformed, isEditableDataLayer, isPanning, layerIsSupported, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, preferenceChanged, readPreferences, requestFocusInMapView, updateKeyModifiers, updateKeyModifiers, updateKeyModifiers, updateKeyModifiersEx, updateStatusLineMethods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFutureMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
noteData
-
-
Constructor Details
-
AddNoteAction
Construct a new map mode.- Parameters:
data- Note data container. Must not be null- Since:
- 11713
-
-
Method Details
-
getModeHelpText
Description copied from class:MapModeReturns a short translated help message describing how this map mode can be used, to be displayed in status line.- Overrides:
getModeHelpTextin classMapMode- Returns:
- a short translated help message describing how this map mode can be used
-
enterMode
Description copied from class:MapModeMakes this map mode active. -
exitMode
Description copied from class:MapModeMakes this map mode inactive. -
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classMapMode
-
doKeyPressed
Description copied from interface:KeyPressReleaseListenerThis is called when key press event is actually pressed (no fake events while holding key)- Specified by:
doKeyPressedin interfaceKeyPressReleaseListener- Parameters:
e- key event
-
doKeyReleased
Description copied from interface:KeyPressReleaseListenerThis is called when key press event is actually released (no fake events while holding key)- Specified by:
doKeyReleasedin interfaceKeyPressReleaseListener- Parameters:
e- key event
-
listenToLayerChange
Description copied from class:JosmActionOverwrite this ifJosmAction.updateEnabledState()should be called when the active / available layers change. Default is true.- Overrides:
listenToLayerChangein classJosmAction- Returns:
trueif aLayerManager.LayerChangeListenerand aMainLayerManager.ActiveLayerChangeListenershould be registered.
-
listenToSelectionChange
Description copied from class:JosmActionOverwrite this ifJosmAction.updateEnabledState()should be called when the selection changed. Default is true.- Overrides:
listenToSelectionChangein classJosmAction- Returns:
trueif aDataSelectionListenershould be registered.
-