Class ShortcutLabel

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class ShortcutLabel extends Widget implements Accessible, Buildable, ConstraintTarget
Deprecated.
This widget will be removed in GTK 5

GtkShortcutLabel displays a single keyboard shortcut or gesture.

The main use case for GtkShortcutLabel is inside a ShortcutsWindow.

  • Constructor Details

    • ShortcutLabel

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

      @Deprecated public ShortcutLabel(String accelerator)
      Deprecated.
      This widget will be removed in GTK 5
      Creates a new GtkShortcutLabel with accelerator set.
      Parameters:
      accelerator - the initial accelerator
    • ShortcutLabel

      public ShortcutLabel()
      Deprecated.
      Create a new ShortcutLabel.
  • Method Details

    • getType

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

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

      protected ShortcutLabel asParent()
      Deprecated.
      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
    • getAccelerator

      @Deprecated public @Nullable String getAccelerator()
      Deprecated.
      This widget will be removed in GTK 5
      Retrieves the current accelerator of self.
      Returns:
      the current accelerator.
    • getDisabledText

      @Deprecated public @Nullable String getDisabledText()
      Deprecated.
      This widget will be removed in GTK 5
      Retrieves the text that is displayed when no accelerator is set.
      Returns:
      the current text displayed when no accelerator is set.
    • setAccelerator

      @Deprecated public void setAccelerator(String accelerator)
      Deprecated.
      This widget will be removed in GTK 5
      Sets the accelerator to be displayed by self.
      Parameters:
      accelerator - the new accelerator
    • setDisabledText

      @Deprecated public void setDisabledText(String disabledText)
      Deprecated.
      This widget will be removed in GTK 5
      Sets the text to be displayed by this ShortcutLabel when no accelerator is set.
      Parameters:
      disabledText - the text to be displayed when no accelerator is set
    • builder

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