Class Verifier

java.lang.Object
se.datadosen.component.Verifier

public class Verifier extends Object
A Verifier makes it convenient to verify the validity of the input of text components when the verification process might take some time (requiring network IO for instance). The verifier does not enforce correct input, it simply hints by coloring the text component. This class calls a verifier callback in a background thread when the referenced text component loses focus. The background verifier can call setVerified(boolean) to indicate whether the background verification went ok or not (indicated by switching forground color on the text component to green or red). The referenced component gets reset to default text color when it gains focus or when its text is changed.
Since:
18.1
  • Constructor Details

  • Method Details

    • onVerify

      public void onVerify(Consumer<String> verifier)
    • verify

      public void verify()
      Trigger onVerify callback in background thread
    • setUnverified

      public void setUnverified()
    • setVerified

      public void setVerified(boolean ok)