edu.wisc.ssec.mcidasv.util
Class McVTextField.McVTextFieldDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by edu.wisc.ssec.mcidasv.util.McVTextField.McVTextFieldDocument
All Implemented Interfaces:
Serializable, Document
Enclosing class:
McVTextField

private class McVTextField.McVTextFieldDocument
extends PlainDocument

Extend PlainDocument to get the character validation features we require


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
 
Field Summary
private  Pattern allow
           
private  Pattern deny
           
private  boolean hasPatterns
           
private  int limit
           
private  boolean toUppercase
           
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
McVTextField.McVTextFieldDocument()
           
McVTextField.McVTextFieldDocument(int limit, boolean upper)
           
 
Method Summary
 int getLimit()
           
 boolean getUppercase()
           
 void insertString(int offset, String str, AttributeSet attr)
           
 void setAllow(Pattern newPattern)
           
 void setDeny(Pattern newPattern)
           
 void setLimit(int limit)
           
 void setUppercase(boolean uppercase)
           
 
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

limit

private int limit

toUppercase

private boolean toUppercase

hasPatterns

private boolean hasPatterns

allow

private Pattern allow

deny

private Pattern deny
Constructor Detail

McVTextField.McVTextFieldDocument

public McVTextField.McVTextFieldDocument()

McVTextField.McVTextFieldDocument

public McVTextField.McVTextFieldDocument(int limit,
                                         boolean upper)
Method Detail

insertString

public void insertString(int offset,
                         String str,
                         AttributeSet attr)
                  throws BadLocationException
Specified by:
insertString in interface Document
Overrides:
insertString in class PlainDocument
Throws:
BadLocationException

getLimit

public int getLimit()

setLimit

public void setLimit(int limit)

getUppercase

public boolean getUppercase()

setUppercase

public void setUppercase(boolean uppercase)

setAllow

public void setAllow(Pattern newPattern)

setDeny

public void setDeny(Pattern newPattern)