public class NumericDocument extends PlainDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowNegative |
protected int |
decimalPrecision |
lineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
NumericDocument() |
| Modifier and Type | Method and Description |
|---|---|
void |
insertString(int offset,
String str,
AttributeSet attr) |
static boolean |
isNaturalNumber(String str) |
createDefaultRoot, 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, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockprotected int decimalPrecision
protected boolean allowNegative
public void insertString(int offset,
String str,
AttributeSet attr)
throws BadLocationException
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionpublic static boolean isNaturalNumber(String str)