Interface IAvatargroup

All Superinterfaces:
IAnyGroup<IAvatargroup>, IChildable<IAvatargroup,IAvatar>, IComponent<IAvatargroup>, IHtmlBasedComponent<IAvatargroup>, IXulElement<IAvatargroup>

public interface IAvatargroup extends IXulElement<IAvatargroup>, IChildable<IAvatargroup,IAvatar>, IAnyGroup<IAvatargroup>
Immutable Avatargroup component.

A group container that stacks multiple IAvatar components with an overlapping layout. When getMaxItems() is set, avatars beyond the limit are hidden and a "+N" overflow indicator is shown.

Since:
11.0.0
Author:
peaker
See Also:
  • Avatargroup
  • Field Details

    • DEFAULT

      static final IAvatargroup DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zul.wgt.Avatargroup"

      Specified by:
      getWidgetClass in interface IComponent<IAvatargroup>
    • getMaxItems

      default int getMaxItems()
      Returns the maximum number of visible avatars.

      Default: 0 (unlimited).

    • withMaxItems

      IAvatargroup withMaxItems(int maxItems)
      Returns a copy of this immutable component with the specified maxItems.

      Sets the maximum number of visible avatars. Excess avatars are hidden and replaced with a "+N" overflow indicator.

      Parameters:
      maxItems - the number of visible avatars; 0 means unlimited and a negative value is rejected.

      Default: 0.

      Returns:
      A modified copy of the this object
    • getSize

      @Nullable String getSize()
      Returns the size override applied to all child avatars, or null if not overriding.

      Default: null.

    • withSize

      IAvatargroup withSize(@Nullable String size)
      Returns a copy of this immutable component with the specified size.

      Sets a uniform size for all child avatars. Applies via a CSS cascade class on the group element; IAvatar.getSize() is not changed.

      Parameters:
      size - "small", "medium" or "large".

      Default: null.

      Returns:
      A modified copy of the this object
    • getShape

      @Nullable String getShape()
      Returns the shape override applied to all child avatars, or null if not overriding.

      Default: null.

    • withShape

      IAvatargroup withShape(@Nullable String shape)
      Returns a copy of this immutable component with the specified shape.

      Sets a uniform shape for all child avatars. Applies via a CSS cascade class on the group element.

      Parameters:
      shape - either "circle" or "square".

      Default: null.

      Returns:
      A modified copy of the this object
    • of

      static IAvatargroup of(Iterable<? extends IAvatar> children)
      Returns the instance with the given IAvatar children.
      Parameters:
      children - The children of IAvatar
    • of

      static IAvatargroup of(IAvatar... children)
      Returns the instance with the given IAvatar children.
      Parameters:
      children - The children of IAvatar
    • ofId

      static IAvatargroup ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component