Enum Class VerticalAlign

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

public enum VerticalAlign extends Enum<VerticalAlign>
CSS vertical-align property values for vertical positioning.

The vertical-align property sets the vertical alignment of an inline, inline-block, or table-cell element relative to its line box or table cell.

Alignment Values:

  • baseline: Aligns to parent baseline (default)
  • top/bottom: Aligns to line or cell top/bottom
  • middle: Centers vertically
  • text-top/text-bottom: Aligns to parent font top/bottom
  • sub/super: Subscript/superscript positioning

Usage:


 image.setVerticalAlign(VerticalAlign.MIDDLE);
 cell.setVerticalAlign(VerticalAlign.TOP);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • TOP

      public static final VerticalAlign TOP
      Aligns to top of line box or cell.
    • MIDDLE

      public static final VerticalAlign MIDDLE
      Centers vertically in line box or cell.
    • BOTTOM

      public static final VerticalAlign BOTTOM
      Aligns to bottom of line box or cell.
    • BASELINE

      public static final VerticalAlign BASELINE
      Aligns to parent element baseline (default).
    • SUB

      public static final VerticalAlign SUB
      Subscript positioning.
    • SUPER

      public static final VerticalAlign SUPER
      Superscript positioning.
    • TEXT_TOP

      public static final VerticalAlign TEXT_TOP
      Aligns to top of parent font.
    • TEXT_BOTTOM

      public static final VerticalAlign TEXT_BOTTOM
      Aligns to bottom of parent font.
    • INHERIT

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

    • values

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