Skip to main content

SUIText

class SUIText

It renders texts on the screen, with scale, font, color, etc, and can be modified as you wish.


public class SUIText
extends Component

— Constructors (1) —

ConstructorDescription
SUIText()Creates a new SUIText.

— Methods (21) —

NameDescription
Color getColor()Returns the current color of the SUIText.
void setColor(Color color)Sets the current color of the SUIText to be "color" argument.
String getText()Returns the current text of the SUIText.
void setText(String text)Sets the current text of the SUIText to be "text" argument.
void setText(String textLines)Sets the current text of the SUIText to be "text" argument.
int getResolution()Returns the current resolution of the SUIText.
void setResolution(int value)Sets the current resolution of the SUIText to be "value" argument.
SUnitType getResolutionUnitType()Returns the current resolution of the SUIText with its type("Pixel" or "DIP").
void setResolutionUnitType(SUnitType value)Sets the current resolution of the SUIText with its type("Pixel" or "DIP") to be "value" argument.
void setResolution(int value, SUnitType unitType)Sets the current resolution of the SUIText to br "value" argument and its type("Pixel" or "DIP") to be "unitType" argument.
float measureWidth(String text)Calculates the width that the SUIText is on the screen to be "text" argument.
float measureWidth(String[] lines)Calculates the width that the SUIText is on the screen to be "lines" argument.
float measureHeight(String text)Calculates the height that the SUIText is on the screen to be "text" argument.
float measureHeight(String[] lines)Calculates the height that the SUIText is on the screen to be "lines" argument.
float getScale()Returns the current scale of the SUIText.
void setScale(float value)Sets the current scale of the SUIText to be "value" argument.
STextAlignment getAlignment()Returns the current alignment of the SUIText.
void setAlignment(STextAlignment value)Sets the alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") of the current SUIText to be "value" argument.
boolean isIgnoreMask()Returns true if the "ignoreMask" option is checked, false if not.
void setIgnoreMask(boolean value)Defines whether the "ignoreMask" option will be activated or deactivated to be "value" argument.
Font getFont()Returns the current font of the SUIText.
void setFont(Font value)Sets the current font of the SUIText to be "value" argument.