Class EntityComponentValidators

java.lang.Object
is.codion.swing.framework.ui.component.EntityComponentValidators

public final class EntityComponentValidators extends Object
A factory class for adding validators to components.
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 validate
      textComponent - the text component
      editModel - 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 validate
      textComponent - the text component
      editModel - 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 validate
      textComponent - the text component
      editModel - the edit model
      defaultToolTip - 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 validate
      textComponent - the text component
      editModel - the edit model
      defaultToolTip - the tooltip to use while the value is valid