Text Labels

Java Class Name:  VoltageLabel

Notable APIs:

void SetText( String newText );
Sets the text for the label.

String GetText();
Returns the label’s text.

void SetColor( Color color );
Sets the text color. color is a Java Color object and can include an alpha value.

void SetBkColor( Color color );
Sets the background color for the label control (by default, it has an alpha value of zero).

void SetBorderColor( Color color );
Sets the color of the control’s border (alpha = zero by default).

void SetBorderSize( int pixSize );
Sets the width of the border, in pxiels.

void SetFont( String typeface, int fontSize, boolean bBold, boolean bItalic );
Sets various properties of the control’s font. fontSize is height in pixels.

void SetJustificationFlags( Justification justificationFlag );
Sets the text’s horizontal and vertical justification.

void SetMultiLineEdit( boolean bMultiLineEdit );
Set to true to make this a multi-line text control.

void SetHorizontalScale( double scale );
Allows you to change the widths of the characters in the text control. 1.0 = normal, 2.0 = double width, 0.5 = half width, etc.

Save/Restore State:  Voltage Modular doesn’t save or restore state information for text labels with presets.

Text: The text that will be displayed in the label.

Font, Font Height, Bold, and Italic: These set basic font properties for the text. The Font dropdown will only show typefaces that are preinstalled on both Windows and Mac computers..

Horizontal and Vertical Orientation: How the text will be aligned within its bounding rectangle.

Multi Line: if checked, the text can be more than one line tall.

Text Color: the text color and opacity.

Background Color: color and opacity for the background of the text label’s bounding rectangle.

Border Color: color and opacity of a border drawn around the text label’s bounding rectangle.

Border Width: width, in pixels, of the text label’s border. Only applicable if the border color property specifies a non-zero opacity.