Class FontSizeAdjust
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<FontSizeAdjust>
com.webfirmframework.wffweb.css.css3.FontSizeAdjust
- All Implemented Interfaces:
CssProperty
,Serializable
,Cloneable
font-size-adjust: number|none|initial|inherit; The font-size-adjust property gives you better control of the font size when the first selected font is not available. When a font is not available, the browser uses the second specified font. This could result in a big change for the font size. To prevent this, use the font-size-adjust property. All fonts have an "aspect value" which is the size-difference between the lowercase letter "x" and the uppercase letter "X". When the browser knows the "aspect value" for the first selected font, the browser can figure out what font-size to use when displaying text with the second choice font. Default value: none Inherited: yes Animatable: yes Version: CSS3 JavaScript syntax: object.style.fontSizeAdjust="0.58"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThe default valuenone
will be set as the cssValue.FontSizeAdjust
(float value) FontSizeAdjust
(FontSizeAdjust fontSizeAdjust) FontSizeAdjust
(String cssValue) -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
gets the fontSizeAdjust inFloat
value.static boolean
validates if the given cssValue is valid for this class.void
sets asinherit
void
sets asinitial
void
sets asnone
setCssValue
(String cssValue) void
setValue
(float value) toString()
Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString
-
Field Details
-
INITIAL
- See Also:
-
INHERIT
- See Also:
-
NONE
- See Also:
-
-
Constructor Details
-
FontSizeAdjust
public FontSizeAdjust()The default valuenone
will be set as the cssValue.- Since:
- 1.0.0
-
FontSizeAdjust
- Parameters:
cssValue
- the css value to set.
-
FontSizeAdjust
- Parameters:
fontSizeAdjust
- theFontSizeAdjust
object from which the cssValue to set.And,null
will throwNullValueException
-
FontSizeAdjust
public FontSizeAdjust(float value) - Parameters:
value
-
-
-
Method Details
-
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 fontSizeAdjust inFloat
value.- Returns:
- the value in float or null if the cssValue is
initial
orinherit
. - Since:
- 1.0.0
-
setValue
public void setValue(float value) - Parameters:
value
- the value to set- Since:
- 1.0.0
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<FontSizeAdjust>
- Parameters:
cssValue
- the value should be in the format of0.5
,initial/inherit
.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
-
setAsNone
public void setAsNone()sets asnone
- Since:
- 1.0.0
-
isValid
validates if the given cssValue is valid for this class.- Parameters:
cssValue
- the value to check.- Returns:
- true if valid and false if invalid.
- Since:
- 1.0.0
-