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, tabSizeAttribute
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
StreamDescriptionProperty, 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, 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
protected int decimalPrecision
protected boolean allowNegative
public void insertString(int offset, String str, AttributeSet attr) throws BadLocationException
insertString
in interface Document
insertString
in class PlainDocument
BadLocationException
public static boolean isNaturalNumber(String str)