Enum Class Clear

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

public enum Clear extends Enum<Clear>
CSS clear property values for controlling element positioning around floats.

The clear property specifies on which sides of an element floating elements are not allowed to float. It controls whether an element should be moved below any preceding floating elements.

Common Use Cases:

  • Preventing text from wrapping around floated images
  • Creating section breaks after floated content
  • Ensuring footer appears below all floated columns

Usage:


 element.setClear(Clear.BOTH);
 element.setClear(Clear.LEFT);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INHERIT

      public static final Clear INHERIT
      Inherits from parent element.
    • INITIAL

      public static final Clear INITIAL
      Sets to default value.
    • NONE

      public static final Clear NONE
      Allows floats on both sides (default).
    • LEFT

      public static final Clear LEFT
      Clears left-floating elements.
    • BOTH

      public static final Clear BOTH
      Clears both left and right floats.
  • Method Details

    • values

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