Package de.xima.fc.css.builder
Enum ECssBoxSizing
- java.lang.Object
-
- java.lang.Enum<ECssBoxSizing>
-
- de.xima.fc.css.builder.ECssBoxSizing
-
- All Implemented Interfaces:
CssDefaultValue
,Serializable
,Comparable<ECssBoxSizing>
public enum ECssBoxSizing extends Enum<ECssBoxSizing> implements CssDefaultValue
Constants with the pre-defined values for the CSS propertybox-sizing
.The box-sizing CSS property sets how the total width and height of an element is calculated.
- Author:
- XIMA MEDIA GmbH
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BORDER_BOX
This is the initial and default value as specified by the CSS standard.CONTENT_BOX
The width and height properties include the content, padding, and border, but do not include the margin.
-
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 ECssBoxSizing
valueOf(String name)
Returns the enum constant of this type with the specified name.static ECssBoxSizing[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BORDER_BOX
public static final ECssBoxSizing BORDER_BOX
This is the initial and default value as specified by the CSS standard. The width and height properties include the content, but does not include the padding, border, or margin. For example,.box {width: 350px; border: 10px solid black;}
renders a box that is 370px wide.Here, the dimensions of the element are calculated as: width = width of the content, and height = height of the content. (Borders and padding are not included in the calculation.)
-
CONTENT_BOX
public static final ECssBoxSizing CONTENT_BOX
The width and height properties include the content, padding, and border, but do not include the margin. Note that padding and border will be inside of the box. For example,.box {width: 350px; border: 10px solid black;}
renders a box that is 350px wide, with the area for content being 330px wide. The content box can't be negative and is floored to 0, making it impossible to use border-box to make the element disappear.Here the dimensions of the element are calculated as: width = border + padding + width of the content, and height = border + padding + height of the content.
-
-
Method Detail
-
values
public static ECssBoxSizing[] 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 (ECssBoxSizing c : ECssBoxSizing.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECssBoxSizing 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
-
value
public String value()
- Returns:
- The string value of this property that can be used when creating CSS strings.
-
toString
public String toString()
- Overrides:
toString
in classEnum<ECssBoxSizing>
-
-