Formatting Text

get/setAutofit()

These methods get/set automatic fitting/sizing for a specified text object.

SYNTAX:

boolean getAutofit();
boolean getAutofit (IdentObj id);
void     setAutofit (boolean newValue);
void     setAutofit (IdentObj id, boolean newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getTitle())

newValue; true = enable autofit, false = disable autofit

RETURN:

boolean; true = Autofit enabled, false = Autofit disbled

EXAMPLE:

setAutofit (getFootnote(), false);
setFontName (getFootnote(), "TimesRoman");
setFontSizeVC (getFootnote(), 2318);

NOTES:

ALSO SEE:

FootnoteAutofit, LegendTextAutofit, O1/O2LabelAutofit, O1/O2TitleAutofit, X1/Y1/Y2LabelAutofit, X1/Y1/Y2TitleAutofit

get/setFontName()

These methods get/set a text object's font name.

SYNTAX:

String getFontName();
String getFontName (IdentObj id);
void   setFontName (String newValue);
void   setFontName (IdentObj id, String newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getFootnote())

newValue; Font name string

RETURN:

String; font name, null = no font name applied at id or objectID

EXAMPLE:

setFontName (getFootnote(), "TimesRoman");
setFontName (getLegendText(), "Dialog");
setFontName (getSubtitle(), "DialogInput");
setFontName (getTitle(), "Courier");

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

ALSO SEE:

get/setFontSizeVC(), get/setFontStyle(), get/setFontSizeInPoints()

get/setFontSize()

These methods have been replaced by get/setFontSizeInPoints(). They are included here for backward compatibility.

SYNTAX:

int getFontSize();
int getFontSize (IdentObj id);
void setFontSize (int newValue);
void setFontSize (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getFootnote())

newValue; Font size in points

RETURN:

int; Font size in points

ALSO SEE:

get/setFontSizeVC(), get/setFontSizeAbsolute(), get/setFontSizeInPoints()

get/setFontSizeAbsolute()

These methods get/set how a text object's font size is changed. When true, setFontSizeInPoints() must be used to set a text object's font size in points. When false, setFontSizeVC() must be used to set a text object's font size in virtual coordinates.

SYNTAX:

boolean getFontSizeAbsolute();
boolean getFontSizeAbsolute (IdentObj id);
void     setFontSizeAbsolute (boolean newValue);
void     setFontSizeAbsolute (IdentObj id, boolean newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getFootnote())

newValue; true = use setFontSizeInPoints() to change font sizes, false = use setFontSizeVC() to change font sizes.

RETURN:

boolean; true = use setFontSizeInPoints() to change font sizes, false = use setFontSizeVC() to change font sizes.

EXAMPLE:

setFontSizeAbsolute (getTitle(), true);
setFontSizeInPoints (getTitle(), 14);
setFontSizeAbsolute (getSubtitle(), false);
setFontSizeVC (getSubtitle(), 2000);
setDepthRadius (0);

NOTES:

If an object ID (id) is not specified, newValue is assigned to the first item in the selection list (if applicable).

ALSO SEE:

get/setFontSizeVC(), get/setFontSizeInPoints()

get/setFontSizeInPoints()

These methods get/set a font size for a text object. If absolute font size is disabled for the object (i.e., setFontSizeAbsolute (object, false), you must use setFontSizeVC() to set the object's font size in virtual coordinates. These methods get/set the font size in points.

SYNTAX:

int getFontSizeInPoints();
int getFontSizeInPoints (IdentObj id);
void setFontSizeInPoints (int newValue);
void setFontSizeInPoints (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getFootnote())

newValue; Font size value in points (1...128). The default value is 12.

RETURN:

int; text object's font size in points (1...128). The default value is 12.

EXAMPLE:

see setFontSizeAbsolute()

NOTES:

ALSO SEE:

get/setFontSizeVC(), get/setFontSizeAbsolute(),

get/setFontSizeVC()

These methods get/set a text object's font size in virtual coordinates. If font size absolute is enabled with setFontSizeAbsolute (object, true), you must use setFontSizeInPoints() to set the font size in points. These methods get/set the font size in virtual coordinates.

SYNTAX:

int getFontSizeVC();
int getFontSizeVC (IdentObj id);
void setFontSizeVC (int newValue);
void setFontSizeVC (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getTitle())

newValue; Font size in virtual coordinates

RETURN:

int; font size in virtual coordinates

EXAMPLE:

see setFontSizeAbsolute()

NOTES:

ALSO SEE:

get/setFontSizeAbsolute(), get/setFontSizeInPoints()

get/setFontStyle()

These methods get/set the font style of a text object.

SYNTAX:

int getFontStyle();
int getFontStyle (IdentObj id);
void setFontStyle (int newValue);
void setFontStyle (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getFootnote())

newValue; font style (0...7). 0 = Plain, 1 = Italic, 2 = Bold, 3 = Italic/Bold, 4 = Underline, 5= Italic/Underline, 6= Bold/Underline, 7= Bold/Italic/Underline

RETURN:

int; font style (0...7)

EXAMPLE:

setViewableGroups (3);
setViewableSeries (3);
setDataScrollerPresenceGroups (0);
setFontStyle (getSubtitle(), 2);
setFontStyle (getTitle(), 7);

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

ALSO SEE:

get/setFontSizeVC(), get/setFontSizeAbsolute(), get/setFontSizeInPoints(), get/setFontName