Class Squeezer.Builder<B extends Squeezer.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:
Squeezer

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

      @Deprecated public B setAllowNone(boolean allowNone)
      Deprecated.

      Whether to allow squeezing beyond the last child's minimum size.

      If set to TRUE, the squeezer can shrink to the point where no child can be shown. This is functionally equivalent to appending a widget with 0×0 minimum size.

      Parameters:
      allowNone - the value for the allow-none property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHomogeneous

      @Deprecated public B setHomogeneous(boolean homogeneous)
      Deprecated.

      Whether all children have the same size for the opposite orientation.

      For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible.

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

      @Deprecated public B setInterpolateSize(boolean interpolateSize)
      Deprecated.

      Whether the squeezer interpolates its size when changing the visible child.

      If TRUE, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height.

      Parameters:
      interpolateSize - the value for the interpolate-size property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSwitchThresholdPolicy

      @Deprecated public B setSwitchThresholdPolicy(FoldThresholdPolicy switchThresholdPolicy)
      Deprecated.

      The switch threshold policy.

      Determines when the squeezer will switch children.

      If set to Adw.FoldThresholdPolicy.minimum, it will only switch when the visible child cannot fit anymore. With Adw.FoldThresholdPolicy.natural, it will switch as soon as the visible child doesn'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 switching.

      Parameters:
      switchThresholdPolicy - the value for the switch-threshold-policy property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTransitionDuration

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

      @Deprecated public B setTransitionType(SqueezerTransitionType transitionType)
      Deprecated.
      The type of animation used for transitions between children.
      Parameters:
      transitionType - the value for the transition-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setXalign

      @Deprecated public B setXalign(float xalign)
      Deprecated.

      The horizontal alignment, from 0 (start) to 1 (end).

      This affects the children allocation during transitions, when they exceed the size of the squeezer.

      For example, 0.5 means the child will be centered, 0 means it will keep the start side aligned and overflow the end side, and 1 means the opposite.

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

      @Deprecated public B setYalign(float yalign)
      Deprecated.

      The vertical alignment, from 0 (top) to 1 (bottom).

      This affects the children allocation during transitions, when they exceed the size of the squeezer.

      For example, 0.5 means the child will be centered, 0 means it will keep the top side aligned and overflow the bottom side, and 1 means the opposite.

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