Enum Class BackgroundOrigin

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

public enum BackgroundOrigin extends Enum<BackgroundOrigin>
CSS background-origin property values defining background positioning area.

The background-origin property specifies the origin position of a background image. It determines where the background-position property is calculated relative to.

Usage:


 element.setBackgroundOrigin(BackgroundOrigin.CONTENT_BOX);
 element.setBackgroundOrigin(BackgroundOrigin.PADDING_BOX);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INHERIT

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

      public static final BackgroundOrigin INITIAL
      Sets to default value.
    • BORDER_BOX

      public static final BackgroundOrigin BORDER_BOX
      Background is positioned relative to the border box.
    • PADDING_BOX

      public static final BackgroundOrigin PADDING_BOX
      Background is positioned relative to the padding box (default).
    • CONTENT_BOX

      public static final BackgroundOrigin CONTENT_BOX
      Background is positioned relative to the content box.
  • Method Details

    • values

      public static BackgroundOrigin[] 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 BackgroundOrigin 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<BackgroundOrigin>
      Returns:
      the CSS value