CSS.Attribute (Java SE 11 & JDK 11 )
Keywords: javax.swing.text.html.CSS.Attribute class

Module java.desktop
Package javax.swing.text.html

## Class CSS.Attribute

- java.lang.Object
- - javax.swing.text.html.CSS.Attribute

- Enclosing class:
    CSS

      public static final class CSS.Attribute
      extends Object

  Definitions to be used as a key on AttributeSet's that might hold CSS attributes. Since this is a closed set (i.e. defined exactly by the specification), it is final and cannot be extended.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static CSS.Attribute` | `BACKGROUND` | CSS attribute "background".
    `static CSS.Attribute` | `BACKGROUND_ATTACHMENT` | CSS attribute "background-attachment".
    `static CSS.Attribute` | `BACKGROUND_COLOR` | CSS attribute "background-color".
    `static CSS.Attribute` | `BACKGROUND_IMAGE` | CSS attribute "background-image".
    `static CSS.Attribute` | `BACKGROUND_POSITION` | CSS attribute "background-position".
    `static CSS.Attribute` | `BACKGROUND_REPEAT` | CSS attribute "background-repeat".
    `static CSS.Attribute` | `BORDER` | CSS attribute "border".
    `static CSS.Attribute` | `BORDER_BOTTOM` | CSS attribute "border-bottom".
    `static CSS.Attribute` | `BORDER_BOTTOM_COLOR` | CSS attribute "border-bottom-color".
    `static CSS.Attribute` | `BORDER_BOTTOM_STYLE` | CSS attribute "border-bottom-style".
    `static CSS.Attribute` | `BORDER_BOTTOM_WIDTH` | CSS attribute "border-bottom-width".
    `static CSS.Attribute` | `BORDER_COLOR` | CSS attribute "border-color".
    `static CSS.Attribute` | `BORDER_LEFT` | CSS attribute "border-left".
    `static CSS.Attribute` | `BORDER_LEFT_COLOR` | CSS attribute "margin-right".
    `static CSS.Attribute` | `BORDER_LEFT_STYLE` | CSS attribute "border-left-style".
    `static CSS.Attribute` | `BORDER_LEFT_WIDTH` | CSS attribute "border-left-width".
    `static CSS.Attribute` | `BORDER_RIGHT` | CSS attribute "border-right".
    `static CSS.Attribute` | `BORDER_RIGHT_COLOR` | CSS attribute "border-right-color".
    `static CSS.Attribute` | `BORDER_RIGHT_STYLE` | CSS attribute "border-right-style".
    `static CSS.Attribute` | `BORDER_RIGHT_WIDTH` | CSS attribute "border-right-width".
    `static CSS.Attribute` | `BORDER_STYLE` | CSS attribute "border-style".
    `static CSS.Attribute` | `BORDER_TOP` | CSS attribute "border-top".
    `static CSS.Attribute` | `BORDER_TOP_COLOR` | CSS attribute "border-top-color".
    `static CSS.Attribute` | `BORDER_TOP_STYLE` | CSS attribute "border-top-style".
    `static CSS.Attribute` | `BORDER_TOP_WIDTH` | CSS attribute "border-top-width".
    `static CSS.Attribute` | `BORDER_WIDTH` | CSS attribute "border-width".
    `static CSS.Attribute` | `CLEAR` | CSS attribute "clear".
    `static CSS.Attribute` | `COLOR` | CSS attribute "color".
    `static CSS.Attribute` | `DISPLAY` | CSS attribute "display".
    `static CSS.Attribute` | `FLOAT` | CSS attribute "float".
    `static CSS.Attribute` | `FONT` | CSS attribute "font".
    `static CSS.Attribute` | `FONT_FAMILY` | CSS attribute "font-family".
    `static CSS.Attribute` | `FONT_SIZE` | CSS attribute "font-size".
    `static CSS.Attribute` | `FONT_STYLE` | CSS attribute "font-style".
    `static CSS.Attribute` | `FONT_VARIANT` | CSS attribute "font-variant".
    `static CSS.Attribute` | `FONT_WEIGHT` | CSS attribute "font-weight".
    `static CSS.Attribute` | `HEIGHT` | CSS attribute "height".
    `static CSS.Attribute` | `LETTER_SPACING` | CSS attribute "letter-spacing".
    `static CSS.Attribute` | `LINE_HEIGHT` | CSS attribute "line-height".
    `static CSS.Attribute` | `LIST_STYLE` | CSS attribute "list-style".
    `static CSS.Attribute` | `LIST_STYLE_IMAGE` | CSS attribute "list-style-image".
    `static CSS.Attribute` | `LIST_STYLE_POSITION` | CSS attribute "list-style-position".
    `static CSS.Attribute` | `LIST_STYLE_TYPE` | CSS attribute "list-style-type".
    `static CSS.Attribute` | `MARGIN` | CSS attribute "margin".
    `static CSS.Attribute` | `MARGIN_BOTTOM` | CSS attribute "margin-bottom".
    `static CSS.Attribute` | `MARGIN_LEFT` | CSS attribute "margin-left".
    `static CSS.Attribute` | `MARGIN_RIGHT` | CSS attribute "margin-right".
    `static CSS.Attribute` | `MARGIN_TOP` | CSS attribute "margin-top".
    `static CSS.Attribute` | `PADDING` | CSS attribute "padding".
    `static CSS.Attribute` | `PADDING_BOTTOM` | CSS attribute "padding-bottom".
    `static CSS.Attribute` | `PADDING_LEFT` | CSS attribute "padding-left".
    `static CSS.Attribute` | `PADDING_RIGHT` | CSS attribute "padding-right".
    `static CSS.Attribute` | `PADDING_TOP` | CSS attribute "padding-top".
    `static CSS.Attribute` | `TEXT_ALIGN` | CSS attribute "text-align".
    `static CSS.Attribute` | `TEXT_DECORATION` | CSS attribute "text-decoration".
    `static CSS.Attribute` | `TEXT_INDENT` | CSS attribute "text-indent".
    `static CSS.Attribute` | `TEXT_TRANSFORM` | CSS attribute "text-transform".
    `static CSS.Attribute` | `VERTICAL_ALIGN` | CSS attribute "vertical-align".
    `static CSS.Attribute` | `WHITE_SPACE` | CSS attribute "white-space".
    `static CSS.Attribute` | `WIDTH` | CSS attribute "width".
    `static CSS.Attribute` | `WORD_SPACING` | CSS attribute "word-spacing".

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getDefaultValue()` | Fetch the default value for the attribute.
    `boolean` | `isInherited()` | Indicates if the attribute should be inherited from the parent or not.
    `String` | `toString()` | The string representation of the attribute.

    - ### Methods declared in class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BACKGROUND

          public static final CSS.Attribute BACKGROUND

      CSS attribute "background".

    - #### BACKGROUND_ATTACHMENT

          public static final CSS.Attribute BACKGROUND_ATTACHMENT

      CSS attribute "background-attachment".

    - #### BACKGROUND_COLOR

          public static final CSS.Attribute BACKGROUND_COLOR

      CSS attribute "background-color".

    - #### BACKGROUND_IMAGE

          public static final CSS.Attribute BACKGROUND_IMAGE

      CSS attribute "background-image".

    - #### BACKGROUND_POSITION

          public static final CSS.Attribute BACKGROUND_POSITION

      CSS attribute "background-position".

    - #### BACKGROUND_REPEAT

          public static final CSS.Attribute BACKGROUND_REPEAT

      CSS attribute "background-repeat".

    - #### BORDER

          public static final CSS.Attribute BORDER

      CSS attribute "border".

    - #### BORDER_BOTTOM

          public static final CSS.Attribute BORDER_BOTTOM

      CSS attribute "border-bottom".

    - #### BORDER_BOTTOM_COLOR

          public static final CSS.Attribute BORDER_BOTTOM_COLOR

      CSS attribute "border-bottom-color".

    - #### BORDER_BOTTOM_STYLE

          public static final CSS.Attribute BORDER_BOTTOM_STYLE

      CSS attribute "border-bottom-style".

    - #### BORDER_BOTTOM_WIDTH

          public static final CSS.Attribute BORDER_BOTTOM_WIDTH

      CSS attribute "border-bottom-width".

    - #### BORDER_COLOR

          public static final CSS.Attribute BORDER_COLOR

      CSS attribute "border-color".

    - #### BORDER_LEFT

          public static final CSS.Attribute BORDER_LEFT

      CSS attribute "border-left".

    - #### BORDER_LEFT_COLOR

          public static final CSS.Attribute BORDER_LEFT_COLOR

      CSS attribute "margin-right".

    - #### BORDER_LEFT_STYLE

          public static final CSS.Attribute BORDER_LEFT_STYLE

      CSS attribute "border-left-style".

    - #### BORDER_LEFT_WIDTH

          public static final CSS.Attribute BORDER_LEFT_WIDTH

      CSS attribute "border-left-width".

    - #### BORDER_RIGHT

          public static final CSS.Attribute BORDER_RIGHT

      CSS attribute "border-right".

    - #### BORDER_RIGHT_COLOR

          public static final CSS.Attribute BORDER_RIGHT_COLOR

      CSS attribute "border-right-color".

    - #### BORDER_RIGHT_STYLE

          public static final CSS.Attribute BORDER_RIGHT_STYLE

      CSS attribute "border-right-style".

    - #### BORDER_RIGHT_WIDTH

          public static final CSS.Attribute BORDER_RIGHT_WIDTH

      CSS attribute "border-right-width".

    - #### BORDER_STYLE

          public static final CSS.Attribute BORDER_STYLE

      CSS attribute "border-style".

    - #### BORDER_TOP

          public static final CSS.Attribute BORDER_TOP

      CSS attribute "border-top".

    - #### BORDER_TOP_COLOR

          public static final CSS.Attribute BORDER_TOP_COLOR

      CSS attribute "border-top-color".

    - #### BORDER_TOP_STYLE

          public static final CSS.Attribute BORDER_TOP_STYLE

      CSS attribute "border-top-style".

    - #### BORDER_TOP_WIDTH

          public static final CSS.Attribute BORDER_TOP_WIDTH

      CSS attribute "border-top-width".

    - #### BORDER_WIDTH

          public static final CSS.Attribute BORDER_WIDTH

      CSS attribute "border-width".

    - #### CLEAR

          public static final CSS.Attribute CLEAR

      CSS attribute "clear".

    - #### COLOR

          public static final CSS.Attribute COLOR

      CSS attribute "color".

    - #### DISPLAY

          public static final CSS.Attribute DISPLAY

      CSS attribute "display".

    - #### FLOAT

          public static final CSS.Attribute FLOAT

      CSS attribute "float".

    - #### FONT

          public static final CSS.Attribute FONT

      CSS attribute "font".

    - #### FONT_FAMILY

          public static final CSS.Attribute FONT_FAMILY

      CSS attribute "font-family".

    - #### FONT_SIZE

          public static final CSS.Attribute FONT_SIZE

      CSS attribute "font-size".

    - #### FONT_STYLE

          public static final CSS.Attribute FONT_STYLE

      CSS attribute "font-style".

    - #### FONT_VARIANT

          public static final CSS.Attribute FONT_VARIANT

      CSS attribute "font-variant".

    - #### FONT_WEIGHT

          public static final CSS.Attribute FONT_WEIGHT

      CSS attribute "font-weight".

    - #### HEIGHT

          public static final CSS.Attribute HEIGHT

      CSS attribute "height".

    - #### LETTER_SPACING

          public static final CSS.Attribute LETTER_SPACING

      CSS attribute "letter-spacing".

    - #### LINE_HEIGHT

          public static final CSS.Attribute LINE_HEIGHT

      CSS attribute "line-height".

    - #### LIST_STYLE

          public static final CSS.Attribute LIST_STYLE

      CSS attribute "list-style".

    - #### LIST_STYLE_IMAGE

          public static final CSS.Attribute LIST_STYLE_IMAGE

      CSS attribute "list-style-image".

    - #### LIST_STYLE_POSITION

          public static final CSS.Attribute LIST_STYLE_POSITION

      CSS attribute "list-style-position".

    - #### LIST_STYLE_TYPE

          public static final CSS.Attribute LIST_STYLE_TYPE

      CSS attribute "list-style-type".

    - #### MARGIN

          public static final CSS.Attribute MARGIN

      CSS attribute "margin".

    - #### MARGIN_BOTTOM

          public static final CSS.Attribute MARGIN_BOTTOM

      CSS attribute "margin-bottom".

    - #### MARGIN_LEFT

          public static final CSS.Attribute MARGIN_LEFT

      CSS attribute "margin-left".

    - #### MARGIN_RIGHT

          public static final CSS.Attribute MARGIN_RIGHT

      CSS attribute "margin-right".

    - #### MARGIN_TOP

          public static final CSS.Attribute MARGIN_TOP

      CSS attribute "margin-top".

    - #### PADDING

          public static final CSS.Attribute PADDING

      CSS attribute "padding".

    - #### PADDING_BOTTOM

          public static final CSS.Attribute PADDING_BOTTOM

      CSS attribute "padding-bottom".

    - #### PADDING_LEFT

          public static final CSS.Attribute PADDING_LEFT

      CSS attribute "padding-left".

    - #### PADDING_RIGHT

          public static final CSS.Attribute PADDING_RIGHT

      CSS attribute "padding-right".

    - #### PADDING_TOP

          public static final CSS.Attribute PADDING_TOP

      CSS attribute "padding-top".

    - #### TEXT_ALIGN

          public static final CSS.Attribute TEXT_ALIGN

      CSS attribute "text-align".

    - #### TEXT_DECORATION

          public static final CSS.Attribute TEXT_DECORATION

      CSS attribute "text-decoration".

    - #### TEXT_INDENT

          public static final CSS.Attribute TEXT_INDENT

      CSS attribute "text-indent".

    - #### TEXT_TRANSFORM

          public static final CSS.Attribute TEXT_TRANSFORM

      CSS attribute "text-transform".

    - #### VERTICAL_ALIGN

          public static final CSS.Attribute VERTICAL_ALIGN

      CSS attribute "vertical-align".

    - #### WORD_SPACING

          public static final CSS.Attribute WORD_SPACING

      CSS attribute "word-spacing".

    - #### WHITE_SPACE

          public static final CSS.Attribute WHITE_SPACE

      CSS attribute "white-space".

    - #### WIDTH

          public static final CSS.Attribute WIDTH

      CSS attribute "width".

  - ### Method Detail

    - #### toString

          public String toString()

      The string representation of the attribute. This should exactly match the string specified in the CSS specification.
      Overrides:
        `toString` in class `Object`
      Returns:
        a string representation of the object.

    - #### getDefaultValue

          public String getDefaultValue()

      Fetch the default value for the attribute. If there is no default value (such as for composite attributes), null will be returned.
      Returns:
        default value for the attribute

    - #### isInherited

          public boolean isInherited()

      Indicates if the attribute should be inherited from the parent or not.
      Returns:
        true if the attribute should be inherited from the parent