Module is.codion.swing.common.ui
Interface ValidIndicator
- All Known Implementing Classes:
BackgroundColorValidIndicator,FlatLafValidIndicator
public interface ValidIndicator
Provides a validity indicator for a component.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<String> Specified theValidIndicatorto use. -
Method Summary
Modifier and TypeMethodDescriptionvoidenable(JComponent component, ObservableState valid) Enables the valid indicator for the given component, based on the given valid statestatic Optional<ValidIndicator> instance()Returns an instance from theServiceLoader, of the type specified byINDICATOR_CLASSstatic Optional<ValidIndicator> Returns an instance from theServiceLoader, of the type specified byindicatorClassName
-
Field Details
-
INDICATOR_CLASS
Specified theValidIndicatorto use.Default
BackgroundColorValidIndicator
-
-
Method Details
-
enable
Enables the valid indicator for the given component, based on the given valid state- Parameters:
component- the componentvalid- the valid state observer
-
instance
Returns an instance from theServiceLoader, of the type specified byINDICATOR_CLASS- Returns:
- an instance from the
ServiceLoaderor an emptyOptionalin case one is not found
-
instance
Returns an instance from theServiceLoader, of the type specified byindicatorClassName- Returns:
- an instance from the
ServiceLoaderor an emptyOptionalin case one is not found
-