Package | Description |
---|---|
com.jgoodies.validation |
Consists of the required validation framework core types.
|
com.jgoodies.validation.extras |
Contains optional Validation framework classes that ship only with
the JGoodies Validation source distribution and are not yet part
of the binary Validation library.
|
com.jgoodies.validation.util |
Contains optional validation helper classes and
default implementations.
|
com.jgoodies.validation.view |
Contains optional validation helper classes that assist in
presenting validation results.
|
Modifier and Type | Field and Description |
---|---|
static ValidationResult |
ValidationResult.EMPTY
A constant for an empty and unmodifiable validation result.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ValidationResultModel.getResult()
Returns this model's validation result which must be non-null.
|
ValidationResult |
ValidationResult.subResult(int fromIndex,
int toIndex)
Returns an unmodifiable view of the portion of this result between
the specified
fromIndex , inclusive, and toIndex ,
exclusive. |
ValidationResult |
ValidationResult.subResult(Object messageKey)
Returns an unmodifiable sub result of this result that consists of
all messages that share the specified message key.
|
ValidationResult |
ValidationResult.subResult(Object[] messageKeys)
Returns an unmodifiable sub result of this result that consists of
all messages that share the specified message keys.
|
static ValidationResult |
ValidationResult.unmodifiableResult(ValidationResult validationResult)
Returns an unmodifiable view of the given ValidationResult.
|
ValidationResult |
Validatable.validate()
Validates this object and returns a
ValidationResult . |
ValidationResult |
Validator.validate(T validationTarget)
Validates the given validation target and returns the validation result
as an instance of
ValidationResult . |
Modifier and Type | Method and Description |
---|---|
Map<Object,ValidationResult> |
ValidationResult.keyMap()
Creates and returns an unmodifiable Map that maps the message keys
of this validation result to unmodifiable sub results that share the key.
|
Modifier and Type | Method and Description |
---|---|
void |
ValidationResult.addAllFrom(ValidationResult validationResult)
Adds all messages from the given ValidationResult
to the list of messages that this validation result holds.
|
void |
ValidationResultModel.setResult(ValidationResult newResult)
Sets a new non-null validation result and notifies all registered
listeners, if the result changed.
|
static ValidationResult |
ValidationResult.unmodifiableResult(ValidationResult validationResult)
Returns an unmodifiable view of the given ValidationResult.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
DelayedValidationResultModel.getResult()
Returns the subject's value or in case of a pending commit,
the pending new value.
|
Modifier and Type | Method and Description |
---|---|
void |
DelayedValidationResultModel.setResult(ValidationResult newResult)
Sets the given new value after this model's delay.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
ValidationResultModelContainer.getCollapsedValidationResult()
Returns the collapsed validation result, i.
|
ValidationResult |
ValidationResultModelContainer.getExpandedValidationResult()
Returns the concatenation of all validation results that are held
by this container.
|
ValidationResult |
PropertyValidationSupport.getResult()
Returns the default
ValidationResult . |
ValidationResult |
DefaultValidationResultModel.getResult()
Returns this model's validation result.
|
Modifier and Type | Method and Description |
---|---|
void |
PropertyValidationSupport.add(ValidationResult result,
Severity severity,
String property,
String text)
Adds a
PropertyValidationMessage to the specified
ValidationResult . |
void |
PropertyValidationSupport.add(ValidationResult result,
String property,
String text)
Adds a
PropertyValidationMessage to the specified
ValidationResult . |
void |
PropertyValidationSupport.addError(ValidationResult result,
String property,
String text)
Adds an error
PropertyValidationMessage to the specified
ValidationResult . |
void |
PropertyValidationSupport.addWarning(ValidationResult result,
String property,
String text)
Adds a warning
PropertyValidationMessage to the specified
ValidationResult . |
protected void |
AbstractValidationResultModel.firePropertyChanges(ValidationResult oldResult,
ValidationResult newResult)
Notifies all registered listeners about changes of the result itself
and the properties for severity, errors and messages.
|
void |
ValidationResultModelContainer.setResult(ValidationResult newResult)
Rejects to set a new validation result.
|
void |
DefaultValidationResultModel.setResult(ValidationResult newResult)
Sets a new validation result and notifies all registered listeners
about changes of the result itself and the properties for severity,
errors and messages.
|
Constructor and Description |
---|
PropertyValidationSupport(ValidationResult defaultResult,
Severity defaultSeverity,
Object target,
String role)
Constructs a
PropertyValidationSupport instance for the
given default result, default severity, validation target and the given
validation role. |
Modifier and Type | Method and Description |
---|---|
static ValidationResult |
ValidationComponentUtils.getAssociatedResult(JComponent comp,
Map<Object,ValidationResult> keyMap)
Returns the ValidationResult associated with the given component
using the specified validation result key map,
or
null if the component has no message key set,
or ValidationResult.EMPTY if the key map contains
no result for the component. |
Modifier and Type | Method and Description |
---|---|
static boolean |
ValidationComponentUtils.hasError(JComponent comp,
ValidationResult result)
Checks and answers if the specified component is associated with an
error message in the given validation result.
|
static boolean |
ValidationComponentUtils.hasWarning(JComponent comp,
ValidationResult result)
Checks and answers if the specified component is associated with a
warning message in the given validation result.
|
static void |
ValidationComponentUtils.updateComponentTreeSeverity(Container container,
ValidationResult result)
Traverses a component tree and sets the severity for all text components.
|
static void |
ValidationComponentUtils.updateComponentTreeSeverityBackground(Container container,
ValidationResult result)
Traverses a component tree and sets the text component backgrounds
according to the severity of an associated validation result - if any.
|
Modifier and Type | Method and Description |
---|---|
static ValidationResult |
ValidationComponentUtils.getAssociatedResult(JComponent comp,
Map<Object,ValidationResult> keyMap)
Returns the ValidationResult associated with the given component
using the specified validation result key map,
or
null if the component has no message key set,
or ValidationResult.EMPTY if the key map contains
no result for the component. |
void |
ValidationComponentUtils.Visitor.visit(JComponent component,
Map<Object,ValidationResult> keyMap)
Visits the given component using the specified key map, that maps
message keys to associated validation subresults.
|
static void |
ValidationComponentUtils.visitComponentTree(Container container,
Map<Object,ValidationResult> keyMap,
ValidationComponentUtils.Visitor visitor)
Traverses the component tree starting at the given container and invokes
the given visitor's
#visit method on each instance of
JTextComponent . |
Copyright © 2003-2011 JGoodies Karsten Lentzsch. All Rights Reserved.