public class TextAttribute
extends java.lang.Object
Clients usually instantiate object of the class.
| Modifier and Type | Field and Description |
|---|---|
static int |
STRIKETHROUGH
Text attribute for strikethrough style.
|
static int |
UNDERLINE
Text attribute for underline style.
|
| Constructor and Description |
|---|
TextAttribute(java.lang.String stylename) |
TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground)
Creates a text attribute for the given foreground color, no background color and
with the SWT normal style.
|
TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground,
javafx.scene.paint.Color background,
int style)
Creates a text attribute with the given colors and style.
|
TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground,
javafx.scene.paint.Color background,
int style,
javafx.scene.text.Font font)
Creates a text attribute with the given colors and style.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
javafx.scene.paint.Color |
getBackground()
Returns the attribute's background color.
|
javafx.scene.text.Font |
getFont()
Returns the attribute's font.
|
javafx.scene.paint.Color |
getForeground()
Returns the attribute's foreground color.
|
int |
getStyle()
Returns the attribute's style.
|
java.lang.String |
getStylename() |
int |
hashCode() |
public static final int STRIKETHROUGH
1 << 29).public static final int UNDERLINE
1 << 30)public TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground,
javafx.scene.paint.Color background,
int style)
foreground - the foreground color, null if nonebackground - the background color, null if nonestyle - the stylepublic TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground,
javafx.scene.paint.Color background,
int style,
javafx.scene.text.Font font)
foreground - the foreground color, null if nonebackground - the background color, null if nonestyle - the stylefont - the font, null if nonepublic TextAttribute(java.lang.String stylename,
javafx.scene.paint.Color foreground)
foreground - the foreground color, null if nonepublic TextAttribute(java.lang.String stylename)
public java.lang.String getStylename()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic javafx.scene.paint.Color getForeground()
null if not setpublic javafx.scene.paint.Color getBackground()
null if not setpublic int getStyle()
public javafx.scene.text.Font getFont()
null if not set