| java.lang.Object javax.swing.text.StyleContext
All known Subclasses: javax.swing.text.html.StyleSheet,
Inner Class :public class SmallAttributeSet implements AttributeSet | |
Method Summary | |
public synchronized AttributeSet | addAttribute(AttributeSet old, Object name, Object value) | public synchronized AttributeSet | addAttributes(AttributeSet old, AttributeSet add) | public void | addChangeListener(ChangeListener l) | public Style | addStyle(String name, Style parent) | protected MutableAttributeSet | createLargeAttributeSet(AttributeSet a) | protected SmallAttributeSet | createSmallAttributeSet(AttributeSet aSet) | public Color | getBackground(AttributeSet as) | public ChangeListener[] | getChangeListeners() | protected int | getCompressionThreshold() | final public static StyleContext | getDefaultStyleContext() | public AttributeSet | getEmptySet() | public Font | getFont(AttributeSet as) | public Font | getFont(String family, int style, int size) Checks if the specified font is cached, and returns the cached instance,
or creates a new font and caches it. | public FontMetrics | getFontMetrics(Font font) | public Color | getForeground(AttributeSet as) | public static Object | getStaticAttribute(Object key) Returns the object that registered this key by its corresponding
string representation. | public static Object | getStaticAttributeKey(Object key) Returns the string representing this key. | public Style | getStyle(String name) | public Enumeration> | getStyleNames() | public static void | readAttributeSet(ObjectInputStream ois, MutableAttributeSet mas) | public void | readAttributes(ObjectInputStream ois, MutableAttributeSet mas) | public void | reclaim(AttributeSet a) This methods just does nothing because we use
WeakReference s to remove unused attribute sets from cache. | public static void | registerStaticAttributeKey(Object key) | public synchronized AttributeSet | removeAttribute(AttributeSet old, Object name) | public synchronized AttributeSet | removeAttributes(AttributeSet old, AttributeSet rem) | public synchronized AttributeSet | removeAttributes(AttributeSet old, Enumeration> names) | public void | removeChangeListener(ChangeListener l) | public void | removeStyle(String name) | public String | toString() Returns a string representing all cached attribute sets. | public static void | writeAttributeSet(ObjectOutputStream oos, AttributeSet as) | public void | writeAttributes(ObjectOutputStream oos, AttributeSet as) |
StyleContext | public StyleContext()(Code) | | |
createSmallAttributeSet | protected SmallAttributeSet createSmallAttributeSet(AttributeSet aSet)(Code) | | |
getCompressionThreshold | protected int getCompressionThreshold()(Code) | | |
getFont | public Font getFont(String family, int style, int size)(Code) | | Checks if the specified font is cached, and returns the cached instance,
or creates a new font and caches it.
We use a string with font parameters as key in the font cache.
|
getStaticAttribute | public static Object getStaticAttribute(Object key)(Code) | | Returns the object that registered this key by its corresponding
string representation.
|
getStaticAttributeKey | public static Object getStaticAttributeKey(Object key)(Code) | | Returns the string representing this key.
It is composed of class name, dot and string presentation of the
key (returned by toString ).
|
reclaim | public void reclaim(AttributeSet a)(Code) | | This methods just does nothing because we use
WeakReference s to remove unused attribute sets from cache.
|
toString | public String toString()(Code) | | Returns a string representing all cached attribute sets.
|
|
|