|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.TextAttribute
public class TextAttribute
Description of textual attributes such as color and style. Text attributes are considered value objects.
Clients usually instantiate object of the class.
Field Summary | |
---|---|
static int |
STRIKETHROUGH
Text attribute for strikethrough style. |
static int |
UNDERLINE
Text attribute for underline style. |
Constructor Summary | |
---|---|
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. |
|
TextAttribute(Color foreground,
Color background,
int style,
Font font)
Creates a text attribute with the given colors and style. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
Color |
getBackground()
Returns the attribute's background color. |
Font |
getFont()
Returns the attribute's font. |
Color |
getForeground()
Returns the attribute's foreground color. |
int |
getStyle()
Returns the attribute's style. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STRIKETHROUGH
1 << 29
).
public static final int UNDERLINE
1 << 30
)
Constructor Detail |
---|
public TextAttribute(Color foreground, Color background, int style)
foreground
- the foreground color, null
if nonebackground
- the background color, null
if nonestyle
- the stylepublic TextAttribute(Color foreground, Color background, int style, Font font)
foreground
- the foreground color, null
if nonebackground
- the background color, null
if nonestyle
- the stylefont
- the font, null
if nonepublic TextAttribute(Color foreground)
foreground
- the foreground color, null
if noneMethod Detail |
---|
public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Color getForeground()
null
if not setpublic Color getBackground()
null
if not setpublic int getStyle()
public Font getFont()
null
if not set
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.