Package org.openstreetmap.josm.actions
Class ValidateAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.actions.JosmAction
org.openstreetmap.josm.actions.ValidateAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,Destroyable
The action that does the validate thing.
This action iterates through all active tests and give them the data, so that each one can test it.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<OsmPrimitive>Last selection used to validateFields 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 TypeMethodDescriptionvoidvoiddestroy()Called when the object has been destroyed.voiddoValidate(boolean getSelectedItems) Does the validation.voidOverride in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e.Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFutureMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
lastSelection
Last selection used to validate
-
-
Constructor Details
-
ValidateAction
public ValidateAction()Constructor
-
-
Method Details
-
actionPerformed
-
doValidate
Does the validation.If getSelectedItems is true, the selected items (or all items, if no one is selected) are validated. If it is false, last selected items are revalidated
- Parameters:
getSelectedItems- If selected or last selected items must be validated
-
updateEnabledState
Description copied from class:JosmActionOverride in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e. when a layer is removed or added. SeeJosmAction.updateEnabledState(Collection)to respond to changes in the collection of selected primitives. Default behavior is empty.- Overrides:
updateEnabledStatein classJosmAction- See Also:
-
destroy
Description copied from interface:DestroyableCalled when the object has been destroyed.- Specified by:
destroyin interfaceDestroyable- Overrides:
destroyin classJosmAction
-