public class NumberDocument
extends javax.swing.text.PlainDocument
Document, typically used for JTextFields, which specifies
that only numbers may be entered.javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement| Constructor and Description |
|---|
NumberDocument() |
NumberDocument(boolean allowDecimal) |
NumberDocument(boolean allowDecimal,
boolean allowNegative) |
| Modifier and Type | Method and Description |
|---|---|
void |
insertString(int offs,
java.lang.String str,
javax.swing.text.AttributeSet a) |
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, writeUnlockpublic NumberDocument()
public NumberDocument(boolean allowDecimal)
public NumberDocument(boolean allowDecimal,
boolean allowNegative)
public void insertString(int offs,
java.lang.String str,
javax.swing.text.AttributeSet a)
throws javax.swing.text.BadLocationException
insertString in interface javax.swing.text.DocumentinsertString in class javax.swing.text.PlainDocumentjavax.swing.text.BadLocationExceptionCopyright © 2015. All Rights Reserved.