Class RmaDocument

All Implemented Interfaces:
Serializable, Document
Direct Known Subclasses:
AlphaDocument, AlphaNumericDocument, DateDocument, DecimalNumberDocument, DssPathnamePartDocument, JythonNameDocument, MilitaryTimeDocument, PathnameDocument, ZipCodeDocument

public class RmaDocument extends PlainDocument
an abstract PathName document for JTextFields, and other components that use PlainDocument
See Also:
  • Field Details

    • _length

      protected int _length
    • _content

      protected AbstractDocument.Content _content
    • _toolkit

      protected Toolkit _toolkit
    • _isUppercaseOnly

      protected boolean _isUppercaseOnly
    • _isLowercaseOnly

      protected boolean _isLowercaseOnly
    • tempBuf

      protected StringBuffer tempBuf
  • Constructor Details

    • RmaDocument

      public RmaDocument()
    • RmaDocument

      public RmaDocument(AbstractDocument.Content c)
    • RmaDocument

      public RmaDocument(int len)
  • Method Details

    • setLength

      public void setLength(int length)
    • getLength

      public int getLength(int length)
    • setUppercase

      public void setUppercase()
    • getUppercase

      public boolean getUppercase()
    • setLowercase

      public void setLowercase()
    • getLowercase

      public boolean getLowercase()
    • insertString

      public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
      Specified by:
      insertString in interface Document
      Overrides:
      insertString in class PlainDocument
      Throws:
      BadLocationException
    • checkValidChars

      public String checkValidChars(String str, int offs, boolean beep)
    • getCurrentInsertString

      protected String getCurrentInsertString()
      get the String currently being inserted/added to this document. Note that the String returned may or maynot be the same as the String that ends up getting inserted into this document. This is useful when a String of more than 1 character is being inserted and the isValidChar(char, int) method needs the context that the particular character it's checking.
      Returns:
      the current String or the empty "" String if nothing is being inserted
    • isValidChar

      protected boolean isValidChar(char c, int offs)