TextStyle
Inheritance: java.lang.Object
public class TextStyle
Change the visual style of the text for an item in the project view.
Constructors
Constructor | Description |
---|---|
TextStyle() | Initializes a new instance of the TextStyle class with default settings. |
TextStyle(float fontSize, int fontStyle) | Initializes a new instance of the TextStyle class with the default font and specified font size and style. |
TextStyle(int fontStyle) | Initializes a new instance of the TextStyle class with the default font and specified font style. |
TextStyle(FontDescriptor font) | Initializes a new instance of the TextStyle class with the specified font settings. |
Methods
Method | Description |
---|---|
getBackgroundColor() | Gets background color of the text style. |
getBackgroundPattern() | Gets background pattern of the text style. |
getColor() | Gets color of the text. |
getFont() | Gets font of the text style. |
getItemType() | Gets TextItemType of the text style. |
setBackgroundColor(Color value) | Sets background color of the text style. |
setBackgroundPattern(int value) | Sets background pattern of the text style. |
setColor(Color value) | Sets color of the text. |
setFont(FontDescriptor value) | Sets font of the text style. |
setItemType(int value) | Sets TextItemType of the text style. |
TextStyle()
public TextStyle()
Initializes a new instance of the TextStyle class with default settings.
TextStyle(float fontSize, int fontStyle)
public TextStyle(float fontSize, int fontStyle)
Initializes a new instance of the TextStyle class with the default font and specified font size and style.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | float | Size of font of TextStyle. |
fontStyle | int | Style of font of TextStyle. |
TextStyle(int fontStyle)
public TextStyle(int fontStyle)
Initializes a new instance of the TextStyle class with the default font and specified font style.
Parameters:
Parameter | Type | Description |
---|---|---|
fontStyle | int | Style of font to apply to default font. |
TextStyle(FontDescriptor font)
public TextStyle(FontDescriptor font)
Initializes a new instance of the TextStyle class with the specified font settings.
Parameters:
Parameter | Type | Description |
---|---|---|
font | FontDescriptor | Font of the TextStyle. |
getBackgroundColor()
public final Color getBackgroundColor()
Gets background color of the text style. Color
(getBackgroundColor()/setBackgroundColor(java.awt.Color)).
Returns: java.awt.Color - background color of the text style.
getBackgroundPattern()
public final int getBackgroundPattern()
Gets background pattern of the text style. BackgroundPattern
(getBackgroundPattern()/setBackgroundPattern(int)).
Returns: int - background pattern of the text style.
getColor()
public final Color getColor()
Gets color of the text.
Returns: java.awt.Color - color of the text.
getFont()
public final FontDescriptor getFont()
Gets font of the text style.
Returns: FontDescriptor - font of the text style.
getItemType()
public int getItemType()
Gets TextItemType of the text style.
Returns: int - TextItemType of the text style.
setBackgroundColor(Color value)
public final void setBackgroundColor(Color value)
Sets background color of the text style. Color
(getBackgroundColor()/setBackgroundColor(java.awt.Color)).
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.awt.Color | background color of the text style. |
setBackgroundPattern(int value)
public final void setBackgroundPattern(int value)
Sets background pattern of the text style. BackgroundPattern
(getBackgroundPattern()/setBackgroundPattern(int)).
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | background pattern of the text style. |
setColor(Color value)
public final void setColor(Color value)
Sets color of the text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.awt.Color | color of the text. |
setFont(FontDescriptor value)
public final void setFont(FontDescriptor value)
Sets font of the text style.
Parameters:
Parameter | Type | Description |
---|---|---|
value | FontDescriptor | font of the text style. |
setItemType(int value)
public void setItemType(int value)
Sets TextItemType of the text style.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | TextItemType of the text style. |