Class BorderImageOutset

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


    public class BorderImageOutset
    extends AbstractCssProperty<BorderImageOutset>
    
     border-image-outset: length|number|initial|inherit;
    
     The border-image-outset property specifies the amount by which the border image area extends beyond the border box.
    
     Default value:  0
     Inherited:      no
     Animatable:     no
     Version:        CSS3
     JavaScript syntax:      object.style.borderImageOutset="10px"
    
     Examples:
    
         border-image-outset:5px 10px 15px 10px;
             top border is 5px
             right border is 10px
             bottom border is 15px
             border is 10px
    
         border-image-outset:5px 10px 15px;
             top border is 5px
             right and left borders are 10px
             bottom border is 15px
    
         border-image-outset:5px 10px;
             top and bottom borders are 5px
             right and left borders are 10px
    
         border-image-outset:5px;
             all four borders are 5px
    
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • LOGGER

        public static final java.util.logging.Logger LOGGER
    • Constructor Detail

      • BorderImageOutset

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

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

        public BorderImageOutset​(BorderImageOutset bottom)
        Parameters:
        bottom - the BorderBottomWidth object from which the cssValue to set.And, null will throw NullValueException
      • BorderImageOutset

        public BorderImageOutset​(float percent)
        Parameters:
        percent - the percentage value to set. The cssLengthUnit will automatically set to %.
        Since:
        1.0.0
      • BorderImageOutset

        public BorderImageOutset​(float value,
                                 CssLengthUnit cssLengthUnit)
        Parameters:
        value -
        cssLengthUnit -
    • Method Detail

      • setPercent

        public void setPercent​(float percent)
        Parameters:
        percent - the percent to set
        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
      • setCssValue

        public BorderImageOutset setCssValue​(java.lang.String cssValue)
        Specified by:
        setCssValue in class AbstractCssProperty<BorderImageOutset>
        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
      • setBorderImageTopRightBottomLeft

        public void setBorderImageTopRightBottomLeft​(java.lang.Float top,
                                                     java.lang.Float right,
                                                     java.lang.Float bottom,
                                                     java.lang.Float left,
                                                     CssLengthUnit unit)
        sets the top, right, bottom & left in BorderImageWidth.
        Parameters:
        top - the value for top. The value auto will be assigned for null value.
        right - the value for right. The value auto will be assigned for null value.
        bottom - the value for bottom. The value auto will be assigned for null value.
        left - the value for left. The value auto will be assigned for null value.
        unit - the CssLengthUnit for all of the given top, right, bottom & left values.
        Since:
        1.0.0
      • setBorderImageTopRightBottomLeft

        public void setBorderImageTopRightBottomLeft​(java.lang.Float top,
                                                     CssLengthUnit topUnit,
                                                     java.lang.Float right,
                                                     CssLengthUnit rightUnit,
                                                     java.lang.Float bottom,
                                                     CssLengthUnit bottomUnit,
                                                     java.lang.Float left,
                                                     CssLengthUnit leftUnit)
      • setTop

        public void setTop​(java.lang.Float top,
                           CssLengthUnit topUnit)
        Parameters:
        top - the top to set
        Since:
        1.0.0
      • setRight

        public void setRight​(java.lang.Float right,
                             CssLengthUnit rightUnit)
        Parameters:
        right - the right to set
        rightUnit -
        Since:
        1.0.0
      • setBottom

        public void setBottom​(java.lang.Float bottom,
                              CssLengthUnit bottomUnit)
        Parameters:
        bottom - the bottom to set
        bottomUnit -
        Since:
        1.0.0
      • setLeft

        public void setLeft​(java.lang.Float left,
                            CssLengthUnit leftUnit)
        Parameters:
        left - the left to set
        leftUnit -
        Since:
        1.0.0
      • getTop

        public java.lang.Float getTop​()
        Returns:
        the top. It will return null for auto or the cssValue is predefined constant.
        Since:
        1.0.0
      • getTopUnit

        public CssLengthUnit getTopUnit​()
        Returns:
        the topUnit
        Since:
        1.0.0
      • getRight

        public java.lang.Float getRight​()
        Returns:
        the right. It will return null for auto or the cssValue is predefined constant.
        Since:
        1.0.0
      • getRightUnit

        public CssLengthUnit getRightUnit​()
        Returns:
        the rightUnit
        Since:
        1.0.0
      • getBottom

        public java.lang.Float getBottom​()
        Returns:
        the bottom. It will return null for auto or the cssValue is predefined constant.
        Since:
        1.0.0
      • getBottomUnit

        public CssLengthUnit getBottomUnit​()
        Returns:
        the bottomUnit
        Since:
        1.0.0
      • getLeft

        public java.lang.Float getLeft​()
        Returns:
        the left. It will return null for auto or the cssValue is predefined constant.
        Since:
        1.0.0
      • getLeftUnit

        public CssLengthUnit getLeftUnit​()
        Returns:
        the leftUnit
        Since:
        1.0.0
      • getProducedCssValue

        protected static java.lang.String getProducedCssValue​(java.lang.Float top,
                                                              CssLengthUnit topUnit,
                                                              java.lang.Float right,
                                                              CssLengthUnit rightUnit,
                                                              java.lang.Float bottom,
                                                              CssLengthUnit bottomUnit,
                                                              java.lang.Float left,
                                                              CssLengthUnit leftUnit)
        Parameters:
        top - the value for top. The value auto will be assigned for null value.
        topUnit -
        right - the value for right. The value auto will be assigned for null value.
        rightUnit -
        bottom - the value for bottom. The value auto will be assigned for null value.
        bottomUnit -
        left - the value for left. The value auto will be assigned for null value.
        leftUnit -
        Returns:
        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
      • hasPredefinedConstantValue

        public boolean hasPredefinedConstantValue​()
        Returns:
        true if its cssValue is any of the values auto, initial or inherit.
        Since:
        1.0.0