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:
  • 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
    • 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
    • isParagraphAttribute

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