Text#
- public class Text#
A text label. Added to a
Canvasor aPanel.Base class:ObjectInherited Members
- boolean getWordWrap()#
- void setWordWrap(boolean value)#
Whether the text wraps onto further lines when it is wider than the space it has. Text that does not wrap carries on past the edge, and its preferred size is that of a single line, so a changing value leaves a layout in place.
- void setFont(String value)#
Name of the font
Note
Empty if the game provided no font to draw the text with, in which case it is not drawn. See
Text.getAvailableFonts()for the names that can be set.
- int getSize()#
- void setSize(int value)#
Font size.
- TextAnchor getAlignment()#
- void setAlignment(TextAnchor value)#
Alignment.
- float getLineSpacing()#
- void setLineSpacing(float value)#
Line spacing.
- public enum FontStyle#
Font style.
- public enum TextAlignment#
Text alignment.
- public TextAlignment LEFT#
Left aligned.
- public TextAlignment RIGHT#
Right aligned.
- public TextAlignment CENTER#
Center aligned.
- public enum TextAnchor#
Text alignment.
- public TextAnchor LOWER_CENTER#
Lower center.
- public TextAnchor LOWER_LEFT#
Lower left.
- public TextAnchor LOWER_RIGHT#
Lower right.
- public TextAnchor MIDDLE_CENTER#
Middle center.
- public TextAnchor MIDDLE_LEFT#
Middle left.
- public TextAnchor MIDDLE_RIGHT#
Middle right.
- public TextAnchor UPPER_CENTER#
Upper center.
- public TextAnchor UPPER_LEFT#
Upper left.
- public TextAnchor UPPER_RIGHT#
Upper right.