Class Completion.Builder<B extends Completion.Builder<B>>

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

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

      public B setPageSize(int pageSize)
      The number of rows to display to the user before scrolling.
      Parameters:
      pageSize - the value for the page-size property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRememberInfoVisibility

      public B setRememberInfoVisibility(boolean rememberInfoVisibility)
      Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.
      Parameters:
      rememberInfoVisibility - the value for the remember-info-visibility property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSelectOnShow

      public B setSelectOnShow(boolean selectOnShow)
      Determines whether the first proposal should be selected when the completion is first shown.
      Parameters:
      selectOnShow - the value for the select-on-show property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowIcons

      public B setShowIcons(boolean showIcons)
      The "show-icons" property denotes if icons should be displayed within the list of completions presented to the user.
      Parameters:
      showIcons - the value for the show-icons property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setView

      public B setView(View view)
      The "view" property is the GtkTextView for which this GtkSourceCompletion is providing completion features.
      Parameters:
      view - the value for the view property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onHide

      public B onHide(Completion.HideCallback handler)
      The "hide" signal is emitted when the completion window should be hidden.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onProviderAdded

      public B onProviderAdded(Completion.ProviderAddedCallback handler)
      The "provided-added" signal is emitted when a new provider is added to the completion.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onProviderRemoved

      public B onProviderRemoved(Completion.ProviderRemovedCallback handler)
      The "provided-removed" signal is emitted when a provider has been removed from the completion.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onShow

      public B onShow(Completion.ShowCallback handler)
      The "show" signal is emitted when the completion window should be shown.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: