Class WebkitFlexShrink

All Implemented Interfaces:
CssProperty, Serializable, Cloneable

public class WebkitFlexShrink extends AbstractCssProperty<WebkitFlexShrink>
  -webkit-flex-shrink: number|initial|inherit;
 The -webkit-flex-shrink property specifies how the item will shrink relative to the rest of the flexible items inside the same container.

 Note: If the element is not a flexible item, the flex-shrink property has no effect.
 Default value:  1
 Inherited:      no
 Animatable:     yes
 Version:        CSS3
 JavaScript syntax:      object.style.webkitFlexShrink="5"
 
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • WebkitFlexShrink

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

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

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

      public WebkitFlexShrink(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 webkitFlexShrink 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 WebkitFlexShrink setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<WebkitFlexShrink>
      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
    • 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