Enum Class BackgroundRepeat

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

public enum BackgroundRepeat extends Enum<BackgroundRepeat>
CSS background-repeat property values for image tiling behavior.

The background-repeat property sets how background images are repeated. By default, a background image is repeated both horizontally and vertically.

Usage:


 element.setBackgroundRepeat(BackgroundRepeat.NO_REPEAT);
 element.setBackgroundRepeat(BackgroundRepeat.REPEAT_X);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INHERIT

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

      public static final BackgroundRepeat INITIAL
      Sets to default value.
    • REPEAT

      public static final BackgroundRepeat REPEAT
      Image repeats both horizontally and vertically (default).
    • REPEAT_X

      public static final BackgroundRepeat REPEAT_X
      Image repeats only horizontally.
    • REPEAT_Y

      public static final BackgroundRepeat REPEAT_Y
      Image repeats only vertically.
    • NO_REPEAT

      public static final BackgroundRepeat NO_REPEAT
      Image is not repeated.
    • SPACE

      public static final BackgroundRepeat SPACE
      Image is repeated as often as needed without clipping. Space between images.
    • ROUND

      public static final BackgroundRepeat ROUND
      Image is repeated as often as needed to fill the area, stretched if necessary.
    • UNSET

      public static final BackgroundRepeat UNSET
      Resets the property to its inherited value or initial value.
    • REVERT

      public static final BackgroundRepeat REVERT
      Rolls back to the value defined by a previous cascade origin.
    • REVERT_LAYER

      public static final BackgroundRepeat REVERT_LAYER
      Rolls back to the value defined in the previous cascade layer.
  • Method Details

    • values

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