Class BorderRightWidth

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


    public class BorderRightWidth
    extends AbstractCssProperty<BorderRightWidth>
     border-right-width: medium|thin|thick|length|initial|inherit;
    
     The border-right-width property sets the width of an element's right border.
    
     Note: Always declare the border-style property before the border-right-width property. An element must have borders before you can change the width.
     Default value:  medium
     Inherited:      no
     Animatable:     yes
     Version:        CSS1
     JavaScript syntax:      object.style.borderRightWidth="5px"
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • BorderRightWidth

        public BorderRightWidth​()
        The medium will be set as the value
      • BorderRightWidth

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

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

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

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

      • setValue

        public BorderRightWidth setValue​(float value,
                                         CssLengthUnit cssLengthUnit)
        Parameters:
        value -
        cssLengthUnit -
        Returns:
        the current object
        Since:
        1.0.0
      • 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
      • getValue

        public java.lang.Float getValue​()
        gets the border-right-width in Float value. BorderRightWidth#getUnit() should be used to get the cssLengthUnit for this value.
        Returns:
        the value in float or null if the cssValue is initial or inherit.
        Since:
        1.0.0
      • getUnit

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

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

        public void setAsMedium​()
        sets as medium.
        Since:
        1.0.0
      • setAsThin

        public void setAsThin​()
        sets as thin.
        Since:
        1.0.0
      • setAsThick

        public void setAsThick​()
        sets as thick.
        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