Package tripleplay.ui

Class Field.MaxLength

java.lang.Object
tripleplay.ui.Field.MaxLength
All Implemented Interfaces:
Field.Validator
Enclosing class:
Field

public static class Field.MaxLength extends Object implements Field.Validator
Blocks keypresses for a native text field when the length is at a given maximum.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The maximum length accepted.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MaxLength(int max)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return false if the keypress causing this text should be blocked.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • max

      public final int max
      The maximum length accepted.
  • Constructor Details

    • MaxLength

      public MaxLength(int max)
  • Method Details

    • isValid

      public boolean isValid(String text)
      Description copied from interface: Field.Validator
      Return false if the keypress causing this text should be blocked.
      Specified by:
      isValid in interface Field.Validator