Class FWTextFieldFilter
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
net.simplace.pipe.util.components.LimitedDocument
net.simplace.pipe.util.components.FWTextFieldFilter
- All Implemented Interfaces:
Serializable
,Document
Document for filtering documents.
Copied from http://www.codeguru.com/java/articles/443.shtml
- Author:
- Andreas Enders
- See Also:
-
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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
protected String
static final String
protected boolean
static final String
static final String
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
ConstructorDescriptionFWTextFieldFilter
(String aAcceptedChars) FWTextFieldFilter
(String aAcceptedChars, boolean negativeaccepted) FWTextFieldFilter
(String aAcceptedChars, boolean negativeaccepted, int aDocumentMaxSize, DocumentListener aListener) FWTextFieldFilter
(String aAcceptedChars, int aDocumentMaxSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
insertString
(int offset, String str, AttributeSet attr) Insert the new string and checks for the new length.void
setAcceptedChars
(String aAcceptedChars) void
setNegativeAccepted
(boolean negativeaccepted) Methods inherited from class net.simplace.pipe.util.components.LimitedDocument
setMaxSize
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
-
Field Details
-
LOWERCASE
- See Also:
-
UPPERCASE
- See Also:
-
ALPHA
- See Also:
-
NUMERIC
- See Also:
-
FLOAT
- See Also:
-
ALPHA_NUMERIC
- See Also:
-
iAcceptedChars
-
negativeAccepted
protected boolean negativeAccepted
-
-
Constructor Details
-
FWTextFieldFilter
public FWTextFieldFilter() -
FWTextFieldFilter
-
FWTextFieldFilter
-
FWTextFieldFilter
-
FWTextFieldFilter
public FWTextFieldFilter(String aAcceptedChars, boolean negativeaccepted, int aDocumentMaxSize, DocumentListener aListener)
-
-
Method Details
-
setAcceptedChars
-
setNegativeAccepted
public void setNegativeAccepted(boolean negativeaccepted) -
insertString
Description copied from class:LimitedDocument
Insert the new string and checks for the new length.- Specified by:
insertString
in interfaceDocument
- Overrides:
insertString
in classLimitedDocument
- Throws:
BadLocationException
-