| java.text.NumberFormat org.jfree.chart.util.HexNumberFormat
HexNumberFormat | public class HexNumberFormat extends NumberFormat (Code) | | A custom number formatter that formats numbers as hexadecimal strings.
There are some limitations, so be careful using this class.
|
Field Summary | |
final public static int | BYTE Number of hexadecimal digits for a byte. | final public static int | DWORD Number of hexadecimal digits for a double word. | final public static int | QWORD Number of hexadecimal digits for a quad word. | final public static int | WORD Number of hexadecimal digits for a word. |
Constructor Summary | |
public | HexNumberFormat() Creates a new instance with 8 digits. | public | HexNumberFormat(int digits) Creates a new instance with the specified number of digits. |
BYTE | final public static int BYTE(Code) | | Number of hexadecimal digits for a byte.
|
DWORD | final public static int DWORD(Code) | | Number of hexadecimal digits for a double word.
|
QWORD | final public static int QWORD(Code) | | Number of hexadecimal digits for a quad word.
|
WORD | final public static int WORD(Code) | | Number of hexadecimal digits for a word.
|
HexNumberFormat | public HexNumberFormat()(Code) | | Creates a new instance with 8 digits.
|
HexNumberFormat | public HexNumberFormat(int digits)(Code) | | Creates a new instance with the specified number of digits.
Parameters: digits - the digits. |
format | public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)(Code) | | Formats the specified number as a hexadecimal string. The decimal
fraction is ignored.
Parameters: number - the number to format. Parameters: toAppendTo - the buffer to append to (ignored here). Parameters: pos - the field position (ignored here). The string buffer. |
format | public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos)(Code) | | Formats the specified number as a hexadecimal string. The decimal
fraction is ignored.
Parameters: number - the number to format. Parameters: toAppendTo - the buffer to append to (ignored here). Parameters: pos - the field position (ignored here). The string buffer. |
getNumberOfDigits | final public int getNumberOfDigits()(Code) | | Returns the number of digits.
The number of digits. |
parse | public Number parse(String source, ParsePosition parsePosition)(Code) | | Parsing is not implemented, so this method always returns
null .
Parameters: source - ignored. Parameters: parsePosition - ignored. Always null . |
setNumberOfDigits | public void setNumberOfDigits(int digits)(Code) | | Sets the number of digits.
Parameters: digits - the number of digits. |
|
|