multivalent.std.adaptor
public class CSS extends StyleSheet
For now, minimal support.
Supported:
&64;import
CSS has many attributes, which should be carried along in the graphics context.
When asked about an attribute (even for its own use), a node looks at its local attributes,
then the gc's, then the default. But for now we just hardcode a couple special cases.
NOT supported:
reference by LINK,
contextual selectors: e.g, "OL OL", "H1.c1"
pseudo classes, pseudo elements: e.g., "A:visited", "P:first-line", ...
display property (which can be used to render XML directly, as it declares elements to be "block"/structural or "inline"/span)
properties other than font and color
Since CSS is used by other specs, such as SVG, maybe just parse into name-value pairs
and let clients put into native data types, if desired.
general font/general color/underline/rest of Context properties Version: $Revision: 1.8 $ $Date: 2002/10/29 17:48:12 $ See Also: CSSGeneral CSSContext
<STYLE>
.c1 { color:yellow; }
.c2 { color:red; }
.c3 { color:orange; }
</STYLE>
Not supported: nested selectors and everything else.
Field Summary | |
---|---|
protected static int | BACKGROUND |
protected static int | BACKGROUND_ATTACHMENT |
protected static int | BACKGROUND_COLOR |
protected static int | BACKGROUND_IMAGE |
protected static int | BACKGROUND_POSITION |
protected static int | BACKGROUND_REPEAT |
protected static int | BORDER |
protected static int | BORDER_BOTTOM |
protected static int | BORDER_BOTTOM_WIDTH |
protected static int | BORDER_COLOR |
protected static int | BORDER_LEFT |
protected static int | BORDER_LEFT_WIDTH |
protected static int | BORDER_RIGHT |
protected static int | BORDER_RIGHT_WIDTH |
protected static int | BORDER_STYLE |
protected static int | BORDER_TOP |
protected static int | BORDER_TOP_WIDTH |
protected static int | BORDER_WIDTH |
protected static int | CLEAR |
protected static int | COLOR |
protected static int | DISPLAY |
protected static int | ELIDE |
protected static int | END_CSS |
protected static int | END_CSS2 |
protected static int | FLOAT |
protected static int | FONT |
protected static int | FONT_FAMILY |
protected static int | FONT_SIZE |
protected static int | FONT_STYLE |
protected static int | FONT_VARIANT |
protected static int | FONT_WEIGHT |
protected static int | HEIGHT |
protected static Map<String,Integer> | keyword2int_ |
protected static int | LETTER_SPACING |
protected static int | LINE_HEIGHT |
protected static int | LIST_STYLE |
protected static int | LIST_STYLE_IMAGE |
protected static int | LIST_STYLE_POSITION |
protected static int | LIST_STYLE_TYPE |
protected static int | MARGIN |
protected static int | MARGIN_BOTTOM |
protected static int | MARGIN_LEFT |
protected static int | MARGIN_RIGHT |
protected static int | MARGIN_TOP |
protected static int | PADDING |
protected static int | PADDING_BOTTOM |
protected static int | PADDING_LEFT |
protected static int | PADDING_RIGHT |
protected static int | PADDING_TOP |
protected static int | START_CSS |
protected static int | START_CSS2 |
protected static int | TEXT_ALIGN |
protected static int | TEXT_DECORATION |
protected static int | TEXT_INDENT |
protected static int | TEXT_TRANSFORM |
protected static int | VERTICAL_ALIGN |
protected static int | VISIBILITY |
protected static int | WHITE_SPACE |
protected static int | WIDTH |
protected static int | WORD_SPACING |
Method Summary | |
---|---|
void | activesAdd(List<ContextListener> actives, VObject o, Node parent) |
void | activesRemove(List<ContextListener> actives, VObject o, Node parent) |
protected Context | createContext(Toolkit tk) |
int | getBorderColors(String vals) Returns count. |
int | getBorderWidth(String val) |
int | getBorderWidths(String vals) Returns count. |
int | getLength(String val) |
int | getLengths(String vals) Returns count. |
void | parse(String csstxt, URL base)
Parse stylesheet to hash of selector - CSSGeneral. |
void | setAttr(CSSGeneral gs, String name, String value)
Convert passed attribute name and value into setting in CSSGeneral.
|
void | setAttrs(CSSGeneral gs, String pairs) Parse list of attribute name-value pairs into settings in CSSGeneral. |
void | setPriority(String selector, CLGeneral cl) |