Class WindowTitle

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public final class WindowTitle extends Widget implements Accessible, Buildable, ConstraintTarget

A helper widget for setting a window's title and subtitle.

window-title

AdwWindowTitle shows a title and subtitle. It's intended to be used as the title child of HeaderBar or HeaderBar.

CSS nodes

AdwWindowTitle has a single CSS node with name windowtitle.

  • Constructor Details

    • WindowTitle

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

      public WindowTitle(String title, String subtitle)
      Creates a new AdwWindowTitle.
      Parameters:
      title - a title
      subtitle - a subtitle
    • WindowTitle

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

    • getType

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

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

      protected WindowTitle 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 Widget
      Returns:
      the instance as if it were its parent type
    • getSubtitle

      public String getSubtitle()
      Gets the subtitle of self.
      Returns:
      the subtitle
    • getTitle

      public String getTitle()
      Gets the title of self.
      Returns:
      the title
    • setSubtitle

      public void setSubtitle(String subtitle)

      Sets the subtitle of self.

      The subtitle should give the user additional details.

      Parameters:
      subtitle - a subtitle
    • setTitle

      public void setTitle(String title)

      Sets the title of self.

      The title typically identifies the current view or content item, and generally does not use the application name.

      Parameters:
      title - a title
    • builder

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