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:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Destroyable
public class ValidateAction
- extends JosmAction
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:
- Serialized Form
Nested Class Summary |
(package private) static class |
ValidateAction.ValidationTask
Asynchronous task for running a collection of tests against a collection
of primitives |
Fields inherited from class org.openstreetmap.josm.actions.JosmAction |
sc |
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields 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 |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent ev)
|
void |
doValidate(java.awt.event.ActionEvent ev,
boolean getSelectedItems)
Does the validation. |
void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- Serializable ID
- See Also:
- Constant Field Values
lastSelection
private java.util.Collection<OsmPrimitive> lastSelection
- Last selection used to validate
ValidateAction
public ValidateAction()
- Constructor
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
doValidate
public void doValidate(java.awt.event.ActionEvent ev,
boolean getSelectedItems)
- 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:
ev
- The eventgetSelectedItems
- If selected or last selected items must be validated
updateEnabledState
public void updateEnabledState()
- Description copied from class:
JosmAction
- Override 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.
See
JosmAction.updateEnabledState(Collection)
to respond to changes in the collection
of selected primitives.
Default behavior is empty.
- Overrides:
updateEnabledState
in class JosmAction
- See Also:
JosmAction.updateEnabledState(Collection)
,
JosmAction.initEnabledState()
JOSM