Package org.opencms.gwt.client.util.impl
Class DocumentStyleImpl
java.lang.Object
org.opencms.gwt.client.util.impl.DocumentStyleImpl
- Direct Known Subclasses:
DocumentStyleImplIE9
Helper class to retrieve the computed style of an element.
This implementation is used for all none MSIE browsers.
- Since:
- 8.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringTransforms a CSS property name to its javascript property name (font-size >> fontSize).voidclearOpacity(com.google.gwt.dom.client.Element element) Removes the opacity attribute from the element's inline-style.protected StringgetComputedStyle(com.google.gwt.dom.client.Element elem, String name) Returns the computed style from the DOM object.getCurrentStyle(com.google.gwt.dom.client.Element elem, String name) Returns the computed style of the given element.getPropertyName(String name) Transforms the CSS style name to the name of the javascript style property.protected StringHyphenizes the given string.
-
Constructor Details
-
DocumentStyleImpl
public DocumentStyleImpl()
-
-
Method Details
-
camelize
Transforms a CSS property name to its javascript property name (font-size >> fontSize).- Parameters:
s- the property name- Returns:
- the javascript property name
-
clearOpacity
Removes the opacity attribute from the element's inline-style.- Parameters:
element- the DOM element to manipulate
-
getCurrentStyle
Returns the computed style of the given element.- Parameters:
elem- the elementname- the name of the CSS property- Returns:
- the currently computed style
-
getPropertyName
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
-
getComputedStyle
Returns the computed style from the DOM object.- Parameters:
elem- the element objectname- name of the CSS property- Returns:
- the property value
-
hyphenize
Hyphenizes the given string.- Parameters:
name- the string to hyphenize- Returns:
- the result
-