Class FlatLafValidationIndicator

java.lang.Object
is.codion.plugin.flatlaf.indicator.FlatLafValidationIndicator
All Implemented Interfaces:
ValidationIndicator

public final class FlatLafValidationIndicator extends Object implements ValidationIndicator

A FlatLaf based ValidationIndicator implementation, using the FlatLaf 'outline' client property.

FlatLaf carries a value for each of the two severities — FlatClientProperties.OUTLINE_ERROR and FlatClientProperties.OUTLINE_WARNING — so both are drawn as the outline they should be, rather than borrowing the background the way the look and feel agnostic fallback has to.

  • Constructor Details

    • FlatLafValidationIndicator

      public FlatLafValidationIndicator()
  • Method Details

    • enable

      public void enable(JComponent component, ObservableState valid, ObservableState warned)
      Description copied from interface: ValidationIndicator
      Enables the validation indicator for the given component
      Specified by:
      enable in interface ValidationIndicator
      Parameters:
      component - the component
      valid - the valid state observer, false while the value may not be saved
      warned - the warned state observer, true while the value carries a warning. Independent of [valid] — a value can be both, in which case the invalid presentation wins