public class TextAttribute extends 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(Color foreground)
Creates a text attribute for the given foreground color, no background color and
with the SWT normal style.
|
TextAttribute(Color foreground,
Color background,
int style)
Creates a text attribute with the given colors and style.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
Color |
getBackground()
Returns the attribute's background color.
|
Color |
getForeground()
Returns the attribute's foreground color.
|
int |
getStyle()
Returns the attribute's style.
|
int |
hashCode() |
public static final int STRIKETHROUGH
1 << 29
).public static final int UNDERLINE
1 << 30
)public TextAttribute(Color foreground, Color background, int style)
foreground
- the foreground colorbackground
- the background color, null
if nonestyle
- the stylepublic TextAttribute(Color foreground)
foreground
- the foreground colorpublic Color getForeground()
public Color getBackground()
public int getStyle()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.