public class ComponentValidator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.function.Function<javax.swing.JComponent,javax.swing.JComponent> |
CWBB_PROVIDER
Convenient error/warning outline provider for
ComponentWithBrowseButton
ComponentWithBrowseButton isn't a ErrorBorderCapable component so it needs a special provider. |
Constructor and Description |
---|
ComponentValidator(Disposable parentDisposable) |
Modifier and Type | Method and Description |
---|---|
ComponentValidator |
andRegisterOnDocumentListener(javax.swing.text.JTextComponent textComponent)
Convenient wrapper for mostly used scenario.
|
<T extends javax.swing.JComponent & EditorTextComponent> |
andRegisterOnDocumentListener(T textComponent) |
ComponentValidator |
andStartOnFocusLost() |
static ComponentPopupBuilder |
createPopupBuilder(ValidationInfo info,
java.util.function.Consumer<? super javax.swing.JEditorPane> configurator) |
void |
enableValidation() |
static javax.swing.border.Border |
getBorder() |
static java.util.Optional<ComponentValidator> |
getInstance(javax.swing.JComponent component) |
ValidationInfo |
getValidationInfo() |
ComponentValidator |
installOn(javax.swing.JComponent component) |
void |
revalidate() |
void |
updateInfo(ValidationInfo info) |
ComponentValidator |
withFocusValidator(java.util.function.Supplier<? extends ValidationInfo> focusValidator) |
ComponentValidator |
withHyperlinkListener(javax.swing.event.HyperlinkListener hyperlinkListener) |
static boolean |
withinComponent(ValidationInfo info,
java.awt.event.MouseEvent e) |
ComponentValidator |
withOutlineProvider(java.util.function.Function<? super javax.swing.JComponent,? extends javax.swing.JComponent> outlineProvider) |
ComponentValidator |
withValidator(java.util.function.Consumer<? super ComponentValidator> validator)
Deprecated.
Use
withValidator(Supplier) instead |
ComponentValidator |
withValidator(java.util.function.Supplier<? extends ValidationInfo> validator) |
public static final java.util.function.Function<javax.swing.JComponent,javax.swing.JComponent> CWBB_PROVIDER
ComponentWithBrowseButton
ComponentWithBrowseButton isn't a ErrorBorderCapable
component so it needs a special provider.
Suitable for ComponentWithBrowseButton
and it's descendants.public ComponentValidator(Disposable parentDisposable)
@Deprecated public ComponentValidator withValidator(java.util.function.Consumer<? super ComponentValidator> validator)
withValidator(Supplier)
insteadpublic ComponentValidator withValidator(java.util.function.Supplier<? extends ValidationInfo> validator)
public ComponentValidator withFocusValidator(java.util.function.Supplier<? extends ValidationInfo> focusValidator)
public ComponentValidator withHyperlinkListener(javax.swing.event.HyperlinkListener hyperlinkListener)
public ComponentValidator withOutlineProvider(java.util.function.Function<? super javax.swing.JComponent,? extends javax.swing.JComponent> outlineProvider)
public ComponentValidator andStartOnFocusLost()
public ComponentValidator installOn(javax.swing.JComponent component)
public ComponentValidator andRegisterOnDocumentListener(javax.swing.text.JTextComponent textComponent)
public <T extends javax.swing.JComponent & EditorTextComponent> ComponentValidator andRegisterOnDocumentListener(T textComponent)
public void revalidate()
public static java.util.Optional<ComponentValidator> getInstance(javax.swing.JComponent component)
public ValidationInfo getValidationInfo()
public void updateInfo(ValidationInfo info)
public static ComponentPopupBuilder createPopupBuilder(ValidationInfo info, java.util.function.Consumer<? super javax.swing.JEditorPane> configurator)
public static boolean withinComponent(ValidationInfo info, java.awt.event.MouseEvent e)
public static javax.swing.border.Border getBorder()
public void enableValidation()