Class Leaflet.Builder<B extends Leaflet.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, Orientable.Builder<B>, BuilderInterface
Enclosing class:
Leaflet

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

      @Deprecated public B setCanNavigateBack(boolean canNavigateBack)
      Deprecated.

      Whether gestures and shortcuts for navigating backward are enabled.

      The supported gestures are:

      • One-finger swipe on touchscreens
      • Horizontal scrolling on touchpads (usually two-finger swipe)
      • Back/forward mouse buttons

      The keyboard back/forward keys are also supported, as well as the Alt+ shortcut for horizontal orientation, or Alt+ for vertical orientation.

      If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.

      Only children that have LeafletPage:navigatable set to TRUE can be navigated to.

      Parameters:
      canNavigateBack - the value for the can-navigate-back property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCanNavigateForward

      @Deprecated public B setCanNavigateForward(boolean canNavigateForward)
      Deprecated.

      Whether gestures and shortcuts for navigating forward are enabled.

      The supported gestures are:

      • One-finger swipe on touchscreens
      • Horizontal scrolling on touchpads (usually two-finger swipe)
      • Back/forward mouse buttons

      The keyboard back/forward keys are also supported, as well as the Alt+ shortcut for horizontal orientation, or Alt+ for vertical orientation.

      If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.

      Only children that have LeafletPage:navigatable set to TRUE can be navigated to.

      Parameters:
      canNavigateForward - the value for the can-navigate-forward property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCanUnfold

      @Deprecated public B setCanUnfold(boolean canUnfold)
      Deprecated.
      Whether or not the leaflet can unfold.
      Parameters:
      canUnfold - the value for the can-unfold property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setChildTransitionParams

      @Deprecated public B setChildTransitionParams(SpringParams childTransitionParams)
      Deprecated.

      The child transition spring parameters.

      The default value is equivalent to:

      adw_spring_params_new (1, 0.5, 500)
      
      Parameters:
      childTransitionParams - the value for the child-transition-params property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFoldThresholdPolicy

      @Deprecated public B setFoldThresholdPolicy(FoldThresholdPolicy foldThresholdPolicy)
      Deprecated.

      Determines when the leaflet will fold.

      If set to Adw.FoldThresholdPolicy.minimum, it will only fold when the children cannot fit anymore. With Adw.FoldThresholdPolicy.natural, it will fold as soon as children don't get their natural size.

      This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately folding.

      Parameters:
      foldThresholdPolicy - the value for the fold-threshold-policy property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHomogeneous

      @Deprecated public B setHomogeneous(boolean homogeneous)
      Deprecated.

      Whether the leaflet allocates the same size for all children when folded.

      If set to FALSE, different children can have different size along the opposite orientation.

      Parameters:
      homogeneous - the value for the homogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModeTransitionDuration

      @Deprecated public B setModeTransitionDuration(int modeTransitionDuration)
      Deprecated.
      The mode transition animation duration, in milliseconds.
      Parameters:
      modeTransitionDuration - the value for the mode-transition-duration property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTransitionType

      @Deprecated public B setTransitionType(LeafletTransitionType transitionType)
      Deprecated.

      The type of animation used for transitions between modes and children.

      The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.

      Parameters:
      transitionType - the value for the transition-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleChild

      @Deprecated public B setVisibleChild(Widget visibleChild)
      Deprecated.

      The widget currently visible when the leaflet is folded.

      The transition is determined by Leaflet:transition-type and Leaflet:child-transition-params. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

      Parameters:
      visibleChild - the value for the visible-child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleChildName

      @Deprecated public B setVisibleChildName(String visibleChildName)
      Deprecated.

      The name of the widget currently visible when the leaflet is folded.

      See Leaflet:visible-child.

      Parameters:
      visibleChildName - the value for the visible-child-name property
      Returns:
      the Builder instance is returned, to allow method chaining