Class BorderBottom

All Implemented Interfaces:
CssProperty, StateChangeInformer<CssProperty>, Serializable, Cloneable

public class BorderBottom extends AbstractCssProperty<BorderBottom> implements StateChangeInformer<CssProperty>
 The border-bottom shorthand property sets all the bottom border properties in one declaration.

 The properties that can be set, are (in order): border-bottom-width, border-bottom-style, and border-bottom-color.

 If one of the values above are missing, e.g. border-bottom:solid #ff0000, the default value for the missing property will be inserted, if any.
 Default value:  medium none color
 Inherited:      no
 Animatable:     yes
 Version:        CSS1
 JavaScript syntax:      object.style.borderBottom="3px dashed blue"
 
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • BorderBottom

      public BorderBottom()
      The value medium none black will be assigned as the cssValue.
      Since:
      1.0.0
    • BorderBottom

      public BorderBottom(String cssValue)
      Parameters:
      cssValue - the css value to set.
    • BorderBottom

      public BorderBottom(BorderBottom borderBottom)
      Parameters:
      borderBottom - the BorderBottom object from which the cssValue to set.And, null will throw NullValueException
  • Method Details

    • getCssName

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

      public String getCssValue()
      Specified by:
      getCssValue in interface CssProperty
      Returns:
      the value portion in style, eg center for style align-content: center.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setCssValue

      public BorderBottom setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<BorderBottom>
      Parameters:
      cssValue - the value should be in the format of medium none color, initial or inherit. 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(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
    • getBorderBottomColor

      public BorderBottomColor getBorderBottomColor()
    • getBorderBottomStyle

      public BorderBottomStyle getBorderBottomStyle()
    • getBorderBottomWidth

      public BorderBottomWidth getBorderBottomWidth()
    • setBorderBottomWidth

      public BorderBottom setBorderBottomWidth(BorderBottomWidth borderBottomWidth)
    • setBorderBottomStyle

      public BorderBottom setBorderBottomStyle(BorderBottomStyle borderBottomStyle)
    • setBorderBottomColor

      public BorderBottom setBorderBottomColor(BorderBottomColor borderBottomColor)
    • stateChanged

      public void stateChanged(CssProperty stateChangedObject)
      Specified by:
      stateChanged in interface StateChangeInformer<CssProperty>
    • addPredefinedConstant

      protected void addPredefinedConstant(String constant)
      Since:
      1.0.0