Enum Class BoxSizing

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

public enum BoxSizing extends Enum<BoxSizing>
CSS box-sizing property values for element size calculation.

The box-sizing property defines how the width and height of an element are calculated: whether they should include padding and borders.

Usage:


 element.setBoxSizing(BoxSizing.BORDER_BOX);
 element.setBoxSizing(BoxSizing.CONTENT_BOX);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • BasicBoxIntf
  • Enum Constant Details

    • CONTENT_BOX

      public static final BoxSizing CONTENT_BOX
      Width/height includes only content (default). Padding and border are added outside.
    • BORDER_BOX

      public static final BoxSizing BORDER_BOX
      Width/height includes padding and border. Content shrinks to fit.
    • INITIAL

      public static final BoxSizing INITIAL
      Sets to default value.
    • INHERIT

      public static final BoxSizing INHERIT
      Inherits from parent element.
  • Method Details

    • values

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