|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.Util.CssSize
public static class Util.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 Util.CssSize |
fromString(java.lang.String s)
Parse the size from string format to Util.CssSize. |
static Util.CssSize |
fromValueUnit(float value,
Unit unit)
Creates a Util.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 Util.CssSize fromString(java.lang.String s)
Util.CssSize.
s - the size as string.
Util.CssSize object.
public static Util.CssSize fromValueUnit(float value,
Unit unit)
Util.CssSize using a value and its measurement unit.
value - the value.unit - the unit.
Util.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 | |||||||||