public class JTextFieldFilter extends PlainDocument
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Modifier and Type | Field and Description |
---|---|
protected String |
acceptedChars |
static JTextFieldFilter |
ALPHA |
private static int |
ALPHA_INT |
static JTextFieldFilter |
ALPHA_NUMERIC |
private static int |
ALPHA_NUMERIC_INT |
private static String |
ALPHA_NUMERIC_STRING |
private static String |
ALPHA_STRING |
protected int |
filterMode |
static JTextFieldFilter |
FLOAT |
private static int |
FLOAT_INT |
private static String |
FLOAT_STRING |
static JTextFieldFilter |
FLOAT_WITH_NEGATIVE |
static JTextFieldFilter |
LOWERCASE |
private static int |
LOWERCASE_INT |
private static String |
LOWERCASE_STRING |
protected boolean |
negativeAccepted |
static JTextFieldFilter |
NUMERIC |
private static int |
NUMERIC_INT |
private static String |
NUMERIC_STRING |
static JTextFieldFilter |
NUMERIC_WITH_NEGATIVE |
static JTextFieldFilter |
UPPERCASE |
private static int |
UPPERCASE_INT |
private static String |
UPPERCASE_STRING |
lineLimitAttribute, tabSizeAttribute
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
StreamDescriptionProperty, TitleProperty
Modifier | Constructor and Description |
---|---|
private |
JTextFieldFilter(int newFilterMode) |
private |
JTextFieldFilter(int newFilterMode,
boolean newNegativeAccepted) |
Modifier and Type | Method and Description |
---|---|
void |
insertString(int offset,
String str,
AttributeSet attr) |
void |
setNegativeAccepted(boolean newNegativeAccepted) |
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
private static final int LOWERCASE_INT
private static final int UPPERCASE_INT
private static final int ALPHA_INT
private static final int NUMERIC_INT
private static final int FLOAT_INT
private static final int ALPHA_NUMERIC_INT
private static final String LOWERCASE_STRING
private static final String UPPERCASE_STRING
private static final String ALPHA_STRING
private static final String NUMERIC_STRING
private static final String FLOAT_STRING
private static final String ALPHA_NUMERIC_STRING
public static final JTextFieldFilter LOWERCASE
public static final JTextFieldFilter UPPERCASE
public static final JTextFieldFilter ALPHA
public static final JTextFieldFilter NUMERIC
public static final JTextFieldFilter NUMERIC_WITH_NEGATIVE
public static final JTextFieldFilter FLOAT
public static final JTextFieldFilter FLOAT_WITH_NEGATIVE
public static final JTextFieldFilter ALPHA_NUMERIC
protected int filterMode
protected String acceptedChars
protected boolean negativeAccepted
private JTextFieldFilter(int newFilterMode)
private JTextFieldFilter(int newFilterMode, boolean newNegativeAccepted)
public void setNegativeAccepted(boolean newNegativeAccepted)
public void insertString(int offset, String str, AttributeSet attr) throws BadLocationException
insertString
in interface Document
insertString
in class PlainDocument
BadLocationException