Class ViewStackPage

All Implemented Interfaces:
Accessible, Proxy

@Generated("org.javagi.JavaGI") public final class ViewStackPage extends GObject implements Accessible
An auxiliary class used by ViewStack.
  • Constructor Details

    • ViewStackPage

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

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

    • getType

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

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

      protected ViewStackPage 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
    • getBadgeNumber

      public int getBadgeNumber()
      Gets the badge number for this page.
      Returns:
      the badge number for this page
    • getChild

      public Widget getChild()
      Gets the stack child to which this ViewStackPage belongs.
      Returns:
      the child to which this ViewStackPage belongs
    • getIconName

      public @Nullable String getIconName()
      Gets the icon name of the page.
      Returns:
      the icon name of the page
    • getName

      public @Nullable String getName()
      Gets the name of the page.
      Returns:
      the name of the page
    • getNeedsAttention

      public boolean getNeedsAttention()
      Gets whether the page requires the user attention.
      Returns:
      whether the page needs attention
    • getSectionTitle

      public @Nullable String getSectionTitle()
      Gets the section title for self.
      Returns:
      the section title
      Since:
      1.9
    • getStartsSection

      public boolean getStartsSection()
      Gets whether this ViewStackPage starts a section.
      Returns:
      whether this ViewStackPage starts a section
      Since:
      1.9
    • getTitle

      public @Nullable String getTitle()
      Gets the page title.
      Returns:
      the page title
    • getUseUnderline

      public boolean getUseUnderline()
      Gets whether underlines in the page title indicate mnemonics.
      Returns:
      whether underlines in the page title indicate mnemonics
    • getVisible

      public boolean getVisible()

      Gets whether this ViewStackPage is visible in its AdwViewStack.

      This is independent from the Gtk.Widget:visible property of its widget.

      Returns:
      whether this ViewStackPage is visible
    • setBadgeNumber

      public void setBadgeNumber(int badgeNumber)

      Sets the badge number for this page.

      ViewSwitcher can display it as a badge next to the page icon. It is commonly used to display a number of unread items within the page.

      It can be used together with ViewStack{age}:needs-attention.

      Parameters:
      badgeNumber - the new value to set
    • setIconName

      public void setIconName(@Nullable String iconName)
      Sets the icon name of the page.
      Parameters:
      iconName - the icon name
    • setName

      public void setName(@Nullable String name)
      Sets the name of the page.
      Parameters:
      name - the page name
    • setNeedsAttention

      public void setNeedsAttention(boolean needsAttention)

      Sets whether the page requires the user attention.

      ViewSwitcher will display it as a dot next to the page icon.

      Parameters:
      needsAttention - the new value to set
    • setSectionTitle

      public void setSectionTitle(@Nullable String sectionTitle)

      Sets the section title for self.

      Does nothing unless ViewStackPage:starts-section is set.

      Parameters:
      sectionTitle - the section title
      Since:
      1.9
    • setStartsSection

      public void setStartsSection(boolean startsSection)

      Sets whether this ViewStackPage starts a section.

      If set to TRUE, ViewStack:pages will have a section starting from this page.

      If ViewStackPage:section-title is set, it should be used as a title for the section.

      Parameters:
      startsSection - whether this ViewStackPage starts a section
      Since:
      1.9
    • setTitle

      public void setTitle(@Nullable String title)
      Sets the page title.
      Parameters:
      title - the page title
    • setUseUnderline

      public void setUseUnderline(boolean useUnderline)
      Sets whether underlines in the page title indicate mnemonics.
      Parameters:
      useUnderline - the new value to set
    • setVisible

      public void setVisible(boolean visible)

      Sets whether this ViewStackPage is visible in its AdwViewStack.

      This is independent from the Gtk.Widget:visible property of ViewStackPage:child.

      Parameters:
      visible - whether this ViewStackPage is visible
    • builder

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