Class HslCssValue
java.lang.Object
com.webfirmframework.wffweb.data.AbstractBean<HslCssValue>
com.webfirmframework.wffweb.css.HslCssValue
-
Constructor Summary
ConstructorsConstructorDescriptionHslCssValue
(int h, float s, float l) HslCssValue
(HslCssValue hslCssValue) HslCssValue
(String hslCssValue) -
Method Summary
Methods inherited from class com.webfirmframework.wffweb.data.AbstractBean
getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer
-
Constructor Details
-
HslCssValue
public HslCssValue() -
HslCssValue
- Parameters:
hslCssValue
- eg:-hsl(155, 55%, 75%)
-
HslCssValue
-
HslCssValue
public HslCssValue(int h, float s, float l) - Parameters:
h
- hue value. accepts values only from 0 to 360.s
- saturation value. accepts values only from 0 to 100.l
- lightness value. accepts values only from 0 to 100.
-
-
Method Details
-
setHsl
- Parameters:
hsl
- eg:-hsl(155, 55%, 75%)
- Since:
- 1.0.0
-
getH
public int getH() -
setH
public void setH(int h) - Parameters:
h
- the hue value, it should be in between 0 to 360.- Since:
- 1.0.0
-
getS
public float getS()- Returns:
- the saturation value. Its unit is always %.
- Since:
- 1.0.0
-
setS
public void setS(float s) - Parameters:
s
- the saturation value, it should be in between 0 to 100.- Since:
- 1.0.0
-
getL
public float getL()- Returns:
- the lightness value. Its unit is always %.
- Since:
- 1.0.0
-
getSUnit
- Returns:
- the unit for saturation s.
- Since:
- 1.0.0
-
getLUnit
- Returns:
- the unit for lightness l.
- Since:
- 1.0.0
-
setL
public void setL(float l) - Parameters:
l
- the lightness value, it should be in between 0 to 100.- Since:
- 1.0.0
-
toString
-
getValue
- Returns:
- the print format of these values as a css value.
- Since:
- 1.0.0
-
isValid
- Parameters:
hslString
- eg:- hsl(125, 55%, 75%)- Returns:
- true if valid and false for invalid.
- Since:
- 1.0.0
-