Module is.codion.swing.framework.ui
Class EntityComponentValidators
java.lang.Object
is.codion.swing.framework.ui.component.EntityComponentValidators
A factory class for adding validators to components.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidaddFormattedValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel) Adds a validator to the given text component, based on the given value link and edit modelstatic <T> voidaddFormattedValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel, String defaultToolTip) Adds a validator to the given text component, based on the given value link and edit modelstatic <T> voidaddValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel) Adds a validator to the given text component, based on the given value link and edit modelstatic <T> voidaddValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel, String defaultToolTip) Adds a validator to the given text component, based on the given value link and edit model
-
Method Details
-
addValidator
public static <T> void addValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel) Adds a validator to the given text component, based on the given value link and edit model- Type Parameters:
T- the value type- Parameters:
attribute- the attribute of the value to validatetextComponent- the text componenteditModel- the edit model
-
addFormattedValidator
public static <T> void addFormattedValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel) Adds a validator to the given text component, based on the given value link and edit model- Type Parameters:
T- the value type- Parameters:
attribute- the attribute of the value to validatetextComponent- the text componenteditModel- the edit model
-
addValidator
public static <T> void addValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel, String defaultToolTip) Adds a validator to the given text component, based on the given value link and edit model- Type Parameters:
T- the value type- Parameters:
attribute- the attribute of the value to validatetextComponent- the text componenteditModel- the edit modeldefaultToolTip- the tooltip to use while the value is valid
-
addFormattedValidator
public static <T> void addFormattedValidator(is.codion.framework.domain.entity.attribute.Attribute<T> attribute, JTextComponent textComponent, is.codion.framework.model.EntityEditModel editModel, String defaultToolTip) Adds a validator to the given text component, based on the given value link and edit model- Type Parameters:
T- the value type- Parameters:
attribute- the attribute of the value to validatetextComponent- the text componenteditModel- the edit modeldefaultToolTip- the tooltip to use while the value is valid
-