 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.validation;
26 import net.
sf.japi.swing.action.ActionBuilder;
27 import net.
sf.japi.swing.action.ActionBuilderFactory;
28 import org.jetbrains.annotations.NotNull;
49 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
61 private final String
key;
82 final String
name = getClass().getSimpleName();
83 if (!
name.endsWith(
"Checker")) {
84 throw new IllegalArgumentException(
"Class name must end with \"Checker\"");
Base package of all Gridarta classes.
boolean loadEnabled(@NotNull String key, boolean defaultEnabled)
Loads the stored "enabled" attribute.
void saveEnabled(@NotNull String key, boolean enabled)
Saves the "enabled" attribute.
Reflects a game object (object on a map).
Super-interface for validators.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
void setEnabled(final boolean enabled)
AbstractValidator(@NotNull final ValidatorPreferences validatorPreferences)
Creates a new instance.
AbstractValidator(@NotNull final ValidatorPreferences validatorPreferences, @NotNull final String key)
Creates a new instance.
Interface for MapArchObjects.
static final ActionBuilder ACTION_BUILDER
Action Builder.
This is the base class for validators.
boolean enabled
Whether this MapValidator is enabled.
static String getString(@NotNull final ActionBuilder actionBuilder, @NotNull final String key, @NotNull final String defaultValue)
Returns the value of a key.
final boolean defaultEnabled
Whether this MapValidator is enabled by default.
Utility class for ActionBuilder related functions.
static final String VALIDATOR_PREFIX
The prefix for preference keys.
boolean isDefaultEnabled()