Class Annotation

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Annotation extends GObject

Represents an annotation added to View, it has a Annotation:line property, Annotation:description, icon and a style.

It will be displayed always at the end of a line.

If the style is GTK_SOURCE_ANNOTATION_STYLE_NONE it will use the same color as SpaceDrawer.

Since:
5.18
  • Constructor Details

    • Annotation

      public Annotation(MemorySegment address)
      Create a Annotation instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Annotation

      public Annotation(@Nullable String description, @Nullable Icon icon, int line, AnnotationStyle style)
    • Annotation

      public Annotation()
      Create a new Annotation.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Annotation class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Annotation asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getDescription

      public String getDescription()
    • getIcon

      public @Nullable Icon getIcon()
    • getLine

      public int getLine()
    • getStyle

      public AnnotationStyle getStyle()
    • builder

      public static Annotation.Builder<? extends Annotation.Builder> builder()
      A Annotation.Builder object constructs a Annotation with the specified properties. Use the various set...() methods to set properties, and finish construction with Annotation.Builder.build().
      Returns:
      the builder object