|
JFreeChart 1.0.14-redhat-2 | |||||||||
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 |
---|
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 | |
---|---|
StringBuffer |
format(double number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats the specified number as a hexadecimal string. |
StringBuffer |
format(long number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats the specified number as a hexadecimal string. |
int |
getNumberOfDigits()
Returns the number of digits. |
Number |
parse(String source,
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.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 StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)
format
in class NumberFormat
number
- the number to format.toAppendTo
- the buffer to append to (ignored here).pos
- the field position (ignored here).
public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos)
format
in class NumberFormat
number
- the number to format.toAppendTo
- the buffer to append to (ignored here).pos
- the field position (ignored here).
public Number parse(String source, ParsePosition parsePosition)
null
.
parse
in class NumberFormat
source
- ignored.parsePosition
- ignored.
null
.
|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |