multivalent
public class StyleSheet extends Object implements Cloneable
Version: $Revision: 1.6 $ $Date: 2003/06/02 05:10:59 $
See Also: CSS
Field Summary | |
---|---|
protected StyleSheet | cascade_ Link to lower priority style sheet. |
protected Context | cx_ |
static boolean | DEBUG |
Map<Object,ContextListener> | key2cl_ |
protected String | name_ |
static int | PRIORITY_BLOCK |
static int | PRIORITY_CLASS |
static int | PRIORITY_ELEMENT |
static int | PRIORITY_ID |
static int | PRIORITY_INLINE |
protected static Object | TERMINAL |
Method Summary | |
---|---|
void | activesAdd(List<ContextListener> actives, VObject o, Node parent)
Add all relevant ContextListeners to Context.
|
void | activesRemove(List<ContextListener> actives, VObject o, Node parent) |
StyleSheet | copy() |
protected Context | createContext(Toolkit tk)
Create new Context matched to this StyleSheet's ContextListeners.
|
static int | eatSpace(String str, int inx) Arbitrary behaviors can be associated with styles. |
ContextListener | get(Object key) Low level: hash on object itself. |
ContextListener | get(Object key, Node context) |
StyleSheet | getCascade() |
StyleSheet | getCascade(String name) |
Context | getContext(Graphics2D g, Toolkit tk, Context enclosing)
Return Context matched to this StyleSheet's ContextListeners.
|
Context | getContext() |
String | getName() |
void | parse(URL url) Parse external style sheet. |
void | parse(String csstxt, URL base)
Parse internal style sheet.
|
void | put(Object key, ContextListener cl) Low level: hash on object itself. |
void | put(String selector, ContextListener cl) More sophisticated style sheet implementation can parse selector. |
ContextListener | remove(Object key) |
ContextListener | remove(String selector) |
void | setAttr(CLGeneral gs, String name, String value)
Parse attribute name-value pair into settings in CLGeneral. |
void | setAttrs(CLGeneral gs, String pairs)
Parse attribute name-value pair into settings in CLGeneral. |
void | setCascade(StyleSheet parent) |
void | setCascade(Document doc) |
void | setName(String name)
LATER
Cache last lookup, so faster if have add immediately followed by remove on same args.
|
void | setPriority(String selector, CLGeneral cl) Compute priority of passed selector. |
int | size() |