Class Border

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


    public class Border
    extends AbstractCssProperty<Border>
    implements StateChangeInformer<Bean>
     border: border-width border-style border-color|initial|inherit;
    
     The border shorthand property sets all the border properties in one
     declaration.
    
     The properties that can be set, are (in order): border-width, border-style,
     and border-color.
    
     It does not matter if one of the values above are missing, e.g. border:solid
     #ff0000; is allowed.
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • LOGGER

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

      • Border

        public Border​()
        The value medium none #000000 will be assigned as the cssValue.
        Since:
        1.0.0
      • Border

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

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

      • 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
      • setCssValue

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

        public static boolean isValid​(java.lang.String cssValue)
        checks the given css value is valid for this class. It does't do a strict validation.
        Parameters:
        cssValue -
        Returns:
        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
      • getBorderColorCssValues

        public BorderColorCssValues getBorderColorCssValues​()
        Returns:
        the BorderStyle object or null if there is not.
        Since:
        1.0.0
      • getBorderStyle

        public BorderStyle getBorderStyle​()
        Returns:
        the BorderStyle object or null if there is not.
        Since:
        1.0.0
      • setBorderWidthValue

        public Border setBorderWidthValue​(java.lang.String borderWidthValue)
        Parameters:
        borderWidthValue -
        Returns:
        the current object..
        Since:
        1.0.0
      • setBorderStyle

        public Border setBorderStyle​(BorderStyle borderStyle)
        to set the border style.
        Parameters:
        borderStyle -
        Returns:
        the current object.
        Since:
        1.0.0
      • setBorderColorCssValues

        public Border setBorderColorCssValues​(BorderColorCssValues borderColorCssValues)
        Parameters:
        borderColorCssValues - to set the border color.
        Returns:
        the current object
        Since:
        1.0.0
      • getBorderWidthValue

        public java.lang.String getBorderWidthValue​()
        Returns:
        the borderWidthValue
        Since:
        1.0.0