Enum Class BackgroundPosition

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

public enum BackgroundPosition extends Enum<BackgroundPosition>
CSS background-position property keyword values for image positioning.

The BackgroundPosition enum provides keyword combinations for positioning background images. Each value specifies both horizontal and vertical position.

Usage:


 element.setBackgroundPosition(BackgroundPosition.CENTER_CENTER);
 element.setBackgroundPosition(BackgroundPosition.RIGHT_BOTTOM);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INHERIT

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

      public static final BackgroundPosition INITIAL
      Sets to default value.
    • LEFT_TOP

      public static final BackgroundPosition LEFT_TOP
      Position at left horizontally, top vertically.
    • LEFT_CENTER

      public static final BackgroundPosition LEFT_CENTER
      Position at left horizontally, center vertically.
    • LEFT_BOTTOM

      public static final BackgroundPosition LEFT_BOTTOM
      Position at left horizontally, bottom vertically.
    • RIGHT_TOP

      public static final BackgroundPosition RIGHT_TOP
      Position at right horizontally, top vertically.
    • RIGHT_CENTER

      public static final BackgroundPosition RIGHT_CENTER
      Position at right horizontally, center vertically.
    • RIGHT_BOTTOM

      public static final BackgroundPosition RIGHT_BOTTOM
      Position at right horizontally, bottom vertically.
    • CENTER_TOP

      public static final BackgroundPosition CENTER_TOP
      Position at center horizontally, top vertically.
    • CENTER_CENTER

      public static final BackgroundPosition CENTER_CENTER
      Position at center horizontally and vertically.
    • CENTER_BOTTOM

      public static final BackgroundPosition CENTER_BOTTOM
      Position at center horizontally, bottom vertically.
  • Method Details

    • values

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