Enum Class TextDecoration

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

public enum TextDecoration extends Enum<TextDecoration>
CSS text-decoration property values for text line decorations.

The text-decoration property specifies decorative lines to be added to text. Multiple decorations can be combined in CSS.

Decoration Values:

  • underline: Line below text (links default)
  • overline: Line above text
  • line-through: Line through text (strikethrough)
  • none: No decoration

Usage:


 link.setTextDecoration(TextDecoration.NONE);
 element.setTextDecoration(TextDecoration.UNDERLINE);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • NONE

      public static final TextDecoration NONE
      No text decoration.
    • UNDERLINE

      public static final TextDecoration UNDERLINE
      Line below text.
    • OVERLINE

      public static final TextDecoration OVERLINE
      Line above text.
    • LINE_THROUGH

      public static final TextDecoration LINE_THROUGH
      Line through text (strikethrough).
    • INITIAL

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

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

    • values

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