public class DefaultTextComponentValidator extends AbstractTextComponentValidator
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
invalidFeedback |
private java.lang.String |
validFeedback |
| Constructor and Description |
|---|
DefaultTextComponentValidator(javax.swing.text.JTextComponent tc,
java.lang.String validFeedback,
java.lang.String invalidFeedback)
Constructs a new
DefaultTextComponentValidator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid()
Replies true if the current content of the decorated text component is valid;
false otherwise
|
void |
validate()
Implement in subclasses to validate the content of the text component.
|
actionPerformed, changedUpdate, feedbackDisabled, feedbackInvalid, feedbackValid, focusGained, focusLost, getComponent, insertUpdate, propertyChange, removeUpdateprivate final java.lang.String validFeedback
private final java.lang.String invalidFeedback
public DefaultTextComponentValidator(javax.swing.text.JTextComponent tc, java.lang.String validFeedback, java.lang.String invalidFeedback)
DefaultTextComponentValidator.tc - he text component. Must not be null.validFeedback - text displayed for valid feedbackinvalidFeedback - text displayed for invalid feedbackpublic boolean isValid()
AbstractTextComponentValidatorisValid in class AbstractTextComponentValidatorpublic void validate()
AbstractTextComponentValidatorvalidate in class AbstractTextComponentValidator