org.eclipse.xtext.ui.editor.utils
Class TextStyle

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.utils.TextStyle

public class TextStyle
extends java.lang.Object

Simple bean which is used to share text style information between components.

Author:
Dennis Hübner - Initial contribution and API

Field Summary
static int DEFAULT_FONT_STYLE
           
 
Constructor Summary
TextStyle()
           
 
Method Summary
 TextStyle copy()
          creates a new TextStyle instance and copies all the source fields
 org.eclipse.swt.graphics.RGB getBackgroundColor()
           
 org.eclipse.swt.graphics.RGB getColor()
           
 org.eclipse.swt.graphics.FontData[] getFontData()
           
 int getStyle()
           
 void setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
           
 void setColor(org.eclipse.swt.graphics.RGB color)
           
 void setFontData(org.eclipse.swt.graphics.FontData... fontData)
           
 void setStyle(int style)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_STYLE

public static final int DEFAULT_FONT_STYLE
See Also:
Constant Field Values
Constructor Detail

TextStyle

public TextStyle()
Method Detail

getColor

public org.eclipse.swt.graphics.RGB getColor()
Returns:
the color

setColor

public void setColor(org.eclipse.swt.graphics.RGB color)
Parameters:
color - the color to set

getFontData

public org.eclipse.swt.graphics.FontData[] getFontData()
Returns:
the fontData

setFontData

public void setFontData(org.eclipse.swt.graphics.FontData... fontData)
Parameters:
fontData - the fontData to set

setBackgroundColor

public void setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
Parameters:
backgroundColor - the backgroundColor to set

getBackgroundColor

public org.eclipse.swt.graphics.RGB getBackgroundColor()
Returns:
the backgroundColor

getStyle

public int getStyle()
Returns:
SWT style constant (default is SWT.NORMAL)

copy

public TextStyle copy()
creates a new TextStyle instance and copies all the source fields


setStyle

public void setStyle(int style)
Parameters:
style - SWT style constant
See Also:
SWT