Package de.xima.fc.css.builder
Enum ECssBackgroundRepeat
- java.lang.Object
-
- java.lang.Enum<ECssBackgroundRepeat>
-
- de.xima.fc.css.builder.ECssBackgroundRepeat
-
- All Implemented Interfaces:
CssDefaultValue
,Serializable
,Comparable<ECssBackgroundRepeat>
public enum ECssBackgroundRepeat extends Enum<ECssBackgroundRepeat> implements CssDefaultValue
Constants with the pre-defined values for the CSS propertybackground-repeat
.The background-repeat CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all.
- Author:
- XIMA MEDIA GmbH
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_REPEAT
The image is not repeated (and hence the background image painting area will not necessarily be entirely covered).REPEAT
The image is repeated as much as needed to cover the whole background image painting area.REPEAT_X
The image is repeated along the x-axis as much as needed to cover the whole background image painting area.REPEAT_Y
The image is repeated along the y-axis as much as needed to cover the whole background image painting area.ROUND
As the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room (space left >= half of the image width) for another one to be added.SPACE
The image is repeated as much as possible without clipping.
-
Field Summary
-
Fields inherited from interface de.xima.fc.css.builder.CssDefaultValue
INHERIT, INITIAL, REVERT, REVERT_LAYER, UNSET
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
String
value()
static ECssBackgroundRepeat
valueOf(String name)
Returns the enum constant of this type with the specified name.static ECssBackgroundRepeat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_REPEAT
public static final ECssBackgroundRepeat NO_REPEAT
The image is not repeated (and hence the background image painting area will not necessarily be entirely covered). The position of the non-repeated background image is defined by the background-position CSS property.
-
REPEAT
public static final ECssBackgroundRepeat REPEAT
The image is repeated as much as needed to cover the whole background image painting area. The last image will be clipped if it doesn't fit.
-
REPEAT_X
public static final ECssBackgroundRepeat REPEAT_X
The image is repeated along the x-axis as much as needed to cover the whole background image painting area. The last image will be clipped if it doesn't fit.
-
REPEAT_Y
public static final ECssBackgroundRepeat REPEAT_Y
The image is repeated along the y-axis as much as needed to cover the whole background image painting area. The last image will be clipped if it doesn't fit.
-
ROUND
public static final ECssBackgroundRepeat ROUND
As the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room (space left >= half of the image width) for another one to be added. When the next image is added, all of the current ones compress to allow room. Example: An image with an original width of 260px, repeated three times, might stretch until each repetition is 300px wide, and then another image will be added. They will then compress to 225px.
-
SPACE
public static final ECssBackgroundRepeat SPACE
The image is repeated as much as possible without clipping. The first and last images are pinned to either side of the element, and whitespace is distributed evenly between the images. Thebackground-position
property is ignored unless only one image can be displayed without clipping. The only case where clipping happens using space is when there isn't enough room to display one image.
-
-
Method Detail
-
values
public static ECssBackgroundRepeat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ECssBackgroundRepeat c : ECssBackgroundRepeat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECssBackgroundRepeat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<ECssBackgroundRepeat>
-
value
public String value()
- Returns:
- The string value of this property that can be used when creating CSS strings.
-
-