|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.style.css.dom.BaseCSSStyleDeclaration
info.informatica.doc.style.css.dom.ComputedCSSStyle
public abstract class ComputedCSSStyle
Style declaration that computes CSS properties.
See section 6.1 of the Document Object Model CSS spec.
Some of the methods require that a style database is set, for example to verify the availability of font families.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class info.informatica.doc.style.css.dom.BaseCSSStyleDeclaration |
|---|
BaseCSSStyleDeclaration.StyleDeclarationDocumentHandler |
| Constructor Summary | |
|---|---|
protected |
ComputedCSSStyle()
|
protected |
ComputedCSSStyle(BaseCSSStyleDeclaration copiedObject)
|
| Method Summary | |
|---|---|
abstract ComputedCSSStyle |
clone()
|
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. |
org.w3c.dom.css.CSSValue |
getCSSValue(String property)
Gets the absolute, primitive "computed" value for the given 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. |
protected int |
getLargerFontSize(int defaultSize)
|
abstract CSS2ComputedProperties |
getParentComputedStyle()
Gets the computed style for the parent element. |
protected int |
getParentElementFontSize()
|
abstract String |
getParentXPath()
|
Node |
getPeerNode()
Gets the peer node. |
abstract String |
getPeerXPath()
Gets the XPath of the node to which this style applies. |
protected int |
getSmallerFontSize(int defaultSize)
|
abstract String |
getText()
Gets the (whitespace-trimmed) text content of the node associated to this style. |
void |
setPeerNode(Node node)
|
| Methods inherited from class info.informatica.doc.style.css.dom.BaseCSSStyleDeclaration |
|---|
addStyle, defaultPropertyValue, getCSS2Properties, getCssText, getDeclaredCSSValue, getLength, getParentRule, getPropertyCSSValue, getPropertyPriority, getPropertyValue, getStyleDatabase, item, prioritySplit, removeProperty, setCssText, setProperty, setProperty, setStyleDatabase, setSubproperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface info.informatica.doc.style.css.CSS2ComputedProperties |
|---|
getPropertyCSSValue, getPropertyValue, getStyleDatabase |
| Methods inherited from interface info.informatica.doc.style.css.StyleDatabaseAware |
|---|
getStyleDatabase, setStyleDatabase |
| Constructor Detail |
|---|
protected ComputedCSSStyle()
protected ComputedCSSStyle(BaseCSSStyleDeclaration copiedObject)
| Method Detail |
|---|
public void setPeerNode(Node node)
public Node getPeerNode()
CSS2ComputedProperties
getPeerNode in interface CSS2ComputedPropertiespublic org.w3c.dom.css.CSSValue getCSSValue(String property)
The rendering context is not taken into account for this method.
See paragraph 6.1.2 of the Document Object Model CSS specification for the definition of "computed" values.
getCSSValue in class BaseCSSStyleDeclarationproperty - the property that we want to evaluate.
public org.w3c.dom.css.CSSPrimitiveValue getColor()
CSS2ComputedProperties
getColor in interface CSS2ComputedPropertiesgetColor in class BaseCSSStyleDeclarationpublic org.w3c.dom.css.CSSPrimitiveValue getBackgroundColor()
CSS2ComputedProperties
getBackgroundColor in interface CSS2ComputedPropertiespublic String getBackgroundImage()
CSS2ComputedProperties
getBackgroundImage in interface CSS2ComputedPropertiespublic URL getBaseURL()
getBaseURL in interface CSS2ComputedPropertiespublic String getFontFamily()
This method requires a style database.
getFontFamily in interface CSS2ComputedPropertiesIllegalStateException - if the style database has not been set.public String getFontWeight()
getFontWeight in interface CSS2ComputedPropertiespublic int getFontSize()
May require a style database to work.
getFontSize in interface CSS2ComputedProperties
protected int getLargerFontSize(int defaultSize)
throws CSSPropertyException
CSSPropertyException
protected int getSmallerFontSize(int defaultSize)
throws CSSPropertyException
CSSPropertyExceptionprotected int getParentElementFontSize()
public float computeFloatValue(CSSNumberValue cssValue)
computeFloatValue in interface CSS2ComputedPropertiescssValue - the CSS value representing a number.
public abstract String getPeerXPath()
CSS2ComputedProperties
getPeerXPath in interface CSS2ComputedPropertiespublic abstract String getParentXPath()
public abstract CSS2ComputedProperties getParentComputedStyle()
getParentComputedStyle in interface CSS2ComputedPropertiespublic abstract String getText()
public abstract ComputedCSSStyle clone()
clone in class BaseCSSStyleDeclaration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||