|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.JFormattedTextField.AbstractFormatter javax.swing.text.DefaultFormatter javax.swing.text.InternationalFormatter javax.swing.text.NumberFormatter org.softsmithy.lib.swing.text.AbstractXNumberFormatter
public abstract class AbstractXNumberFormatter
The base class of the number formatters.
Constructor Summary | |
---|---|
AbstractXNumberFormatter()
Creates a new instance of this class. |
|
AbstractXNumberFormatter(NumberFormat format)
Creates a new instance of this class. |
|
AbstractXNumberFormatter(NumberFormat format,
Number minValue,
Number maxValue)
Creates a new instance of this class. |
|
AbstractXNumberFormatter(Number minValue,
Number maxValue)
Creates a new instance of this class. |
Method Summary | |
---|---|
protected Number |
getMaximumMaximumValue()
Getter for property maximumMaximumValue. |
Number |
getMaximumNumberValue()
Getter for property maximumBigDecimalValue. |
protected Number |
getMinimumMinimumValue()
Getter for property minimumMinimumValue. |
Number |
getMinimumNumberValue()
Getter for property minimumBigDecimalValue. |
NumberFormat |
getNumberFormat()
|
void |
setFormat(Format format)
|
void |
setMaximum(Comparable max)
Sets the maximum value. |
protected void |
setMaximumMaximumValue(Number maximumMaximumValue)
The maximum value for the maximum value. |
void |
setMaximumNumberValue(Number maximumValue)
Setter for property maximumBigDecimalValue. |
void |
setMinimum(Comparable minimum)
Sets the minimum value. |
protected void |
setMinimumMinimumValue(Number minimumMinimumValue)
The minimum value for the minimum value. |
void |
setMinimumNumberValue(Number minimumValue)
Setter for property minimumBigDecimalValue. |
void |
setNumberFormat(NumberFormat format)
|
void |
setValueClass(Class valueClass)
|
protected abstract Number |
stringToNumber(String text)
Returns the Number representation of the
String text . |
Object |
stringToValue(String text)
Returns the Number representation of the
String text . |
Number |
valueToRange(Number value)
|
Methods inherited from class javax.swing.text.InternationalFormatter |
---|
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, valueToString |
Methods inherited from class javax.swing.text.DefaultFormatter |
---|
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode |
Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter |
---|
getFormattedTextField, invalidEdit, setEditValid, uninstall |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractXNumberFormatter()
public AbstractXNumberFormatter(NumberFormat format)
format
- the number formatpublic AbstractXNumberFormatter(Number minValue, Number maxValue)
minValue
- the minimum valuemaxValue
- the maximum valuepublic AbstractXNumberFormatter(NumberFormat format, Number minValue, Number maxValue)
format
- the number formatminValue
- the minimum valuemaxValue
- the maximum valueMethod Detail |
---|
public void setMaximum(Comparable max)
setMaximum
in class InternationalFormatter
max
- the maximum number valuepublic void setMinimum(Comparable minimum)
setMinimum
in class InternationalFormatter
minimum
- the minimum number valuepublic Object stringToValue(String text) throws ParseException
Number
representation of the
String
text
.
stringToValue
in class InternationalFormatter
text
- String
to convert
Number
representation of text
ParseException
- if there is an error in the conversionprotected abstract Number stringToNumber(String text) throws NumberFormatException
Number
representation of the
String
text
.
text
- String
to convert
Number
representation of text
NumberFormatException
- if there is an error in the conversionpublic Number valueToRange(Number value)
protected Number getMaximumMaximumValue()
protected void setMaximumMaximumValue(Number maximumMaximumValue)
maximumMaximumValue
- the maximum value for the maximum valueprotected Number getMinimumMinimumValue()
protected void setMinimumMinimumValue(Number minimumMinimumValue)
public Number getMaximumNumberValue()
public void setMaximumNumberValue(Number maximumValue)
maximumBigDecimalValue
- New value of property maximumBigDecimalValue.public Number getMinimumNumberValue()
public void setMinimumNumberValue(Number minimumValue)
minimumBigDecimalValue
- New value of property minimumBigDecimalValue.public void setValueClass(Class valueClass)
setValueClass
in class DefaultFormatter
public void setFormat(Format format)
setFormat
in class NumberFormatter
public NumberFormat getNumberFormat()
public void setNumberFormat(NumberFormat format)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |