Class NamedAction

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class NamedAction extends ShortcutAction

Activates a named action.

See WidgetClass.installAction and Widget.insertActionGroup(String, ActionGroup) for ways to associate named actions with widgets.

  • Constructor Details

    • NamedAction

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

      public NamedAction(String name)

      Creates an action that when activated, activates the named action on the widget.

      It also passes the given arguments to it.

      See Widget.insertActionGroup(String, ActionGroup) for how to add actions to widgets.

      Parameters:
      name - the detailed name of the action
    • NamedAction

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

    • getType

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

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

      protected NamedAction 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 ShortcutAction
      Returns:
      the instance as if it were its parent type
    • getActionName

      public String getActionName()
      Returns the name of the action that will be activated.
      Returns:
      the name of the action to activate
    • builder

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