public interface TextStyleProperties
TextStyleProperties
interface represents common text styling properties. It is used to style all texts
that appear in controls.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLineHeight()
Line height.
|
java.lang.String |
getTextBold()
Text bold setting.
|
java.lang.String |
getTextColor()
Text color.
|
java.lang.String |
getTextDecoration()
Text decoration property (shown as Lines in the designer).
|
java.lang.String |
getTextFont()
List of text fonts.
|
java.lang.String |
getTextItalic()
Text italic setting.
|
java.lang.String |
getTextSize()
Text size.
|
void |
setLineHeight(java.lang.String lineHeight)
Sets the line height, this is equivalent to the CSS line-height property and any valid value for this CSS property can be used.
|
void |
setTextBold(java.lang.String textBold)
Sets the text bold setting.
|
void |
setTextColor(java.lang.String textColor)
Sets the text color, this is equivalent to the CSS color property and any valid value for this CSS property can be used.
|
void |
setTextDecoration(java.lang.String textDecoration)
Sets the text decoration property (shown as Lines in the designer).
|
void |
setTextFont(java.lang.String textFont)
Sets the list of text fonts, this is equivalent to the CSS font-family property and any valid value for this CSS property can be used.
|
void |
setTextItalic(java.lang.String textItalic)
Sets the text italic setting.
|
void |
setTextSize(java.lang.String textSize)
Sets the text size, this is equivalent to the CSS font-size property and any valid value for this CSS property can be used.
|
java.lang.String getTextFont()
setTextFont(String)
void setTextFont(java.lang.String textFont)
null
removes any existing value. Note that any inherited value
from a parent control may still apply.
Examples:
controls.TEXT1.textFont = "sans-serif"; controls.TEXT1.setTextFont("Arial, Verdana");
java.lang.String getTextColor()
setTextColor(String)
void setTextColor(java.lang.String textColor)
null
removes any existing value. Note that any inherited value
from a parent control may still apply.
Examples:
controls.TEXT1.textColor = "#808080"; controls.TEXT1.setTextColor("green");
java.lang.String getTextBold()
setTextBold(String)
void setTextBold(java.lang.String textBold)
Supported values:
Value | Constant |
---|---|
Bold | ControlConstants.TEXT_BOLD |
Normal | ControlConstants.TEXT_NORMAL |
Setting a value of null
removes any existing value for the property.
Note that any inherited value from a parent control may still apply.
Examples:
controls.TEXT1.textBold = ControlConstants.TEXT_BOLD; controls.TEXT1.setTextBold(ControlConstants.TEXT_NORMAL);
java.lang.String getTextItalic()
setTextItalic(String)
void setTextItalic(java.lang.String textItalic)
Supported values:
Value | Constant |
---|---|
Italic | ControlConstants.TEXT_ITALIC |
Normal | ControlConstants.TEXT_NORMAL |
Oblique | ControlConstants.TEXT_OBLIQUE |
Setting a value of null
removes any existing value for the property.
Note that any inherited value from a parent control may still apply.
Examples:
controls.TEXT1.textItalic = ControlConstants.TEXT_ITALIC; controls.TEXT1.setTextItalic(ControlConstants.TEXT_NORMAL);
java.lang.String getTextDecoration()
setTextDecoration(String)
void setTextDecoration(java.lang.String textDecoration)
textDecoration
must be one of the following:
Supported values:
Value | Constant |
---|---|
none | ControlConstants.NONE |
overline | ControlConstants.TEXT_OVERLINE |
underline | ControlConstants.TEXT_UNDERLINE |
line-through | ControlConstants.TEXT_LINE_THROUGH |
Setting a value of null
removes any existing value for the property.
Examples:
controls.TEXT1.textDecoration = ControlConstants.TEXT_UNDERLINE; controls.TEXT1.setTextDecoration(ControlConstants.TEXT_LINE_THROUGH);
java.lang.String getTextSize()
setTextSize(String)
void setTextSize(java.lang.String textSize)
null
removes any existing value. Note that any inherited value
from a parent control may still apply.
Examples:
controls.TEXT1.textSize = "12px"; controls.TEXT1.setTextSize("small");
java.lang.String getLineHeight()
setLineHeight(String)
void setLineHeight(java.lang.String lineHeight)
null
removes any existing value. Note that any inherited value
from a parent control may still apply.
Examples:
controls.TEXT1.lineHeight = "12px"; controls.TEXT1.setLineHeight("1.5em");