Class TextRun
java.lang.Object
com.codename1.art.TextRun
A stretch of text with one style.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()A deep copy.getFill()The text paint.The family name, or null.floatExtra space between characters, in the node's units.floatgetSize()The size in the node's units.getText()The characters.booleanisBold()True for bold.booleanisItalic()True for italic.booleanTrue for strikethrough.booleanTrue for underline.voidsetBold(boolean bold) Sets bold.voidSets the text paint.voidsetFontFamily(String fontFamily) Sets the family.voidsetItalic(boolean italic) Sets italic.voidsetLetterSpacing(float letterSpacing) Sets the letter spacing.voidsetSize(float size) Sets the size.voidsetStrikethrough(boolean strikethrough) Sets strikethrough.voidSets the characters.voidsetUnderline(boolean underline) Sets underline.
-
Constructor Details
-
TextRun
-
-
Method Details
-
copy
A deep copy. -
getText
The characters. -
setText
Sets the characters.
Parameters
text: the characters
-
getFontFamily
The family name, or null. -
setFontFamily
Sets the family.
Parameters
fontFamily: the family name
-
getSize
public float getSize()The size in the node's units. -
setSize
public void setSize(float size) Sets the size.
Parameters
size: the size
-
isBold
public boolean isBold()True for bold. -
setBold
public void setBold(boolean bold) Sets bold.
Parameters
bold: true for bold
-
isItalic
public boolean isItalic()True for italic. -
setItalic
public void setItalic(boolean italic) Sets italic.
Parameters
italic: true for italic
-
isUnderline
public boolean isUnderline()True for underline. -
setUnderline
public void setUnderline(boolean underline) Sets underline.
Parameters
underline: true to underline
-
isStrikethrough
public boolean isStrikethrough()True for strikethrough. -
setStrikethrough
public void setStrikethrough(boolean strikethrough) Sets strikethrough.
Parameters
strikethrough: true to strike through
-
getFill
The text paint. -
setFill
Sets the text paint.
Parameters
fill: the paint
-
getLetterSpacing
public float getLetterSpacing()Extra space between characters, in the node's units. -
setLetterSpacing
public void setLetterSpacing(float letterSpacing) Sets the letter spacing.
Parameters
letterSpacing: extra space between characters
-