public class ValidateAction extends JosmAction
This action iterates through all active tests and give them the data, so that each one can test it.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ValidateAction.ValidationTask
Asynchronous task for running a collection of tests against a collection
of primitives
|
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<OsmPrimitive> |
lastSelection
Last selection used to validate
|
sc
Constructor and Description |
---|
ValidateAction()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev) |
void |
destroy()
Called when the object has been destroyed.
|
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.
|
getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState
private java.util.Collection<OsmPrimitive> lastSelection
public ValidateAction()
public void actionPerformed(java.awt.event.ActionEvent ev)
public void doValidate(java.awt.event.ActionEvent ev, boolean getSelectedItems)
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
ev
- The eventgetSelectedItems
- If selected or last selected items must be validatedpublic 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()
public void destroy()
Destroyable
destroy
in interface Destroyable
destroy
in class JosmAction