Class Separator

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Orientable, Proxy

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

Draws a horizontal or vertical line to separate other widgets.

An example GtkSeparator

A GtkSeparator can be used to group the widgets within a window. It displays a line with a shadow to make it appear sunken into the interface.

CSS nodes

GtkSeparator has a single CSS node with name separator. The node gets one of the .horizontal or .vertical style classes.

Accessibility

GtkSeparator uses the Gtk.AccessibleRole.separator role.

  • Constructor Details

    • Separator

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

      public Separator(Orientation orientation)
      Creates a new GtkSeparator with the given orientation.
      Parameters:
      orientation - the separator’s orientation.
    • Separator

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

    • getType

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

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

      protected Separator 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
    • builder

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