public class GosuStyleContext extends StyleContext implements ViewFactory
StyleContext.NamedStyle, StyleContext.SmallAttributeSetDEFAULT_STYLE| Constructor and Description |
|---|
GosuStyleContext()
Constructs a set of styles to represent gosu lexical tokens.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areStylesEquivalent(String styleName1,
String styleName2) |
View |
create(Element elem) |
Color |
getBackground(int code) |
static String |
getDefaultFontFamily() |
static int |
getDefaultFontSize() |
Font |
getFont(AttributeSet attr)
Fetch the font to use for a given attribute set.
|
Font |
getFont(int code)
Fetch the font to use for a lexical token with the given scan value.
|
String |
getFontFamily() |
String |
getFontFamily(AttributeSet a) |
int |
getFontSize() |
Color |
getForeground(int code)
Fetch the foreground color to use for a lexical token with the given value.
|
Style |
getStyleForScanValue(int code)
Fetches the attribute set to use for the given scan code.
|
List<Style> |
getStyles() |
void |
setAttribute(Style style,
Object attr,
Object value) |
void |
setBackground(Style style,
Color colorBack) |
void |
setBold(Style style,
boolean bBold) |
static void |
setDefaultFontFamily(String defFontFamily) |
static void |
setDefaultFontSize(int defFontSize) |
void |
setDefaultStyles() |
void |
setFontFamily(String strFamily) |
void |
setFontSize(int iSize) |
void |
setForeground(Style style,
Color colorFore) |
void |
setItalic(Style style,
boolean bItalic) |
void |
setStrikeThrough(Style style,
boolean bStrikeThrough) |
void |
setUnderline(Style style,
boolean bUnderline) |
addAttribute, addAttributes, addChangeListener, addStyle, createLargeAttributeSet, createSmallAttributeSet, getBackground, getChangeListeners, getCompressionThreshold, getDefaultStyleContext, getEmptySet, getFont, getFontMetrics, getForeground, getStaticAttribute, getStaticAttributeKey, getStyle, getStyleNames, readAttributes, readAttributeSet, reclaim, registerStaticAttributeKey, removeAttribute, removeAttributes, removeAttributes, removeChangeListener, removeStyle, toString, writeAttributes, writeAttributeSetpublic static final int KEY_WORD
public static final int PARSE_ERROR
public static final int DEPRECATED
public static final int PARSE_WARNING
public static final int TYPE_LITERAL
public static final int NESTED_TYPE_LITERAL
public static final int METHOD_CALL
public static final int USES
public static final int DEFAULT
public static final int FIELD_ERROR
public static final int FIELD_WARNING
public static final int PACKAGE
public static final int PROPERTY
public static final int ENHANCEMENT_METHOD_CALL
public static final int ENHANCEMENT_PROPERTY
public static final Integer KEY_WORD_KEY
public static final Integer PARSE_ERROR_KEY
public static final Integer DEPRECATED_KEY
public static final Integer TYPE_LITERAL_KEY
public static final Integer NESTED_TYPE_LITERAL_KEY
public static final Integer PARSE_WARNING_KEY
public static final Integer METHOD_CALL_KEY
public static final Integer PROPERTY_KEY
public static final Integer ENHANCEMENT_METHOD_CALL_KEY
public static final Integer ENHANCEMENT_PROPERTY_KEY
public static final Integer USES_KEY
public static final Integer PACKAGE_KEY
public static final Integer FIELD_ERROR_KEY
public static final Integer FIELD_WARNING_KEY
public static final String DASHED
public static final String STYLE_EOL
public static final String STYLE_EOF
public static final String STYLE_Whitespace
public static final String STYLE_Comment
public static final String STYLE_Caret
public static final String STYLE_Number
public static final String STYLE_Integer
public static final String STYLE_Word
public static final String STYLE_Operator
public static final String STYLE_StringLiteral
public static final String STYLE_KeyWord
public static final String STYLE_ParseError
public static final String STYLE_ParseWarning
public static final String STYLE_DeprecatedMember
public static final String STYLE_TypeLiteral
public static final String STYLE_NestedTypeLiteral
public static final String STYLE_MethodCall
public static final String STYLE_Property
public static final String STYLE_EnhancementMethodCall
public static final String STYLE_EnhancementProperty
public static final String STYLE_FieldError
public static final String STYLE_FieldWarning
public GosuStyleContext()
public void setBold(Style style, boolean bBold)
public void setItalic(Style style, boolean bItalic)
public void setUnderline(Style style, boolean bUnderline)
public void setStrikeThrough(Style style, boolean bStrikeThrough)
public void setDefaultStyles()
public static void setDefaultFontFamily(String defFontFamily)
public static String getDefaultFontFamily()
public static void setDefaultFontSize(int defFontSize)
public static int getDefaultFontSize()
public Color getForeground(int code)
public Color getBackground(int code)
public Font getFont(int code)
public Style getStyleForScanValue(int code)
public Font getFont(AttributeSet attr)
getFont in class StyleContextpublic String getFontFamily(AttributeSet a)
public String getFontFamily()
public void setFontFamily(String strFamily)
public int getFontSize()
public void setFontSize(int iSize)
public View create(Element elem)
create in interface ViewFactoryCopyright © 2018. All rights reserved.