Class AutomationSession.Builder<B extends AutomationSession.Builder<B>>

java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.webkitgtk.AutomationSession.Builder<B>
Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
AutomationSession

public static class AutomationSession.Builder<B extends AutomationSession.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.18
  • Constructor Details

    • Builder

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

    • build

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

      public B setId(String id)
      The session unique identifier.
      Parameters:
      id - the value for the id property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.18
    • onCreateWebView

      public B onCreateWebView(@Nullable String detail, AutomationSession.CreateWebViewCallback handler)

      This signal is emitted when the automation client requests a new browsing context to interact with it. The callback handler should return a WebKitWebView created with WebKitWebView:is-controlled-by-automation construct property enabled and WebKitWebView:automation-presentation-type construct property set if needed.

      If the signal is emitted with "tab" detail, the returned WebKitWebView should be a new web view added to a new tab of the current browsing context window. If the signal is emitted with "window" detail, the returned WebKitWebView should be a new web view added to a new window. When creating a new web view and there's an active browsing context, the new window or tab shouldn't be focused.

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

      public B onWillClose(AutomationSession.WillCloseCallback handler)
      This signal is emitted when the given automation session is about to finish. It allows clients to perform any cleanup tasks before the session is destroyed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.46
      See Also: