Class SsCompStringValidator

java.lang.Object
org.netbeans.validation.api.AbstractValidator<String>
dev.visdb.seesaw.contrib.simplevalidation.SsCompStringValidator
All Implemented Interfaces:
Validator<String>

A validator specialized for an SsComponent that's a subclass of JTextComponent. It is used by SVUtils.setTextDecorator(SsComponent, String, Validator...) It does SsComponent.allValidate() and, if there's a failure, it uses SsComponent.validationMsg(Validation) for the problem description. Finally it invokes SsComponent.decorateText(ValidationResult).

The SsComponent is used in validate(...); this is unusual. It is a Validator<String> so it is easy to chain together with other Validator<String>, see StringValidators and SVUtils.setTextDecorator(SsComponent, String, Validator...).

  • Constructor Details

    • SsCompStringValidator

      Create a validator that handles a string.
      Parameters:
      ssComp - how weird is it to have this here?
  • Method Details

    • validate

      public void validate(Problems problems, String compName, String model)
      Validate using this' validationCondition and problemDescription. The model is ignored, the relevant information derives from SsComponent.allValidate()
      Parameters:
      problems -
      compName -
      model -