Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Class TextAttribute


java.lang.Object
  extended by 
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.

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

STRIKETHROUGH

public static final int STRIKETHROUGH
Text attribute for strikethrough style. (value 1 << 29).

Since:
3.1
See Also:
Constant Field Values

UNDERLINE

public static final int UNDERLINE
Text attribute for underline style. (value 1 << 30)

Since:
3.1
See Also:
Constant Field Values
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, null if none
background - the background color, null if none
style - the style

TextAttribute

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

Parameters:
foreground - the foreground color, null if none
background - the background color, null if none
style - the style
font - the font, null if none
Since:
3.3

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, null if none
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 or null if not set

getBackground

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

Returns:
the attribute's background color or null if not set

getStyle

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

Returns:
the attribute's style

getFont

public 
Font getFont()
Returns the attribute's font.

Returns:
the attribute's font or null if not set
Since:
3.3

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire