Text Attributes

Attribute FontName

FontName is a string-valued attribute that specifies the logical font name or a font face name. The default value is "SansSerif". Java always defines the font names “Dialog”, “DialogInput”, “Monospaced”, “Serif”, “SansSerif”, and “Symbol”. Depending on the system, additional font names may be defined.

Attribute FontSize

FontSize is an integer-valued attribute that specifies the point size of the font. The default value is 12.

Attribute FontStyle

FontStyle is an integer-valued attribute that specifies the font style. This can be a bitwise combination of Font.PLAIN, Font.BOLD and/or Font.ITALIC. The default value is Font.PLAIN.

Attribute TextColor

TextColor is a Color-valued attribute that specifies the color in which the text is drawn. The default value is Color.black.

Attribute TextFormat

TextFormat is a Format-valued or a String-valued attribute that specifies how to format string objects.

TextFormat can also be set using a String, which is used to generate a Format object when the attribute is accessed. The Format object is created using the value of locale in the chart node.

Some strings have special meanings (case is ignored in these strings):

"Date(SHORT)" means use:
DateFormat.getDateInstance(SHORT, Locale)

"Date(MEDIUM)" means use
DateFormat.getDateInstance(MEDIUM, Locale)

"Date(LONG)" means use:
DateFormat.getDateInstance(LONG, Locale)

"Currency" means use
NumberFormat.getCurrencyInstance(Locale)

"Percent" means use:
NumberFormat.getPercentInstance(Locale)

If TextFormat has a string value that is not one of the above, then

new DecimalFormat(value, new DecimalFormatSymbols(Locale))

is used. For example, if its value is a String "0.00", then numbers will be formatted with exactly two digits after the decimal place. See DecimalFormat for a detailed description of these format patterns.

The default value of TextFormat is the value returned by the factory method NumberFormat.getInstance(Locale).



Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260