Class ValidationSupport<T>
- java.lang.Object
-
- io.github.jonestimd.swing.validation.ValidationSupport<T>
-
- Type Parameters:
T
- the class of the value being validated
public class ValidationSupport<T> extends java.lang.Object
A helper class for sending notifications to validation listeners.
-
-
Constructor Summary
Constructors Constructor Description ValidationSupport(javax.swing.JComponent source)
ValidationSupport(javax.swing.JComponent source, Validator<T> validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValidationListener(java.beans.PropertyChangeListener listener)
java.lang.String
getMessages()
void
removeValidationListener(java.beans.PropertyChangeListener listener)
java.lang.String
setValidator(Validator<T> validator, T value)
java.lang.String
validateValue(T value)
-
-
-
Method Detail
-
validateValue
public java.lang.String validateValue(T value)
-
getMessages
public java.lang.String getMessages()
-
addValidationListener
public void addValidationListener(java.beans.PropertyChangeListener listener)
-
removeValidationListener
public void removeValidationListener(java.beans.PropertyChangeListener listener)
-
-