The following describes the CSS properties that are supported by the rendering engine:
Note
for the time being we do not fully support relative units, unless noted, so that p { margin-top: 10% } will be treated as if no margin-top was specified.
StyleSheet
| Modifier and Type | Class and Description |
|---|---|
| public static class | CSS.
Definitions to be used as a key on AttributeSet's that might hold CSS attributes. |
| pack-priv static class | CSS.
Used for BackgroundImages. |
| pack-priv static class | CSS.
Used for background images, to represent the position. |
| pack-priv static class | |
| pack-priv static class | CSS.
BorderWidthValue is used to model BORDER_XXX_WIDTH and adds support for the thin/medium/thick values. |
| pack-priv static class | |
| pack-priv static class | CSS.
Base class to CSS values in the attribute sets. |
| pack-priv static class | CSS.
Handles uniquing of CSS values, like lists, and background image repeating. |
| pack-priv static class | |
| pack-priv class | CSS.
Represents a value for the CSS.FONT_SIZE attribute. |
| pack-priv static class | |
| pack-priv static interface | CSS.
An iterator to express the requirements to use when computing layout. |
| pack-priv static class | CSS.
Parses a length value, this is used internally, and never added to an AttributeSet or returned to the developer. |
| pack-priv static class | |
| pack-priv static class | CSS.
Parses the background property into its intrinsic values. |
| pack-priv static class | |
| pack-priv static class | CSS.
Class used to parse font property. |
| pack-priv static class | CSS.
Used to parser margin and padding. |
| pack-priv static class | CSS.
By default CSS attributes are represented as simple strings. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Hashtable | |
| private int | baseFontSize
Size used for relative units. |
| pack-priv static int | |
| private static final Hashtable | cssValueToInternalValueMap
Maps from CSS value (string) to internal value. |
| private static final Map | htmlAttrToCssAttrMap
The hashtable and the static initialization block below, set up a mapping from well-known HTML attributes to CSS attributes. |
| private static final Hashtable | htmlValueToCssValueMap
Maps from HTML value to a CSS value. |
| private static final Map | styleConstantToCssMap
The hashtable and static initialization that follows sets up a translation from StyleConstants (i.e. the well known attributes) to the associated CSS attributes. |
| private transient StyleSheet | |
| private transient Hashtable | valueConvertor
Maps from CSS key to CssValue. |
| private static final Hashtable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addInternalCSSValue(MutableAttributeSet attr, CSS.
Parses the CSS property |
| pack-priv static void | calculateTiledLayout(CSS.
Calculate a tiled layout for the given iterator. |
| pack-priv static SizeRequirements | calculateTiledRequirements(CSS.
Calculate the requirements needed to tile the requirements given by the iterator that would be tiled. |
| pack-priv static String | |
| pack-priv Object | cssValueToStyleConstantsValue(StyleConstants key, Object value)
Converts the passed in CSS value to a StyleConstants value. |
| public static CSS. | Returns: the set of all possible CSS attribute keysReturn the set of all possible CSS attribute keys. |
| public static final CSS. | Returns: theCSS.Attribute object,
or null if the string
doesn't represent a valid attribute keythe name of the CSS attribute to fetch the
typesafe enumeration for name)Translates a string to a |
| pack-priv int | |
| pack-priv Color | Returns: the colorthe set of attributes a, CSS.CSS.Attribute identifying where color is stored. keyTakes a set of attributes and turn it into a color specification. |
| private static float | getColorComponent(String string, int[] index)
Returns the next integer value from |
| private CSS. | Returns: CSS.Attribute mapping for HTML.Attribute.ALIGN.the AttributeSet containing HTML attributes. tag,Maps HTML.Attribute.ALIGN to either: CSS.Attribute.TEXT_ALIGN CSS.Attribute.FLOAT CSS.Attribute.VERTICAL_ALIGN based on the tag associated with the attribute and the value of the attribute. |
| private CSS. | Returns: CSS.Attribute[]HTML.Attribute hAttrMaps an HTML.Attribute object to its appropriate CSS.Attributes. |
| pack-priv Object | getCssValue(CSS.
the CSS.Attribute cssAttr,a String containing the value associated HTML.Attribute. htmlAttrValue)Given a CSS.Attribute object and its corresponding HTML.Attribute's value, this method returns a CssValue object to associate with the CSS attribute. |
| pack-priv Font | getFont(StyleContext sc, AttributeSet a, int defaultSize, StyleSheet ss)
Returns the font for the values in the passed in AttributeSet. |
| pack-priv static int | |
| private HTML. | Returns: HTML.Tagthe AttributeSet containing the HTML attributes. htmlAttrSet)Fetches the tag associated with the HTML AttributeSet. |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv Object | getInternalCSSValue(CSS.
Gets the internal CSS representation of |
| pack-priv float | getLength(AttributeSet a, CSS.
Returns the length of the attribute in |
| pack-priv float | getPointSize(String
CSS string describing font size size, StyleSheet ss)Returns the size of a font from the passed in string. |
| pack-priv float | |
| private StyleSheet | |
| private static int | |
| pack-priv static URL | |
| pack-priv static final CSS. | |
| pack-priv static final Color | |
| private boolean | |
| private boolean | |
| pack-priv static Object | |
| private static Color | |
| private static Color | |
| pack-priv static String[] | parseStrings(String value)
Returns: an array of all the strings in |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv static Color | stringToColor(String str)
Convert a color string such as "RED" or "#NNNNNN" or "rgb(r, g, b)" or "rgba(r, g, b, a)" to a Color. |
| pack-priv CSS. | |
| pack-priv Object | styleConstantsValueToCSSValue(StyleConstants sc, Object styleValue)
Maps from a StyleConstants value to a CSS value. |
| private void | |
| private void | |
| private void | |
| pack-priv AttributeSet | Returns: AttributeSet containing the corresponding CSS attributes. The AttributeSet will be empty if there are no mapping CSS attributes.AttributeSet containing the HTML attributes. htmlAttrSet)Convert a set of HTML attributes to an equivalent set of CSS attributes. |
| private boolean | |
| private void |