Package com.webfirmframework.wffweb.css
Class WordSpacing
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<WordSpacing>
com.webfirmframework.wffweb.css.WordSpacing
- All Implemented Interfaces:
CssProperty
,Serializable
,Cloneable
word-spacing: normal|length|initial|inherit; The word-spacing property increases or decreases the white space between words. Note: Negative values are allowed. Default value: normal Inherited: yes Animatable: yes Version: CSS1 JavaScript syntax: object.style.wordSpacing="20px"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThenormal
will be set as the valueWordSpacing
(float percent) WordSpacing
(float value, CssLengthUnit cssLengthUnit) WordSpacing
(WordSpacing wordSpacing) WordSpacing
(String cssValue) -
Method Summary
Modifier and TypeMethodDescriptiongetUnit()
getValue()
gets the word-spacing in float value.void
sets asinherit
void
sets asinitial
void
sets asnormal
.setCssValue
(String cssValue) void
setPercent
(float percent) setValue
(float value, CssLengthUnit cssLengthUnit) toString()
Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString
-
Field Details
-
NORMAL
- See Also:
-
INITIAL
- See Also:
-
INHERIT
- See Also:
-
-
Constructor Details
-
WordSpacing
public WordSpacing()Thenormal
will be set as the value -
WordSpacing
- Parameters:
cssValue
- the css value to set.
-
WordSpacing
- Parameters:
wordSpacing
- theWordSpacing
object from which the cssValue to set.And,null
will throwNullValueException
-
WordSpacing
public WordSpacing(float percent) - Parameters:
percent
- the percentage value to set. The cssLengthUnit will automatically set to %.- Since:
- 1.0.0
-
WordSpacing
- Parameters:
value
-cssLengthUnit
-
-
-
Method Details
-
setValue
- Parameters:
value
-cssLengthUnit
-- Returns:
- the current object
- Since:
- 1.0.0
-
setPercent
public void setPercent(float percent) - Parameters:
percent
- the percent to set- Since:
- 1.0.0
-
getCssName
- Returns:
- the name portion in style, eg
align-content
for stylealign-content: center
.
-
getCssValue
- Returns:
- the value portion in style, eg
center
for stylealign-content: center
.
-
toString
-
getValue
gets the word-spacing in float value.WordSpacing#getUnit()
should be used to get the cssLengthUnit for this value.- Returns:
- the value in float or null if the cssValue is
initial
orinherit
. - Since:
- 1.0.0
-
getUnit
- Returns:
- the cssLengthUnit
PX
/PER
, ornull
if the value is any inbuilt value likeinherit
. - Since:
- 1.0.0
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<WordSpacing>
- Parameters:
cssValue
- the value should be in the format of55px
or95%
.null
is considered as an invalid value and it will throwNullValueException
.- Returns:
- the current object.
- Since:
- 1.0.0
-
setAsInitial
public void setAsInitial()sets asinitial
- Since:
- 1.0.0
-
setAsInherit
public void setAsInherit()sets asinherit
- Since:
- 1.0.0
-
setAsNormal
public void setAsNormal()sets asnormal
.- Since:
- 1.0.0
-