Class ListStyleImage

All Implemented Interfaces:
CssProperty, Serializable, Cloneable

public class ListStyleImage extends AbstractCssProperty<ListStyleImage>
list-style-image: none|url|initial|inherit;
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • ListStyleImage

      public ListStyleImage()
      The auto will be set as the value
    • ListStyleImage

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

      public ListStyleImage(String value, boolean urlValue)
      Parameters:
      value - the css value or url value to set.
      urlValue - images/TestImage.png
    • ListStyleImage

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

    • getCssName

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

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

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

      public ListStyleImage setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<ListStyleImage>
      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
    • setUrl

      public ListStyleImage setUrl(String url)
      Parameters:
      url - eg:- images/Test.png
      Returns:
      the current object
      Since:
      1.0.0
    • getUrl

      public String getUrl()
      Returns:
      the url value set. Or, null if it is set with any inbuilt value like inherit
      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
    • setAsNone

      public void setAsNone()
      sets as none.
      Since:
      1.0.0
    • hasInbuiltValue

      public boolean hasInbuiltValue()
    • isValid

      public static boolean isValid(String cssValue)
      To check whether the given cssValue is valid for this class.
      Parameters:
      cssValue -
      Returns:
      true if the given cssValue is valid for this class.
      Since:
      1.0.0