Enum Class BackgroundColor

java.lang.Object
java.lang.Enum<BackgroundColor>
com.oorian.css.BackgroundColor
All Implemented Interfaces:
Serializable, Comparable<BackgroundColor>, Constable

public enum BackgroundColor extends Enum<BackgroundColor>
CSS background-color property keyword values.

The BackgroundColor enum provides keyword values for the CSS background-color property. For specific colors, use the Color class or color string values.

Usage:


 element.setBackgroundColor(BackgroundColor.TRANSPARENT);
 element.setBackgroundColor(new Color("#ff0000")); // For specific colors
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INHERIT

      public static final BackgroundColor INHERIT
      Inherits from parent element.
    • INITIAL

      public static final BackgroundColor INITIAL
      Sets to default value.
    • TRANSPARENT

      public static final BackgroundColor TRANSPARENT
      Fully transparent background.
  • Method Details

    • values

      public static BackgroundColor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BackgroundColor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<BackgroundColor>
      Returns:
      the CSS value