Package swingtree.api

Interface UIVerifier<C extends JComponent>

Type Parameters:
C - The component type which should be verified.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface UIVerifier<C extends JComponent>
A functional interface for doing swing component validity verification. Passing this to the UIForAnySwing.isValidIf(UIVerifier) method will lead to the creation and attachment of an InputVerifier to the component, which will be called when the component is validated.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method is invoked by a UI component to check if its view model is in a valid state and then update the component accordingly.
  • Method Details

    • isValid

      boolean isValid(ComponentDelegate<C,ComponentEvent> delegate)
      This method is invoked by a UI component to check if its view model is in a valid state and then update the component accordingly. This method should not have any side effects!
      Parameters:
      delegate - The delegate to the component to be verified.
      Returns:
      true if the component is valid, false otherwise.