Class EventControllerFocus.Builder<B extends EventControllerFocus.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
EventControllerFocus

public static class EventControllerFocus.Builder<B extends EventControllerFocus.Builder<B>> extends EventController.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public EventControllerFocus build()
      Finish building the EventControllerFocus object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to EventControllerFocus.
      Overrides:
      build in class EventController.Builder<B extends EventControllerFocus.Builder<B>>
      Returns:
      a new instance of EventControllerFocus with the properties that were set in the Builder object.
    • onEnter

      public B onEnter(EventControllerFocus.EnterCallback handler)

      Emitted whenever the focus enters into the widget or one of its descendents.

      Note that this means you may not get an ::enter signal even though the widget becomes the focus location, in certain cases (such as when the focus moves from a descendent of the widget to the widget itself). If you are interested in these cases, you can monitor the Gtk.EventControllerFocus:is-focus property for changes.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onLeave

      public B onLeave(EventControllerFocus.LeaveCallback handler)

      Emitted whenever the focus leaves the widget hierarchy that is rooted at the widget that the controller is attached to.

      Note that this means you may not get a ::leave signal even though the focus moves away from the widget, in certain cases (such as when the focus moves from the widget to a descendent). If you are interested in these cases, you can monitor the Gtk.EventControllerFocus:is-focus property for changes.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: