|
||||||||||
| 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
public class BaseCSSStyleDeclaration
CSS Style Declaration.
| Nested Class Summary | |
|---|---|
class |
BaseCSSStyleDeclaration.StyleDeclarationDocumentHandler
|
| Constructor Summary | |
|---|---|
|
BaseCSSStyleDeclaration()
|
protected |
BaseCSSStyleDeclaration(BaseCSSStyleDeclaration copiedObject)
Copy constructor. |
| Method Summary | |
|---|---|
void |
addStyle(BaseCSSStyleDeclaration style)
Add all the rules of the given style declaration to this one. |
BaseCSSStyleDeclaration |
clone()
|
protected org.w3c.dom.css.CSSValue |
defaultPropertyValue(String propertyName)
Computes the inital (default) value for the given property. |
org.w3c.dom.css.CSSPrimitiveValue |
getColor()
|
org.w3c.dom.css.CSS2Properties |
getCSS2Properties()
|
String |
getCssText()
Retrieves the parseable textual representation of the declaration block (excluding the surrounding curly braces). |
protected org.w3c.dom.css.CSSValue |
getCSSValue(String propertyName)
|
protected org.w3c.dom.css.CSSValue |
getDeclaredCSSValue(String propertyName)
|
int |
getLength()
The number of properties that have been explicitly set in this declaration block. |
org.w3c.dom.css.CSSRule |
getParentRule()
Retrieves the CSS rule that contains this declaration block. |
org.w3c.dom.css.CSSValue |
getPropertyCSSValue(String propertyName)
Used to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. |
String |
getPropertyPriority(String propertyName)
Used to retrieve the priority of a CSS property (e.g. |
String |
getPropertyValue(String propertyName)
Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block. |
StyleDatabase |
getStyleDatabase()
Gets the style database which is used to compute the style. |
String |
item(int index)
Used to retrieve the properties that have been set in this declaration block. |
void |
prioritySplit(BaseCSSStyleDeclaration importantDecl,
BaseCSSStyleDeclaration normalDecl)
Splits this style declaration in two: one for important properties only, and the other with normal properties. |
String |
removeProperty(String propertyName)
Used to remove a CSS property if it has been explicitly set within this declaration block. |
void |
setCssText(String cssText)
Parses the given value and resets all the properties in the declaration block, including the removal or addition of properties. |
void |
setProperty(String propertyName,
org.w3c.css.sac.LexicalUnit value,
String priority)
Set a CSS property, based on lexixal value. |
void |
setProperty(String propertyName,
String value,
String priority)
Used to set a property value and priority within this declaration block. |
void |
setStyleDatabase(StyleDatabase styleDb)
Sets the style database used to compute the style. |
protected String |
setSubproperties(String propertyName,
org.w3c.css.sac.LexicalUnit value,
String priority)
Set the subproperties of a shorthand, and returns its text representation. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseCSSStyleDeclaration()
protected BaseCSSStyleDeclaration(BaseCSSStyleDeclaration copiedObject)
copiedObject - the DOMCSSStyleDeclaration to be copied.| Method Detail |
|---|
public String getCssText()
getCssText in interface org.w3c.dom.css.CSSStyleDeclarationDOMException - SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public void setCssText(String cssText)
throws DOMException
setCssText in interface org.w3c.dom.css.CSSStyleDeclarationcssText - the text with the style declaration.
DOMException - SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public String getPropertyValue(String propertyName)
getPropertyValue in interface org.w3c.dom.css.CSSStyleDeclarationpropertyName - The name of the CSS property. See the CSS property
index.
public org.w3c.dom.css.CSSValue getPropertyCSSValue(String propertyName)
null if the property is a shorthand
property. Shorthand property values can only be accessed and modified
as strings, using the getPropertyValue and
setProperty methods.
getPropertyCSSValue in interface org.w3c.dom.css.CSSStyleDeclarationpropertyName - The name of the CSS property. See the CSS property
index.
null if the
property has not been set.protected org.w3c.dom.css.CSSValue getCSSValue(String propertyName)
protected org.w3c.dom.css.CSSValue getDeclaredCSSValue(String propertyName)
public String removeProperty(String propertyName)
throws DOMException
removeProperty in interface org.w3c.dom.css.CSSStyleDeclarationpropertyName - name of the property to remove.
DOMException - if this declaration is readonly or the property
is readonly. This implementation is not expected to throw the
Exception.public String getPropertyPriority(String propertyName)
"important" qualifier) if the property has been
explicitly set in this declaration block.
getPropertyPriority in interface org.w3c.dom.css.CSSStyleDeclarationpropertyName - The name of the CSS property. See the CSS property
index.
"important") if one exists. The empty string if none
exists.
public void setProperty(String propertyName,
org.w3c.css.sac.LexicalUnit value,
String priority)
throws DOMException
propertyName - the name of the property.value - the lexical value.priority - the priority string.
DOMException - if some error or inconsistency is found in the value.
public void setProperty(String propertyName,
String value,
String priority)
throws DOMException
setProperty in interface org.w3c.dom.css.CSSStyleDeclarationpropertyName - The name of the CSS property. See the CSS property
index.value - The new value of the property.priority - The new priority of the property (e.g.
"important").
DOMException - SYNTAX_ERR: Raised if the specified value has a syntax error and is
unparsable.
public int getLength()
getLength in interface org.w3c.dom.css.CSSStyleDeclarationpublic String item(int index)
item in interface org.w3c.dom.css.CSSStyleDeclarationindex - the property index.
public org.w3c.dom.css.CSSRule getParentRule()
getParentRule in interface org.w3c.dom.css.CSSStyleDeclarationnull
if this CSSStyleDeclaration is not attached to a
CSSRule.public void addStyle(BaseCSSStyleDeclaration style)
style - the style declaration whose rules have to be added.
public void prioritySplit(BaseCSSStyleDeclaration importantDecl,
BaseCSSStyleDeclaration normalDecl)
importantDecl - normalDecl - public StyleDatabase getStyleDatabase()
public void setStyleDatabase(StyleDatabase styleDb)
styleDb - the style database.protected org.w3c.dom.css.CSSValue defaultPropertyValue(String propertyName)
propertyName - the name of the property.
public org.w3c.dom.css.CSSPrimitiveValue getColor()
protected String setSubproperties(String propertyName,
org.w3c.css.sac.LexicalUnit value,
String priority)
throws DOMException
propertyName - the shorthand property name.value - the shorthand property value.priority - the shorthand property priority.
DOMExceptionpublic BaseCSSStyleDeclaration clone()
clone in class Objectpublic org.w3c.dom.css.CSS2Properties getCSS2Properties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||