|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.StyleContext
de.hillenbrand.swing.text.JavaContext
public class JavaContext
A collection of styles used to render java text. This class also acts as a factory for the views used to represent the java documents. Since the rendering styles are based upon view preferences, the views need a way to gain access to the style settings which is facilitated by implementing the factory in the style storage. Both functionalities can be widely shared across java document views.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.text.StyleContext |
|---|
javax.swing.text.StyleContext.NamedStyle, javax.swing.text.StyleContext.SmallAttributeSet |
| Field Summary |
|---|
| Fields inherited from class javax.swing.text.StyleContext |
|---|
DEFAULT_STYLE |
| Constructor Summary | |
|---|---|
JavaContext()
Constructs a set of styles to represent java lexical tokens. |
|
| Method Summary | |
|---|---|
javax.swing.text.View |
create(javax.swing.text.Element elem)
|
java.awt.Font |
getFont(int code)
Fetch the font to use for a lexical token with the given scan value. |
java.awt.Color |
getForeground(int code)
Fetch the foreground color to use for a lexical token with the given value. |
javax.swing.text.Style |
getStyleForScanValue(int code)
Fetches the attribute set to use for the given scan code. |
| Methods inherited from class javax.swing.text.StyleContext |
|---|
addAttribute, addAttributes, addChangeListener, addStyle, createLargeAttributeSet, createSmallAttributeSet, getBackground, getChangeListeners, getCompressionThreshold, getDefaultStyleContext, getEmptySet, getFont, getFont, getFontMetrics, getForeground, getStaticAttribute, getStaticAttributeKey, getStyle, getStyleNames, readAttributes, readAttributeSet, reclaim, registerStaticAttributeKey, removeAttribute, removeAttributes, removeAttributes, removeChangeListener, removeStyle, toString, writeAttributes, writeAttributeSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JavaContext()
| Method Detail |
|---|
public javax.swing.text.View create(javax.swing.text.Element elem)
create in interface javax.swing.text.ViewFactorypublic java.awt.Font getFont(int code)
public java.awt.Color getForeground(int code)
public javax.swing.text.Style getStyleForScanValue(int code)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||