类 TextFormatterUtil

java.lang.Object
com.tlcsdm.core.javafx.util.TextFormatterUtil

public class TextFormatterUtil extends Object
This class provides simple tools for setting up JavaFX UI control text formatter such as TextInputControl.setTextFormatter(TextFormatter).
作者:
unknowIfGuestInDream
  • 字段详细资料

    • ipAddressRegex

      private static final String ipAddressRegex
  • 构造器详细资料

    • TextFormatterUtil

      public TextFormatterUtil()
  • 方法详细资料

    • ipAddressTextFormatter

      public static javafx.scene.control.TextFormatter<String> ipAddressTextFormatter()
      返回:
      a TextFormatter that ensures proper formatting of an IP address.
    • ipAddressTextFormatter

      public static javafx.scene.control.TextFormatter<String> ipAddressTextFormatter(String defaultValue)
    • makePartialIPRegex

      private static String makePartialIPRegex()
    • maxLengthTextFormatter

      public static javafx.scene.control.TextFormatter<String> maxLengthTextFormatter(int maxCharacters)
      返回:
      a TextFormatter that ensures the amount of characters in a text is less or equal the specified amount.