Class CSSStyleDeclarationImpl

  • All Implemented Interfaces:
    java.io.Serializable

    public class CSSStyleDeclarationImpl
    extends java.lang.Object
    implements java.io.Serializable
    Implementation of CSSStyleDeclaration.
    See Also:
    Serialized Form
    • Constructor Detail

      • CSSStyleDeclarationImpl

        public CSSStyleDeclarationImpl​(AbstractCSSRuleImpl parentRule)
        Ctor.
        Parameters:
        parentRule - the parent role
    • Method Detail

      • getProperties

        public java.util.List<Property> getProperties()
        Returns:
        the properties
      • getCssText

        public java.lang.String getCssText()
        Returns:
        the current css text
      • setCssText

        public void setCssText​(java.lang.String cssText)
                        throws org.w3c.dom.DOMException
        Sets the css text.
        Parameters:
        cssText - the new css text
        Throws:
        org.w3c.dom.DOMException - in case of error
      • setCssText

        public void setCssText​(java.lang.String cssText,
                               CSSErrorHandler cssErrorHandler)
                        throws org.w3c.dom.DOMException
        Sets the css text.
        Parameters:
        cssText - the new css text
        cssErrorHandler - the CSSErrorHandler to be used
        Throws:
        org.w3c.dom.DOMException - in case of error
      • getPropertyValue

        public java.lang.String getPropertyValue​(java.lang.String propertyName)
        Parameters:
        propertyName - the property name
        Returns:
        the property value
      • getPropertyCSSValue

        public CSSValueImpl getPropertyCSSValue​(java.lang.String propertyName)
        Parameters:
        propertyName - the property name
        Returns:
        the property value
      • removeProperty

        public java.lang.String removeProperty​(java.lang.String propertyName)
                                        throws org.w3c.dom.DOMException
        Remove a property.
        Parameters:
        propertyName - the property name
        Returns:
        the removed property
        Throws:
        org.w3c.dom.DOMException - in case of error
      • getPropertyPriority

        public java.lang.String getPropertyPriority​(java.lang.String propertyName)
        Parameters:
        propertyName - the name of the property
        Returns:
        the priority
      • setProperty

        public void setProperty​(java.lang.String propertyName,
                                java.lang.String value,
                                java.lang.String priority)
                         throws org.w3c.dom.DOMException
        Set a property.
        Parameters:
        propertyName - the name of the property
        value - the new value
        priority - the priority
        Throws:
        org.w3c.dom.DOMException - in case of error
      • getLength

        public int getLength()
        Returns:
        the properties count
      • addProperty

        public void addProperty​(Property p)
        Add a property.
        Parameters:
        p - the property to add
      • getPropertyDeclaration

        public Property getPropertyDeclaration​(java.lang.String propertyName)
        Parameters:
        propertyName - the name of the propery
        Returns:
        the property
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object