|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.text.Format
java.text.NumberFormat
org.jfree.chart.util.HexNumberFormat
public class HexNumberFormat
A custom number formatter that formats numbers as hexadecimal strings. There are some limitations, so be careful using this class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.NumberFormat |
---|
java.text.NumberFormat.Field |
Field Summary | |
---|---|
static int |
BYTE
Number of hexadecimal digits for a byte. |
static int |
DWORD
Number of hexadecimal digits for a double word. |
static int |
QWORD
Number of hexadecimal digits for a quad word. |
static int |
WORD
Number of hexadecimal digits for a word. |
Fields inherited from class java.text.NumberFormat |
---|
FRACTION_FIELD, INTEGER_FIELD |
Constructor Summary | |
---|---|
HexNumberFormat()
Creates a new instance with 8 digits. |
|
HexNumberFormat(int digits)
Creates a new instance with the specified number of digits. |
Method Summary | |
---|---|
java.lang.StringBuffer |
format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats the specified number as a hexadecimal string. |
java.lang.StringBuffer |
format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats the specified number as a hexadecimal string. |
int |
getNumberOfDigits()
Returns the number of digits. |
java.lang.Number |
parse(java.lang.String source,
java.text.ParsePosition parsePosition)
Parsing is not implemented, so this method always returns null . |
void |
setNumberOfDigits(int digits)
Sets the number of digits. |
Methods inherited from class java.text.NumberFormat |
---|
clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode |
Methods inherited from class java.text.Format |
---|
format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BYTE
public static final int WORD
public static final int DWORD
public static final int QWORD
Constructor Detail |
---|
public HexNumberFormat()
public HexNumberFormat(int digits)
digits
- the digits.Method Detail |
---|
public final int getNumberOfDigits()
public void setNumberOfDigits(int digits)
digits
- the number of digits.public java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
number
- the number to format.toAppendTo
- the buffer to append to (ignored here).pos
- the field position (ignored here).
public java.lang.StringBuffer format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
number
- the number to format.toAppendTo
- the buffer to append to (ignored here).pos
- the field position (ignored here).
public java.lang.Number parse(java.lang.String source, java.text.ParsePosition parsePosition)
null
.
parse
in class java.text.NumberFormat
source
- ignored.parsePosition
- ignored.
null
.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |