java.lang.Object
is.codion.swing.common.ui.component.text.TextComponents

public final class TextComponents extends Object
A utility class for JTextComponents.
  • Method Details

    • maximumLength

      public static void maximumLength(Document document, int maximumLength)
      Sets the maximum length for the given document, supports SizedDocument and AbstractDocument
      Parameters:
      document - the document
      maximumLength - the maximum string length
    • upperCase

      public static void upperCase(Document document)
      Makes the given document convert all lower case input to upper case, supports SizedDocument and AbstractDocument
      Parameters:
      document - the document
    • lowerCase

      public static void lowerCase(Document document)
      Makes the given document convert all upper case input to lower case, supports SizedDocument and AbstractDocument
      Parameters:
      document - the document
    • preferredTextFieldSize

      public static Dimension preferredTextFieldSize()
      Returns:
      the preferred size of a JTextField
    • preferredTextFieldHeight

      public static int preferredTextFieldHeight()
      Returns:
      the preferred height of a JTextField