|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.WidgetUtil.CssSize
public static class WidgetUtil.CssSize
Wrap a css size value and its unit and translate back and forth to the
string representation.
Eg. 50%, 123px, ...
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
static boolean |
equals(java.lang.String cssSize1,
java.lang.String cssSize2)
Check whether the two sizes are equals. |
static WidgetUtil.CssSize |
fromString(java.lang.String s)
Parse the size from string format to WidgetUtil.CssSize. |
static WidgetUtil.CssSize |
fromValueUnit(float value,
Unit unit)
Creates a WidgetUtil.CssSize using a value and its measurement unit. |
Unit |
getUnit()
Gets the measurement unit for this css size. |
float |
getValue()
Gets the value for this css size. |
java.lang.String |
toString()
|
static Unit |
unitByType(java.lang.String type)
Gets the unit value by its type. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Unit unitByType(java.lang.String type)
type - the type of the unit as found in the style.
public static WidgetUtil.CssSize fromString(java.lang.String s)
WidgetUtil.CssSize.
s - the size as string.
WidgetUtil.CssSize object.
public static WidgetUtil.CssSize fromValueUnit(float value,
Unit unit)
WidgetUtil.CssSize using a value and its measurement unit.
value - the value.unit - the unit.
WidgetUtil.CssSize object.public float getValue()
public Unit getUnit()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public static boolean equals(java.lang.String cssSize1,
java.lang.String cssSize2)
cssSize1 - the first size to compare.cssSize2 - the other size to compare with the first one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||