StyleAttribute (JavaFX 27)
Description: declaration: module: jfx.incubator.richtext, package: jfx.incubator.scene.control.richtext.model, class: StyleAttribute

# Class StyleAttribute<T>

java.lang.Object
jfx.incubator.scene.control.richtext.model.StyleAttribute<T>

Type Parameters:
  `T` - the attribute value type

public abstract sealed class StyleAttribute<T> extends Object
Style Attribute provides a way to specify style in the RichTextArea.

Since:
  24
See Also:
  - `StyleAttributeMap`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <P> StyleAttribute<P>`
  `character(String name, Class<P> type)`
  Creates a character attribute.
  `static <P> StyleAttribute<P>`
  `document(String name, Class<P> type)`
  Creates a document attribute.
  `String`
  `getName()`
  Attribute name.
  `final Class<T>`
  `getType()`
  Returns the class corresponding to the attribute value.
  `static <P> StyleAttribute<P>`
  `inlineNode(String name, Class<P> type)`
  Creates an inline node character attribute.
  `boolean`
  `isCharacterAttribute()`
  Returns true if this instance is a character attribute.
  `boolean`
  `isDocumentAttribute()`
  Returns true if this instance is a document attribute.
  `boolean`
  `isInlineNode()`
  Returns true if this instance is an inline node character attribute.
  `boolean`
  `isParagraphAttribute()`
  Returns true if this instance is a paragraph attribute.
  `static <P> StyleAttribute<P>`
  `paragraph(String name, Class<P> type)`
  Creates a paragraph attribute.

  ### Methods declared in class Object

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

- ## Method Details

  - ### character

    public static <P> StyleAttribute<P> character(String name, Class<P> type)
    Creates a character attribute.
    Type Parameters:
      `P` - the attribute value type
    Parameters:
      `name` - the attribute name
      `type` - the attribute value type
    Returns:
      the new character attribute instance
    Since:
      27

  - ### document

    public static <P> StyleAttribute<P> document(String name, Class<P> type)
    Creates a document attribute.
    Type Parameters:
      `P` - the attribute value type
    Parameters:
      `name` - the attribute name
      `type` - the attribute value type
    Returns:
      the new document attribute instance
    Since:
      27

  - ### inlineNode

    public static <P> StyleAttribute<P> inlineNode(String name, Class<P> type)
    Creates an inline node character attribute.
    Type Parameters:
      `P` - the attribute value type
    Parameters:
      `name` - the attribute name
      `type` - the attribute value type
    Returns:
      the new attribute instance
    Since:
      27

  - ### paragraph

    public static <P> StyleAttribute<P> paragraph(String name, Class<P> type)
    Creates a paragraph attribute.
    Type Parameters:
      `P` - the attribute value type
    Parameters:
      `name` - the attribute name
      `type` - the attribute value type
    Returns:
      the new paragraph attribute instance
    Since:
      27

  - ### getName

    public String getName()
    Attribute name.
    Returns:
      attribute name

  - ### getType

    public final Class<T> getType()
    Returns the class corresponding to the attribute value.
    Returns:
      attribute type

  - ### isCharacterAttribute

    public boolean isCharacterAttribute()
    Returns true if this instance is a character attribute.
    Returns:
      true for a character attribute
    Since:
      27

  - ### isDocumentAttribute

    public boolean isDocumentAttribute()
    Returns true if this instance is a document attribute.
    Returns:
      true for a document attribute
    Since:
      27

  - ### isInlineNode

    public boolean isInlineNode()
    Returns true if this instance is an inline node character attribute.
    Returns:
      true for an inline node attribute
    Since:
      27

  - ### isParagraphAttribute

    public boolean isParagraphAttribute()
    Returns true if this instance is a paragraph attribute.
    Returns:
      true for a paragraph attribute