Class DocumentStyleImpl

java.lang.Object
org.opencms.gwt.client.util.impl.DocumentStyleImpl
Direct Known Subclasses:
DocumentStyleImplIE9

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

This implementation is used for all none MSIE browsers.

Since:
8.0.0
  • Constructor Details

  • Method Details

    • camelize

      protected static String camelize(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 String getCurrentStyle(com.google.gwt.dom.client.Element elem, 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 String getPropertyName(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 String hyphenize(String name)
      Hyphenizes the given string.

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

      protected String getComputedStyle(com.google.gwt.dom.client.Element elem, 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