Class FontSizeAdjust

All Implemented Interfaces:
CssProperty, Serializable, Cloneable

public class FontSizeAdjust extends AbstractCssProperty<FontSizeAdjust>
  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 Details

  • Constructor Details

    • FontSizeAdjust

      public FontSizeAdjust()
      The default value none will be set as the cssValue.
      Since:
      1.0.0
    • FontSizeAdjust

      public FontSizeAdjust(String cssValue)
      Parameters:
      cssValue - the css value to set.
    • FontSizeAdjust

      public FontSizeAdjust(FontSizeAdjust fontSizeAdjust)
      Parameters:
      fontSizeAdjust - the FontSizeAdjust object from which the cssValue to set.And, null will throw NullValueException
    • FontSizeAdjust

      public FontSizeAdjust(float value)
      Parameters:
      value -
  • Method Details

    • getCssName

      public String getCssName()
      Returns:
      the name portion in style, eg align-content for style align-content: center.
    • getCssValue

      public String getCssValue()
      Returns:
      the value portion in style, eg center for style align-content: center.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public Float getValue()
      gets the fontSizeAdjust in Float value.
      Returns:
      the value in float or null if the cssValue is initial or inherit.
      Since:
      1.0.0
    • setValue

      public void setValue(float value)
      Parameters:
      value - the value to set
      Since:
      1.0.0
    • setCssValue

      public FontSizeAdjust setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<FontSizeAdjust>
      Parameters:
      cssValue - the value should be in the format of 0.5, initial/inherit. null is considered as an invalid value and it will throw NullValueException.
      Returns:
      the current object.
      Since:
      1.0.0
    • setAsInitial

      public void setAsInitial()
      sets as initial
      Since:
      1.0.0
    • setAsInherit

      public void setAsInherit()
      sets as inherit
      Since:
      1.0.0
    • setAsNone

      public void setAsNone()
      sets as none
      Since:
      1.0.0
    • isValid

      public static boolean isValid(String cssValue)
      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