Package de.xima.fc.css.builder
Enum ECssBackgroundRepeat
- All Implemented Interfaces:
CssDefaultValue
,Serializable
,Comparable<ECssBackgroundRepeat>
Constants with the pre-defined values for the CSS property
background-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 ConstantsEnum ConstantDescriptionThe image is not repeated (and hence the background image painting area will not necessarily be entirely covered).The image is repeated as much as needed to cover the whole background image painting area.The image is repeated along the x-axis as much as needed to cover the whole background image painting area.The image is repeated along the y-axis as much as needed to cover the whole background image painting area.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.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
Modifier and TypeMethodDescriptiontoString()
value()
static ECssBackgroundRepeat
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 Details
-
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
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
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
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
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
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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
- Overrides:
toString
in classEnum<ECssBackgroundRepeat>
-
value
- Returns:
- The string value of this property that can be used when creating CSS strings.
-