Class ValidatorTagCheckerRulesPreference
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.validator.ValidatorTagCheckerRulesPreference
-
- All Implemented Interfaces:
PreferenceSetting
,SubPreferenceSetting
public class ValidatorTagCheckerRulesPreference extends Object implements SubPreferenceSetting
The general validator preferences, allowing to enable/disable tests.- Since:
- 6669
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValidatorTagCheckerRulesPreference.Factory
Factory used to create a newValidatorTagCheckerRulesPreference
.(package private) static class
ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor
-
Field Summary
Fields Modifier and Type Field Description private static List<SourceProvider>
ruleSourceProviders
private SourceEditor
sources
-
Constructor Summary
Constructors Constructor Description ValidatorTagCheckerRulesPreference()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGui(PreferenceTabbedPane gui)
Add the GUI elements to the dialog.TabPreferenceSetting
getTabPreferenceSetting(PreferenceTabbedPane gui)
Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting.boolean
isExpert()
Called to know if the preferences tab has only to be displayed in expert mode.boolean
ok()
Called when OK is pressed to save the setting in the preferences file.static boolean
registerSourceProvider(SourceProvider provider)
Registers a new additional rule source provider.
-
-
-
Field Detail
-
ruleSourceProviders
private static final List<SourceProvider> ruleSourceProviders
-
sources
private SourceEditor sources
-
-
Constructor Detail
-
ValidatorTagCheckerRulesPreference
public ValidatorTagCheckerRulesPreference()
-
-
Method Detail
-
registerSourceProvider
public static final boolean registerSourceProvider(SourceProvider provider)
Registers a new additional rule source provider.- Parameters:
provider
- The rule source provider- Returns:
true
, if the provider has been added,false
otherwise
-
addGui
public void addGui(PreferenceTabbedPane gui)
Description copied from interface:PreferenceSetting
Add the GUI elements to the dialog. The elements should be initialized after the current preferences.- Specified by:
addGui
in interfacePreferenceSetting
- Parameters:
gui
- the preferences tab pane
-
ok
public boolean ok()
Description copied from interface:PreferenceSetting
Called when OK is pressed to save the setting in the preferences file. Return true when restart is required.- Specified by:
ok
in interfacePreferenceSetting
- Returns:
true
if restart is required
-
isExpert
public boolean isExpert()
Description copied from interface:PreferenceSetting
Called to know if the preferences tab has only to be displayed in expert mode.- Specified by:
isExpert
in interfacePreferenceSetting
- Returns:
- true if the tab has only to be displayed in expert mode, false otherwise.
-
getTabPreferenceSetting
public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui)
Description copied from interface:SubPreferenceSetting
Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting.- Specified by:
getTabPreferenceSetting
in interfaceSubPreferenceSetting
- Parameters:
gui
- preferences tabbed pane- Returns:
- parent preference setting
-
-