Class ListStyle

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

public class ListStyle extends AbstractCssProperty<ListStyle> implements StateChangeInformer<CssProperty>
list-style: list-style-type list-style-position list-style-image|initial|inherit; Formal syntax: <'list-style-type'> || <'list-style-position'> || <'list-style-image'>
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • ListStyle

      public ListStyle()
      The value disc outside none will be assigned as the cssValue.
      Since:
      1.0.0
    • ListStyle

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

      public ListStyle(ListStyle listStyle)
      Parameters:
      listStyle - the ListStyle 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 ListStyle setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<ListStyle>
      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(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
    • getListStyleImage

      public ListStyleImage getListStyleImage()
    • getListStylePosition

      public ListStylePosition getListStylePosition()
    • getListStyleType

      public ListStyleType getListStyleType()
    • setListStyleType

      public ListStyle setListStyleType(ListStyleType listStyleType)
    • setListStylePosition

      public ListStyle setListStylePosition(ListStylePosition listStylePosition)
    • setListStyleImage

      public ListStyle setListStyleImage(ListStyleImage listStyleImage)
    • stateChanged

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

      protected void addPredefinedConstant(String constant)
      Since:
      1.0.0