Eclipse Platform
2.0

org.eclipse.jface.text
Class TextAttribute

java.lang.Object
  |
  +--org.eclipse.jface.text.TextAttribute

public class TextAttribute
extends Object

Description of textual attributes such as color and style. Text attributes are considered value objects.


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.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAttribute

public TextAttribute(Color foreground,
                     Color background,
                     int style)
Creates a text attribute with the given colors and style.

Parameters:
foreground - the foreground color
background - the background color
style - the style

TextAttribute

public TextAttribute(Color foreground)
Creates a text attribute for the given foreground color, no background color and with the SWT normal style.

Parameters:
foreground - the foreground color
Method Detail

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getForeground

public Color getForeground()
Returns the attribute's foreground color.

Returns:
the attribute's foreground color

getBackground

public Color getBackground()
Returns the attribute's background color.

Returns:
the attribute's background color

getStyle

public int getStyle()
Returns the attribute's style.

Returns:
the attribute's style

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.