public class StylerFactory
extends java.lang.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(java.lang.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,
java.lang.String foregroundColorName,
java.lang.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(java.lang.String foregroundColorName,
java.lang.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(java.lang.String foregroundColorName, java.lang.String backgroundColorName)
StylerFactory.DefaultFontStyler
public org.eclipse.jface.viewers.StyledString.Styler createStyler(org.eclipse.jface.resource.FontDescriptor fontDescriptor, java.lang.String foregroundColorName, java.lang.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(java.lang.String text, TextStyle xtextStyle)
StyledString
from a given label text and
XtextTextStyle
text
- the label to displayxtextStyle
- the style to apply to the given text