public class JTextFieldFilter
extends javax.swing.text.PlainDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
acceptedChars |
static java.lang.String |
ALPHA |
static java.lang.String |
ALPHA_NUMERIC |
static java.lang.String |
FLOAT |
static java.lang.String |
LOWERCASE |
protected boolean |
negativeAccepted |
static java.lang.String |
NUMERIC |
static java.lang.String |
UPPERCASE |
Constructor and Description |
---|
JTextFieldFilter() |
JTextFieldFilter(java.lang.String acceptedchars) |
Modifier and Type | Method and Description |
---|---|
void |
insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet attr) |
void |
setNegativeAccepted(boolean negativeaccepted) |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
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
public static final java.lang.String LOWERCASE
public static final java.lang.String UPPERCASE
public static final java.lang.String ALPHA
public static final java.lang.String NUMERIC
public static final java.lang.String FLOAT
public static final java.lang.String ALPHA_NUMERIC
protected java.lang.String acceptedChars
protected boolean negativeAccepted
public JTextFieldFilter()
public JTextFieldFilter(java.lang.String acceptedchars)
public void setNegativeAccepted(boolean negativeaccepted)
public void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet attr) throws javax.swing.text.BadLocationException
insertString
in interface javax.swing.text.Document
insertString
in class javax.swing.text.PlainDocument
javax.swing.text.BadLocationException