public class NumberValuesDocument extends RegularExpressionDocument
NumberValuesDocument can take any character that is specified in the given
regular expressionAbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_REGEX
The Constant for the default regular expression.
|
lineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
NumberValuesDocument()
Instantiates a new
NumberValuesDocument object with the default regular expression |
NumberValuesDocument(@NonNull String regex)
Instantiates a new
NumberValuesDocument object |
| Modifier and Type | Method and Description |
|---|---|
String |
validate(String proposedValue)
Validate the given value by this
RegularExpressionDocument object |
insertString, removecreateDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdateaddDocumentListener, 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, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic static final String DEFAULT_REGEX
public NumberValuesDocument()
NumberValuesDocument object with the default regular expressionpublic NumberValuesDocument(@NonNull
@NonNull String regex)
NumberValuesDocument objectregex - the regular expressionpublic String validate(String proposedValue) throws IllegalArgumentException
RegularExpressionDocument objectvalidate in class RegularExpressionDocumentproposedValue - the proposed valueIllegalArgumentException - if the validation failsCopyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.