Class AvatarGroup

    • Constructor Detail

      • AvatarGroup

        public AvatarGroup()
        Creates an empty avatar group component.
      • AvatarGroup

        public AvatarGroup​(Collection<AvatarGroup.AvatarGroupItem> items)
        Creates an avatar group with the provided items to be displayed as avatars.
        Parameters:
        items - the items to be displayed
      • AvatarGroup

        public AvatarGroup​(AvatarGroup.AvatarGroupItem... items)
        Creates an avatar group with the provided items to be displayed as avatars.
        Parameters:
        items - the items to be displayed
    • Method Detail

      • setItems

        public void setItems​(AvatarGroup.AvatarGroupItem... items)
        Sets the items that will be displayed as avatars.
        Parameters:
        items - the items to set
      • add

        public void add​(AvatarGroup.AvatarGroupItem... items)
        Adds the items to the list of displayed as avatars.
        Parameters:
        items - the items to add
      • remove

        public void remove​(AvatarGroup.AvatarGroupItem... items)
        Removes the items from the list of displayed as avatars.
        Parameters:
        items - the items to remove
      • getItems

        public List<AvatarGroup.AvatarGroupItem> getItems()
        Gets the items that were set for the avatar group in an unmodifiable list.
        Returns:
        list of items
      • getI18n

        public AvatarGroup.AvatarGroupI18n getI18n()
        Gets the internationalization object previously set for this component.

        Note: updating the object content that is gotten from this method will not update the lang on the component if not set back using setI18n(AvatarGroupI18n)

        Returns:
        the i18n object. It will be null, If the i18n properties weren't set.
      • setI18n

        public void setI18n​(AvatarGroup.AvatarGroupI18n i18n)
        Sets the internationalization properties for this component.
        Parameters:
        i18n - the internationalized properties, not null
      • setMaxItemsVisible

        public void setMaxItemsVisible​(Integer max)
        Sets the the maximum number of avatars to display.

        By default, all the avatars are displayed. When max is set, the overflowing avatars are grouped into one avatar.

        Parameters:
        max - the maximum number of avatars, or null to remove the limit
      • getMaxItemsVisible

        public Integer getMaxItemsVisible()
        Gets the maximum number of avatars to display, or null if no limit has been set.
        Returns:
        the max number of avatars
        See Also:
        setMaxItemsVisible(Integer)