Class BorderColor

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


    public class BorderColor
    extends AbstractCssProperty<BorderColor>
    implements StateChangeInformer<CssProperty>
     border-color: color|transparent|initial|inherit;
    
     The border-color property sets the color of an element's four borders. This property can have from one to four values.
    
     Examples:
    
         border-color:red green blue pink;
             top border is red
             right border is green
             bottom border is blue
             left border is pink
    
         border-color:red green blue;
             top border is red
             right and left borders are green
             bottom border is blue
    
         border-color:red green;
             top and bottom borders are red
             right and left borders are green
    
         border-color:red;
             all four borders are red
    
     Note: Always declare the border-style property before the border-color property. An element must have borders before you can change the color.
     Default value:  The current color of the element
     Inherited:      no
     Animatable:     yes
     Version:        CSS1
     JavaScript syntax:      object.style.borderColor="#FF0000 blue"
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • LOGGER

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

      • BorderColor

        public BorderColor​()
        The initial will be set as the value
      • BorderColor

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

        public BorderColor​(BorderColor borderBottomColor)
        Parameters:
        borderBottomColor - the BorderBottomColor object from which the cssValue to set.And, null will throw NullValueException
    • Method Detail

      • setValue

        public BorderColor setValue​(java.lang.String value)
        the color/color code to set. The alternative method setCssValue can also be used.
        Parameters:
        value -
        Returns:
        the current object
        Since:
        1.0.0
      • getCssName

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

        public java.lang.String getCssValue​()
        Specified by:
        getCssValue in interface CssProperty
        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.String getValue​()
        gets the value, getCssValue method can also be used to get the same value.
        Returns:
        the value in String.
        Since:
        1.0.0
      • setCssValue

        public BorderColor setCssValue​(java.lang.String cssValue)
        Specified by:
        setCssValue in class AbstractCssProperty<BorderColor>
        Parameters:
        cssValue - the value should be a color/color code, for example #0000ff. null is considered as an invalid value and it will throw NullValueException.And an empty string is also considered as an invalid value and it will throw InvalidValueException.
        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
      • setAsTransparent

        public void setAsTransparent​()
        sets as transparent
        Since:
        1.0.0
      • getBorderTopColor

        public BorderTopColor getBorderTopColor​()
        Returns:
        the borderTopColor
        Since:
        1.0.0
      • getBorderRightColor

        public BorderRightColor getBorderRightColor​()
        Returns:
        the borderRightColor
        Since:
        1.0.0
      • getBorderBottomColor

        public BorderBottomColor getBorderBottomColor​()
        Returns:
        the borderBottomColor
        Since:
        1.0.0
      • getBorderLeftColor

        public BorderLeftColor getBorderLeftColor​()
        Returns:
        the borderLeftColor
        Since:
        1.0.0
      • hasPredefinedConstantValue

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

        public static boolean isValid​(java.lang.String cssValue)
        Since:
        1.0.0