|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.ComputedStyle
public class ComputedStyle
| Field Summary | |
|---|---|
protected JavaScriptObject |
computedStyle
|
| Constructor Summary | |
|---|---|
ComputedStyle(Element elem)
Gets this element's computed style object which can be used to gather information about the current state of the rendered node. |
|
| Method Summary | |
|---|---|
int[] |
getBorder()
Get current border values from the DOM. |
double |
getBorderHeight()
Returns the sum of the top and bottom border width |
double |
getBorderWidth()
Returns the sum of the left and right border width |
double |
getDoubleProperty(java.lang.String name)
Retrieves the given computed property as a double Returns NaN if the property cannot be converted to a double |
double |
getHeight()
Returns the current height from the DOM. |
int |
getIntProperty(java.lang.String name)
Retrieves the given computed property as an integer Returns 0 if the property cannot be converted to an integer |
int[] |
getMargin()
Get current margin values from the DOM. |
double |
getMarginHeight()
Returns the sum of the top and bottom margin |
double |
getMarginWidth()
Returns the sum of the top and bottom margin |
int[] |
getPadding()
Get current padding values from the DOM. |
double |
getPaddingHeight()
Returns the sum of the top and bottom padding |
double |
getPaddingWidth()
Returns the sum of the top and bottom padding |
java.lang.String |
getProperty(java.lang.String name)
|
double |
getWidth()
Returns the current width from the DOM. |
static java.lang.Integer |
parseInt(java.lang.String value)
Deprecated. Since 7.1.4, the method parseIntNative(String) is
used internally and this method does not belong in the public
API of ComputedStyle. parseInt(String) might
be removed or moved to a utility class in future versions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final JavaScriptObject computedStyle
| Constructor Detail |
|---|
public ComputedStyle(Element elem)
Note that this method is expensive. Wherever possible, reuse the returned object.
elem - the element| Method Detail |
|---|
public final java.lang.String getProperty(java.lang.String name)
name - name of the CSS property in camelCase
public final int getIntProperty(java.lang.String name)
name - the property to retrieve
public final double getDoubleProperty(java.lang.String name)
name - the property to retrieve
public final int[] getMargin()
public final int[] getPadding()
public final int[] getBorder()
public double getWidth()
public double getHeight()
@Deprecated public static java.lang.Integer parseInt(java.lang.String value)
parseIntNative(String) is
used internally and this method does not belong in the public
API of ComputedStyle. parseInt(String) might
be removed or moved to a utility class in future versions.
String - a value starting with a number
null.public double getBorderHeight()
public double getBorderWidth()
public double getPaddingHeight()
public double getPaddingWidth()
public double getMarginHeight()
public double getMarginWidth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||