Class Squeezer

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Orientable, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public final class Squeezer extends Widget implements Accessible, Buildable, ConstraintTarget, Orientable
Deprecated.

A best fit container.

squeezer-wide squeezer-narrow

The AdwSqueezer widget is a container which only shows the first of its children that fits in the available size. It is convenient to offer different widgets to represent the same data with different levels of detail, making the widget seem to squeeze itself to fit in the available space.

Transitions between children can be animated as fades. This can be controlled with Squeezer:transition-type.

CSS nodes

AdwSqueezer has a single CSS node with name squeezer.

  • Constructor Details

    • Squeezer

      public Squeezer(MemorySegment address)
      Deprecated.
      Create a Squeezer instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Squeezer

      public Squeezer()
      Deprecated.
      Create a new Squeezer.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Deprecated.
      Get the GType of the Squeezer class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Squeezer asParent()
      Deprecated.
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • add

      @Deprecated public SqueezerPage add(Widget child)
      Deprecated.
      Adds a child to self.
      Parameters:
      child - the widget to add
      Returns:
      the SqueezerPage for child
    • getAllowNone

      @Deprecated public boolean getAllowNone()
      Deprecated.
      Gets whether to allow squeezing beyond the last child's minimum size.
      Returns:
      whether this Squeezer allows squeezing beyond the last child
    • getHomogeneous

      @Deprecated public boolean getHomogeneous()
      Deprecated.
      Gets whether all children have the same size for the opposite orientation.
      Returns:
      whether this Squeezer is homogeneous
    • getInterpolateSize

      @Deprecated public boolean getInterpolateSize()
      Deprecated.
      Gets whether this Squeezer interpolates its size when changing the visible child.
      Returns:
      whether the size is interpolated
    • getPage

      @Deprecated public SqueezerPage getPage(Widget child)
      Deprecated.
      Returns the SqueezerPage object for child.
      Parameters:
      child - a child of this Squeezer
      Returns:
      the page object for child
    • getPages

      @Deprecated public SelectionModel getPages()
      Deprecated.

      Returns a ListModel that contains the pages of self.

      This can be used to keep an up-to-date view. The model also implements SelectionModel and can be used to track the visible page.

      Returns:
      a GtkSelectionModel for the squeezer's children
    • getSwitchThresholdPolicy

      @Deprecated public FoldThresholdPolicy getSwitchThresholdPolicy()
      Deprecated.
      Gets the switch threshold policy for self.
      Returns:
      the fold threshold policy
    • getTransitionDuration

      @Deprecated public int getTransitionDuration()
      Deprecated.
      Gets the transition animation duration for self.
      Returns:
      the transition duration, in milliseconds
    • getTransitionRunning

      @Deprecated public boolean getTransitionRunning()
      Deprecated.

      Gets whether a transition is currently running for self.

      If a transition is impossible, the property value will be set to TRUE and then immediately to FALSE, so it's possible to rely on its notifications to know that a transition has happened.

      Returns:
      whether a transition is currently running
    • getTransitionType

      @Deprecated public SqueezerTransitionType getTransitionType()
      Deprecated.
      Gets the type of animation used for transitions between children in self.
      Returns:
      the current transition type of this Squeezer
    • getVisibleChild

      @Deprecated public @Nullable Widget getVisibleChild()
      Deprecated.
      Gets the currently visible child of self.
      Returns:
      the visible child
    • getXalign

      @Deprecated public float getXalign()
      Deprecated.
      Gets the horizontal alignment, from 0 (start) to 1 (end).
      Returns:
      the alignment value
    • getYalign

      @Deprecated public float getYalign()
      Deprecated.
      Gets the vertical alignment, from 0 (top) to 1 (bottom).
      Returns:
      the alignment value
    • remove

      @Deprecated public void remove(Widget child)
      Deprecated.
      Removes a child widget from self.
      Parameters:
      child - the child to remove
    • setAllowNone

      @Deprecated public void setAllowNone(boolean allowNone)
      Deprecated.

      Sets 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 - whether this Squeezer allows squeezing beyond the last child
    • setHomogeneous

      @Deprecated public void setHomogeneous(boolean homogeneous)
      Deprecated.

      Sets 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 - whether this Squeezer is homogeneous
    • setInterpolateSize

      @Deprecated public void setInterpolateSize(boolean interpolateSize)
      Deprecated.

      Sets whether this 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 - whether to interpolate the size
    • setSwitchThresholdPolicy

      @Deprecated public void setSwitchThresholdPolicy(FoldThresholdPolicy policy)
      Deprecated.

      Sets the switch threshold policy for self.

      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:
      policy - the policy to use
    • setTransitionDuration

      @Deprecated public void setTransitionDuration(int duration)
      Deprecated.
      Sets the transition animation duration for self.
      Parameters:
      duration - the new duration, in milliseconds
    • setTransitionType

      @Deprecated public void setTransitionType(SqueezerTransitionType transition)
      Deprecated.
      Sets the type of animation used for transitions between children in self.
      Parameters:
      transition - the new transition type
    • setXalign

      @Deprecated public void setXalign(float xalign)
      Deprecated.

      Sets 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 new alignment value
    • setYalign

      @Deprecated public void setYalign(float yalign)
      Deprecated.

      Sets 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 new alignment value
    • builder

      public static Squeezer.Builder<? extends Squeezer.Builder> builder()
      Deprecated.
      A Squeezer.Builder object constructs a Squeezer with the specified properties. Use the various set...() methods to set properties, and finish construction with Squeezer.Builder.build().
      Returns:
      the builder object