Class BorderSpacing

  • All Implemented Interfaces:
    CssProperty, java.io.Serializable, java.lang.Cloneable


    public class BorderSpacing
    extends AbstractCssProperty<BorderSpacing>
     border-spacing: length|initial|inherit;
    
     The border-spacing property sets the distance between the borders of adjacent cells (only for the "separated borders" model).
     Default value:  0
     Inherited:      yes
     Animatable:     yes
     Version:        CSS2
     JavaScript syntax:      object.style.borderSpacing="15px"
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • BorderSpacing

        public BorderSpacing​()
        The 0px will be set as the value
      • BorderSpacing

        public BorderSpacing​(java.lang.String cssValue)
        Parameters:
        cssValue - the css value to set.
      • BorderSpacing

        public BorderSpacing​(BorderSpacing borderSpacing)
        Parameters:
        widthtCss - the WidthCss object from which the cssValue to set.And, null will throw NullValueException
      • BorderSpacing

        public BorderSpacing​(float horizontalVerticalValue,
                             CssLengthUnit cssLengthUnit)
        Parameters:
        horizontalVerticalValue - the value to set.
        the - value unit to set.
        Since:
        1.0.0
      • BorderSpacing

        public BorderSpacing​(float horizontalValue,
                             CssLengthUnit horizontalCssLengthUnit,
                             float verticalValue,
                             CssLengthUnit verticalCssLengthUnit)
        Parameters:
        horizontalValue -
        horizontalCssLengthUnit -
        verticalValue -
        verticalCssLengthUnit -
        Since:
        1.0.0
    • Method Detail

      • setValue

        public BorderSpacing setValue​(float horizontalValue,
                                      CssLengthUnit horizontalCssLengthUnit,
                                      float verticalValue,
                                      CssLengthUnit verticalCssLengthUnit)
        Parameters:
        horizontalValue -
        horizontalCssLengthUnit -
        verticalValue -
        verticalCssLengthUnit -
        Returns:
        Since:
        1.0.0
      • setValue

        public BorderSpacing setValue​(float horizontalVerticalValue,
                                      CssLengthUnit cssLengthUnit)
        Parameters:
        horizontalVerticalValue -
        cssLengthUnit -
        Returns:
        the current object
        Since:
        1.0.0
      • getCssName

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

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

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object
      • getHorizontalValue

        public java.lang.Float getHorizontalValue​()
        gets the horizontal value in float value. BorderSpacing#getHorizontalUnit() should be used to get the cssLengthUnit for this value.
        Returns:
        the horizontal value in float or null if the value is any inbuilt value like inherit.
        Since:
        1.0.0
      • getVerticalValue

        public java.lang.Float getVerticalValue​()
        gets the vertical value in float value. BorderSpacing#getVerticalUnit() should be used to get the cssLengthUnit for this value.
        Returns:
        the vertical value in float or null if the value is any inbuilt value like inherit.
        Since:
        1.0.0
      • getHorizontalUnit

        public CssLengthUnit getHorizontalUnit​()
        Returns:
        the cssLengthUnit PX/PER, or null if the value is any inbuilt value like inherit.
        Since:
        1.0.0
      • getVerticalUnit

        public CssLengthUnit getVerticalUnit​()
        Returns:
        the cssLengthUnit PX/PER, or null if the value is any inbuilt value like inherit.
        Since:
        1.0.0
      • setCssValue

        public BorderSpacing setCssValue​(java.lang.String cssValue)
        Specified by:
        setCssValue in class AbstractCssProperty<BorderSpacing>
        Parameters:
        cssValue - the value should be in the format of 55px or 95%. 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​(java.lang.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