public class BigIntegerFormatter extends NumberFormatter
BigInteger values in a FormattedText.
BigIntegerFormatter returns different numeric types based on the current
value in the Text field. BigIntegerFormatter is an override of NumberFormatter
allowing to guaranty to always return BigInteger values (Number.longValue()).
alwaysShowDec, cachedPatterns, decimalLen, editPattern, editValue, fixedDec, fixedInt, groupLen, intCount, intLen, locale, minus, modified, nbspSeparator, negative, nfDisplay, nfEdit, prefixLen, suffixLen, symbols, value, zeroDecimalLen, zeroIntLenEMPTY, ignore, SPACE, text| Constructor and Description |
|---|
BigIntegerFormatter()
Constructs a new instance with all defaults.
|
BigIntegerFormatter(java.util.Locale loc)
Constructs a new instance with default edit and display masks for the given
locale.
|
BigIntegerFormatter(java.lang.String editPattern)
Constructs a new instance with the given edit mask.
|
BigIntegerFormatter(java.lang.String editPattern,
java.util.Locale loc)
Constructs a new instance with the given edit mask and locale.
|
BigIntegerFormatter(java.lang.String editPattern,
java.lang.String displayPattern)
Constructs a new instance with the given edit and display masks.
|
BigIntegerFormatter(java.lang.String editPattern,
java.lang.String displayPattern,
java.util.Locale loc)
Constructs a new instance with the given masks and locale.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getValue()
Returns the current value of the text control if it is a valid
BigInteger. |
java.lang.Class<java.math.BigInteger> |
getValueType()
Returns the type of value this
ITextFormatter handles,
i.e. |
clearText, format, getDefaultPattern, getDisplayString, getEditString, isEmpty, isValid, setDecimalSeparatorAlwaysShown, setFixedLengths, setPatterns, setPrefix, setSuffix, setValue, verifyTextbeep, detach, setIgnore, setText, updateText, updateTextpublic BigIntegerFormatter()
NumberFormatter.NumberFormatter()public BigIntegerFormatter(java.util.Locale loc)
loc - the localepublic BigIntegerFormatter(java.lang.String editPattern,
java.util.Locale loc)
editPattern - the edit maskloc - the localepublic BigIntegerFormatter(java.lang.String editPattern,
java.lang.String displayPattern,
java.util.Locale loc)
editPattern - the edit maskdisplayPattern - the display maskloc - the localepublic BigIntegerFormatter(java.lang.String editPattern,
java.lang.String displayPattern)
editPattern - the edit maskdisplayPattern - the display maskpublic BigIntegerFormatter(java.lang.String editPattern)
editPattern - the edit maskpublic java.lang.Object getValue()
BigInteger.
If the buffer is flagged as modified, the value is recalculated by parsing
with the nfEdit initialized with the edit pattern. If the
number is not valid, returns null.getValue in interface ITextFormattergetValue in class NumberFormatterBigInteger value if valid, else nullITextFormatter.getValue()public java.lang.Class<java.math.BigInteger> getValueType()
ITextFormatter handles,
i.e. returns in getValue().getValueType in interface ITextFormattergetValueType in class NumberFormatter