Class DocumentStyleImpl

  • Direct Known Subclasses:
    DocumentStyleImplIE9

    public class DocumentStyleImpl
    extends java.lang.Object
    Helper class to retrieve the computed style of an element.

    This implementation is used for all none MSIE browsers.

    Since:
    8.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String camelize​(java.lang.String s)
      Transforms a CSS property name to its javascript property name (font-size >> fontSize).
      void clearOpacity​(com.google.gwt.dom.client.Element element)
      Removes the opacity attribute from the element's inline-style.
      protected java.lang.String getComputedStyle​(com.google.gwt.dom.client.Element elem, java.lang.String name)
      Returns the computed style from the DOM object.
      java.lang.String getCurrentStyle​(com.google.gwt.dom.client.Element elem, java.lang.String name)
      Returns the computed style of the given element.
      java.lang.String getPropertyName​(java.lang.String name)
      Transforms the CSS style name to the name of the javascript style property.
      protected java.lang.String hyphenize​(java.lang.String name)
      Hyphenizes the given string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • camelize

        protected static java.lang.String camelize​(java.lang.String s)
        Transforms a CSS property name to its javascript property name (font-size >> fontSize).

        Parameters:
        s - the property name
        Returns:
        the javascript property name
      • clearOpacity

        public void clearOpacity​(com.google.gwt.dom.client.Element element)
        Removes the opacity attribute from the element's inline-style.

        Parameters:
        element - the DOM element to manipulate
      • getCurrentStyle

        public java.lang.String getCurrentStyle​(com.google.gwt.dom.client.Element elem,
                                                java.lang.String name)
        Returns the computed style of the given element.

        Parameters:
        elem - the element
        name - the name of the CSS property
        Returns:
        the currently computed style
      • getPropertyName

        public java.lang.String getPropertyName​(java.lang.String name)
        Transforms the CSS style name to the name of the javascript style property.

        Parameters:
        name - the name of the CSS property
        Returns:
        the javascript property name
      • hyphenize

        protected java.lang.String hyphenize​(java.lang.String name)
        Hyphenizes the given string.

        Parameters:
        name - the string to hyphenize
        Returns:
        the result
      • getComputedStyle

        protected java.lang.String getComputedStyle​(com.google.gwt.dom.client.Element elem,
                                                    java.lang.String name)
        Returns the computed style from the DOM object.

        Parameters:
        elem - the element object
        name - name of the CSS property
        Returns:
        the property value