|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CSS2ComputedProperties
Interface that allows the retrieval of the primitive, "computed" values of CSS properties for practical use in formatting.
Classes implementing this interface must inherit the elements as necessary to get the final primitive values and not relative 'inherited' ones. Whenever possible, values intended to be 'used' (as opposed to simply 'computed' values) should be returned. See paragraph 6.1 of the CSS specification for the differences between 'computed' and 'used' values.
| Method Summary | |
|---|---|
float |
computeFloatValue(CSSNumberValue cssValue)
Computes the value, in the device's natural unit, of the given number value. |
org.w3c.dom.css.CSSPrimitiveValue |
getBackgroundColor()
Gets the primitive, computed value for the 'background-color' property. |
String |
getBackgroundImage()
Gets the computed value for the 'background-image' property. |
URL |
getBaseURL()
Gets the base URL that should be used to resolve relative URLs in property values. |
org.w3c.dom.css.CSSPrimitiveValue |
getColor()
Gets the primitive, computed value for the 'color' property. |
String |
getFontFamily()
Gets the 'used' value for the font-family property. |
int |
getFontSize()
Gets the computed value of the font-size property. |
String |
getFontWeight()
Gets the computed font weight. |
CSS2ComputedProperties |
getParentComputedStyle()
Gets the computed style for the parent element. |
Node |
getPeerNode()
Gets the peer node. |
String |
getPeerXPath()
Gets the XPath of the node to which this style applies. |
org.w3c.dom.css.CSSValue |
getPropertyCSSValue(String propertyName)
Retrieves the computed object representation of the value of a CSS property. |
String |
getPropertyValue(String propertyName)
Retrieves the String value of a CSS property. |
StyleDatabase |
getStyleDatabase()
Gets the style database used to compute the style. |
| Method Detail |
|---|
org.w3c.dom.css.CSSValue getPropertyCSSValue(String propertyName)
null if the property is a shorthand
property.
propertyName - The name of the CSS property.
String getPropertyValue(String propertyName)
propertyName - The name of the CSS property. See the CSS property
index.
float computeFloatValue(CSSNumberValue cssValue)
Usage note: after calling this method, check whether the CSS value is a percentage, and if the returned float is different from zero, then compute the percentage base and apply to it.
cssValue - the CSS value representing a number.
org.w3c.dom.css.CSSPrimitiveValue getColor()
org.w3c.dom.css.CSSPrimitiveValue getBackgroundColor()
String getBackgroundImage()
String getFontFamily()
This method requires a style database.
IllegalStateException - if the style database has not been set.String getFontWeight()
int getFontSize()
May require a style database to work.
URL getBaseURL()
Node getPeerNode()
String getPeerXPath()
CSS2ComputedProperties getParentComputedStyle()
StyleDatabase getStyleDatabase()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||