TextStyle
Leave feedback
On this page
Inheritance: java.lang.Object
public final class TextStyle
Represents the style of the text such as a font name, a font size and so on.
| Constructor | Description |
|---|---|
| TextStyle(String name, String fontName, double fontSize, boolean bold, boolean italic) | Initializes a new instance of the TextStyle class. |
| Method | Description |
|---|---|
| getName() | Gets the style name. |
| getFontName() | Gets the font name. |
| getFontSize() | Gets the font size. |
| isBold() | Gets the value that indicates whether the font is bold. |
| isItalic() | Gets the value that indicates whether the font is italic. |
| equals(Object o) | |
| hashCode() |
public TextStyle(String name, String fontName, double fontSize, boolean bold, boolean italic)
Initializes a new instance of the TextStyle class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | The name of the style. |
| fontName | java.lang.String | The name of the font. |
| fontSize | double | The size of the font. |
| bold | boolean | The value that indicates whether the font is bold. |
| italic | boolean | The value that indicates whether the font is italic. |
public String getName()
Gets the style name.
Returns: java.lang.String - A string value that represents the style name.
public String getFontName()
Gets the font name.
Returns: java.lang.String - A string value that represents the font name.
public double getFontSize()
Gets the font size.
Returns: double - A double value that represents the font size.
public boolean isBold()
Gets the value that indicates whether the font is bold.
Returns: boolean - true if the font is bold; otherwise, false .
public boolean isItalic()
Gets the value that indicates whether the font is italic.
Returns: boolean - true if the font is italic; otherwise, false .
public boolean equals(Object o)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| o | java.lang.Object |
Returns: boolean
public int hashCode()
Returns: int
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.