public class StylerFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
StylerFactory.DefaultFontStyler |
protected static class |
StylerFactory.XtextStyleAdapterStyler |
| Constructor and Description |
|---|
StylerFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jface.viewers.StyledString |
createFromXtextStyle(String text,
TextStyle xtextStyle)
Convenience method to create a new
StyledString from a given label text and
XtextTextStyle |
org.eclipse.jface.viewers.StyledString.Styler |
createStyler(org.eclipse.jface.resource.FontDescriptor fontDescriptor,
String foregroundColorName,
String backgroundColorName)
Creates a styler that takes the given descriptor of a font, foreground and background colors from the JFace color
registry.
|
org.eclipse.jface.viewers.StyledString.Styler |
createStyler(String foregroundColorName,
String backgroundColorName) |
org.eclipse.jface.viewers.StyledString.Styler |
createXtextStyleAdapterStyler(TextStyle xtextStyle)
Creates an adapter styler for
XtextStyles. |
public org.eclipse.jface.viewers.StyledString.Styler createStyler(String foregroundColorName, String backgroundColorName)
StylerFactory.DefaultFontStylerpublic org.eclipse.jface.viewers.StyledString.Styler createStyler(org.eclipse.jface.resource.FontDescriptor fontDescriptor,
String foregroundColorName,
String backgroundColorName)
fontDescriptor - the descriptor of a font to applyforegroundColorName - the color name for the foreground colorbackgroundColorName - the color name for the background colorpublic org.eclipse.jface.viewers.StyledString.Styler createXtextStyleAdapterStyler(TextStyle xtextStyle)
XtextStyles.xtextStyle - the xtextStyle to applypublic org.eclipse.jface.viewers.StyledString createFromXtextStyle(String text, TextStyle xtextStyle)
StyledString from a given label text and
XtextTextStyletext - the label to displayxtextStyle - the style to apply to the given textCopyright © 2016. All Rights Reserved.