com.maryanovsky.gwtutils.client.ui
Class CssLength

java.lang.Object
  extended by com.maryanovsky.gwtutils.client.ui.CssLength

public class CssLength
extends Object

Encapsulates a CSS length, that is a value and the CSS unit of this value ("2em", "5px" etc).

Author:
Maryanovsky Alexander

Constructor Summary
CssLength(double value, Style.Unit unit)
          Creates a new CssLength object with the specified value and CSS unit.
 
Method Summary
 Style.Unit getUnit()
          Returns the CSS unit.
 double getValue()
          Returns the value.
 String toString()
          Returns the value with the name of the unit appended to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CssLength

public CssLength(double value,
                 Style.Unit unit)
Creates a new CssLength object with the specified value and CSS unit.

Method Detail

getValue

public double getValue()
Returns the value.


getUnit

public Style.Unit getUnit()
Returns the CSS unit.


toString

public String toString()
Returns the value with the name of the unit appended to it.

Overrides:
toString in class Object