Class Revealer

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

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

Animates the transition of its child from invisible to visible.

The style of transition can be controlled with setTransitionType(RevealerTransitionType).

These animations respect the Gtk.Settings:gtk-enable-animations setting.

CSS nodes

GtkRevealer has a single CSS node with name revealer. When styling GtkRevealer using CSS, remember that it only hides its contents, not itself. That means applied margin, padding and borders will be visible even when the Gtk.Revealer:reveal-child property is set to false.

Accessibility

GtkRevealer uses the Gtk.AccessibleRole.group role.

The child of GtkRevealer, if set, is always available in the accessibility tree, regardless of the state of the revealer widget.

  • Constructor Details

    • Revealer

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

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

    • getType

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

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

      protected Revealer 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
    • getChild

      public @Nullable Widget getChild()
      Gets the child widget of revealer.
      Returns:
      the child widget of this Revealer
    • getChildRevealed

      public boolean getChildRevealed()

      Returns whether the child is fully revealed.

      In other words, this returns whether the transition to the revealed state is completed.

      Returns:
      true if the child is fully revealed
    • getRevealChild

      public boolean getRevealChild()

      Returns whether the child is currently revealed.

      This function returns true as soon as the transition is to the revealed state is started. To learn whether the child is fully revealed (ie the transition is completed), use getChildRevealed().

      Returns:
      true if the child is revealed.
    • getTransitionDuration

      public int getTransitionDuration()
      Returns the amount of time (in milliseconds) that transitions will take.
      Returns:
      the transition duration
    • getTransitionType

      public RevealerTransitionType getTransitionType()
      Gets the type of animation that will be used for transitions in revealer.
      Returns:
      the current transition type of this Revealer
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of revealer.
      Parameters:
      child - the child widget
    • setRevealChild

      public void setRevealChild(boolean revealChild)

      Tells the GtkRevealer to reveal or conceal its child.

      The transition will be animated with the current transition type of revealer.

      Parameters:
      revealChild - true to reveal the child
    • setTransitionDuration

      public void setTransitionDuration(int duration)
      Sets the duration that transitions will take.
      Parameters:
      duration - the new duration, in milliseconds
    • setTransitionType

      public void setTransitionType(RevealerTransitionType transition)

      Sets the type of animation that will be used for transitions in revealer.

      Available types include various kinds of fades and slides.

      Parameters:
      transition - the new transition type
    • builder

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