|
SMACS | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.StyleContext
smacs.xngr.browser.editor.XmlContext
A list of styles used to render syntx-highlighted XML text.
Note: The XML Editor package is based on the JavaEditorKit example as described in the article 'Customizing a Text Editor' by Timothy Prinzing. See: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/
| Nested Class Summary |
| Nested classes inherited from class javax.swing.text.StyleContext |
StyleContext.NamedStyle, StyleContext.SmallAttributeSet |
| Field Summary |
| Fields inherited from class javax.swing.text.StyleContext |
DEFAULT_STYLE |
| Constructor Summary | |
XmlContext()
Constructs a set of style objects to represent XML lexical tokens and initialises these tokens with a font style and color. |
|
| Method Summary | |
Font |
getFont(int token)
Fetch the font to use for a lexical token with the given scan value. |
Font |
getFont(Style style)
|
Color |
getForeground(int token)
Gets the foreground color to use for a lexical token with the given value. |
Color |
getForeground(Style style)
|
Style |
getStyle(int token)
Fetches the attribute set to use for the given scan code. |
void |
setAttributes(int token,
Color foreground,
int style)
Sets the token attributes, like foreground color and Font style. |
void |
setDefaultValues()
|
void |
setFont(Font font)
|
void |
setFontStyle(int token,
int style)
Sets the font to use for a lexical token with the given value. |
void |
setForeground(int token,
Color color)
Sets the foreground color to use for a lexical token with the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XmlContext()
| Method Detail |
public void setFont(Font font)
public void setDefaultValues()
public void setAttributes(int token,
Color foreground,
int style)
token - the token to set the font for.foreground - the foreground color for the token.style - the font-style value for the token.
public void setFontStyle(int token,
int style)
token - the token to set the font for.style - the font-style value for the token.
public void setForeground(int token,
Color color)
token - the token to set the foreground for.color - the foreground color value for the token.public Color getForeground(int token)
public Font getFont(int token)
public Font getFont(Style style)
public Color getForeground(Style style)
public Style getStyle(int token)
|
SMACS | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||