Class BorderRight

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

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

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

 If one of the values above are missing, e.g. border-right: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.borderRight="3px dashed blue"
 
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • BorderRight

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

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

      public BorderRight(BorderRight borderRight)
      Parameters:
      borderRight - the BorderRight 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 BorderRight setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<BorderRight>
      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
    • getBorderRightColor

      public BorderRightColor getBorderRightColor()
    • getBorderRightStyle

      public BorderRightStyle getBorderRightStyle()
    • getBorderRightWidth

      public BorderRightWidth getBorderRightWidth()
    • setBorderRightWidth

      public BorderRight setBorderRightWidth(BorderRightWidth borderRightWidth)
    • setBorderRightStyle

      public BorderRight setBorderRightStyle(BorderRightStyle borderRightStyle)
    • setBorderRightColor

      public BorderRight setBorderRightColor(BorderRightColor borderRightColor)
    • stateChanged

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

      protected void addPredefinedConstant(String constant)
      Since:
      1.0.0