Enum Class AlignItems

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

public enum AlignItems extends Enum<AlignItems>
CSS align-items property values for flexbox item cross-axis alignment.

The align-items property specifies the default alignment for items inside a flex container. It aligns items on the cross-axis (perpendicular to the main axis).

Usage:


 container.setAlignItems(AlignItems.CENTER);
 container.setAlignItems(AlignItems.FLEX_START);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • STRETCH

      public static final AlignItems STRETCH
      Items stretch to fill the container (default).
    • CENTER

      public static final AlignItems CENTER
      Items are centered on the cross-axis.
    • FLEX_START

      public static final AlignItems FLEX_START
      Items are aligned at the start of the cross-axis.
    • FLEX_END

      public static final AlignItems FLEX_END
      Items are aligned at the end of the cross-axis.
    • BASELINE

      public static final AlignItems BASELINE
      Items are aligned at their baselines.
    • START

      public static final AlignItems START
      Items packed to the start (writing-mode aware).
    • END

      public static final AlignItems END
      Items packed to the end (writing-mode aware).
    • SELF_START

      public static final AlignItems SELF_START
      Items aligned to their start edge.
    • SELF_END

      public static final AlignItems SELF_END
      Items aligned to their end edge.
    • NORMAL

      public static final AlignItems NORMAL
      Normal alignment behavior (context-dependent).
    • FIRST_BASELINE

      public static final AlignItems FIRST_BASELINE
      Items are aligned at the first baseline.
    • LAST_BASELINE

      public static final AlignItems LAST_BASELINE
      Items are aligned at the last baseline.
    • INITIAL

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

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

    • values

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