public abstract class AbstractAudioAction extends JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
sc
Constructor and Description |
---|
AbstractAudioAction(java.lang.String name,
java.lang.String iconName,
java.lang.String tooltip,
Shortcut shortcut,
boolean registerInToolbar)
Constructs a new
BaseAudioAction . |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
isAudioMarkerPresent()
Checks if there is at least one
AudioMarker is present in the current layout. |
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e.
|
checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public AbstractAudioAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean registerInToolbar)
BaseAudioAction
.name
- the action's text as displayed on the menu (if it is added to a menu)iconName
- the filename of the icon to usetooltip
- a longer description of the action that will be displayed in the tooltipshortcut
- a ready-created shortcut object or null if you don't want a shortcutregisterInToolbar
- register this action for the toolbar preferences?protected static boolean isAudioMarkerPresent()
AudioMarker
is present in the current layout.true
if at least one AudioMarker
is present in the current
layout, false
otherwise.protected void updateEnabledState()
JosmAction
JosmAction.updateEnabledState(Collection)
to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState
in class JosmAction
JosmAction.updateEnabledState(Collection)
,
JosmAction.initEnabledState()
,
JosmAction.listenToLayerChange()