public class IntegerDocument extends PlainDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
static int |
BIGDECIMAL |
static int |
BIGINTEGER |
static int |
INTEGER |
protected Number |
integerValue |
protected int |
lastNumberTypeUsed |
static int |
LONG |
protected NumberFormat |
numberFormat |
static int |
SHORT |
protected DecimalFormatSymbols |
symbols |
lineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
IntegerDocument() |
| Modifier and Type | Method and Description |
|---|---|
void |
format() |
Number |
getIntegerValue(String s) |
int |
getNumberTypeUsed() |
protected Number |
getNumericValue(String s)
This method returns a
Number object in function of
type specified in getNumberTypeUsed() (This type is
also modifiable in parameter "numbertype" of
IntegerDataField.init(java.util.Hashtable). |
Number |
getValue() |
void |
insertString(int offset,
String stringValue,
AttributeSet attributes) |
protected void |
insertStringWithoutCheck(int offset,
String stringValue,
AttributeSet attributes) |
boolean |
isRight() |
void |
remove(int offset,
int len) |
protected void |
removeWithoutCheck(int offset,
int len) |
void |
setGroupingUsed(boolean m) |
void |
setMaximumIntegerDigits(int number) |
void |
setMinimumIntegerDigits(int number) |
void |
setNumberTypeUsed(int lastNumberTypeUsed) |
void |
setValue(Number value) |
protected void |
updateValue() |
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, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic static final int INTEGER
public static final int SHORT
public static final int LONG
public static final int BIGINTEGER
public static final int BIGDECIMAL
protected int lastNumberTypeUsed
protected NumberFormat numberFormat
protected DecimalFormatSymbols symbols
protected Number integerValue
public boolean isRight()
public void format()
public int getNumberTypeUsed()
public void setNumberTypeUsed(int lastNumberTypeUsed)
protected Number getNumericValue(String s)
Number object in function of
type specified in getNumberTypeUsed() (This type is
also modifiable in parameter "numbertype" of
IntegerDataField.init(java.util.Hashtable). Available types are:
s - the string with valuepublic void setValue(Number value)
public Number getValue()
protected void updateValue()
public void insertString(int offset,
String stringValue,
AttributeSet attributes)
throws BadLocationException
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionprotected void insertStringWithoutCheck(int offset,
String stringValue,
AttributeSet attributes)
throws BadLocationException
BadLocationExceptionprotected void removeWithoutCheck(int offset,
int len)
throws BadLocationException
BadLocationExceptionpublic void remove(int offset,
int len)
throws BadLocationException
remove in interface Documentremove in class AbstractDocumentBadLocationExceptionpublic void setMinimumIntegerDigits(int number)
public void setMaximumIntegerDigits(int number)
public void setGroupingUsed(boolean m)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.