Package org.htmlunit.cssparser.dom
Class CSSStyleDeclarationImpl
java.lang.Object
org.htmlunit.cssparser.dom.CSSStyleDeclarationImpl
- All Implemented Interfaces:
Serializable
Implementation of CSSStyleDeclaration.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a property.boolean
int
getLength.getParentRule.getProperties.getPropertyCSSValue
(String propertyName) getPropertyCSSValue.getPropertyDeclaration
(String propertyName) getPropertyDeclaration.getPropertyPriority
(String propertyName) getPropertyPriority.getPropertyValue
(String propertyName) getPropertyValue.int
hashCode()
removeProperty
(String propertyName) Remove a property.void
setCssText
(String cssText) Sets the css text.void
setCssText
(String cssText, CSSErrorHandler cssErrorHandler) Sets the css text.void
setProperty
(String propertyName, String value, String priority) Set a property.toString()
-
Constructor Details
-
CSSStyleDeclarationImpl
Ctor.- Parameters:
parentRule
- the parent role
-
CSSStyleDeclarationImpl
public CSSStyleDeclarationImpl()Ctor.
-
-
Method Details
-
getProperties
getProperties.
- Returns:
- the properties
-
getCssText
- Returns:
- the current css text
-
setCssText
Sets the css text.- Parameters:
cssText
- the new css text- Throws:
DOMException
- in case of error
-
setCssText
Sets the css text.- Parameters:
cssText
- the new css textcssErrorHandler
- the CSSErrorHandler to be used- Throws:
DOMException
- in case of error
-
getPropertyValue
getPropertyValue.
- Parameters:
propertyName
- the property name- Returns:
- the property value
-
getPropertyCSSValue
getPropertyCSSValue.
- Parameters:
propertyName
- the property name- Returns:
- the property value
-
removeProperty
Remove a property.- Parameters:
propertyName
- the property name- Returns:
- the removed property
- Throws:
DOMException
- in case of error
-
getPropertyPriority
getPropertyPriority.
- Parameters:
propertyName
- the name of the property- Returns:
- the priority
-
setProperty
Set a property.- Parameters:
propertyName
- the name of the propertyvalue
- the new valuepriority
- the priority- Throws:
DOMException
- in case of error
-
getLength
public int getLength()getLength.
- Returns:
- the properties count
-
getParentRule
getParentRule.
- Returns:
- the parent rule
-
addProperty
Add a property.- Parameters:
p
- the property to add
-
getPropertyDeclaration
getPropertyDeclaration.
- Parameters:
propertyName
- the name of the propery- Returns:
- the property
-
toString
-
equals
-
hashCode
public int hashCode()
-