@Tag(value="vaadin-avatar-group") @JsModule(value="@vaadin/vaadin-avatar/src/vaadin-avatar-group.js") @NpmPackage(value="@vaadin/vaadin-avatar", version="20.0.0") public class AvatarGroup extends Component implements HasStyle, HasSize, HasTheme
vaadin-avatar-group
element.Modifier and Type | Class and Description |
---|---|
static class |
AvatarGroup.AvatarGroupI18n
The internationalization properties for
AvatarGroup . |
static class |
AvatarGroup.AvatarGroupItem
Item to be set as an avatar for the avatar group.
|
Constructor and Description |
---|
AvatarGroup()
Creates an empty avatar group component.
|
AvatarGroup(AvatarGroup.AvatarGroupItem... items)
Creates an avatar group with the provided items to be displayed as
avatars.
|
AvatarGroup(Collection<AvatarGroup.AvatarGroupItem> items)
Creates an avatar group with the provided items to be displayed as
avatars.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AvatarGroup.AvatarGroupItem... items)
Adds the items to the list of displayed as avatars.
|
void |
addThemeVariants(AvatarGroupVariant... variants)
Adds theme variants to the avatar group component.
|
AvatarGroup.AvatarGroupI18n |
getI18n()
Gets the internationalization object previously set for this component.
|
List<AvatarGroup.AvatarGroupItem> |
getItems()
Gets the items that were set for the avatar group in an unmodifiable
list.
|
Integer |
getMaxItemsVisible()
Gets the maximum number of avatars to display, or
null if no
limit has been set. |
void |
remove(AvatarGroup.AvatarGroupItem... items)
Removes the items from the list of displayed as avatars.
|
void |
removeThemeVariants(AvatarGroupVariant... variants)
Removes theme variants from the avatar group component.
|
void |
setI18n(AvatarGroup.AvatarGroupI18n i18n)
Sets the internationalization properties for this component.
|
void |
setItems(AvatarGroup.AvatarGroupItem... items)
Sets the items that will be displayed as avatars.
|
void |
setItems(Collection<AvatarGroup.AvatarGroupItem> items)
Sets the items that will be displayed as avatars.
|
void |
setMaxItemsVisible(Integer max)
Sets the the maximum number of avatars to display.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
getCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
getElement
addAttachListener
addDetachListener
public AvatarGroup()
public AvatarGroup(Collection<AvatarGroup.AvatarGroupItem> items)
public AvatarGroup(AvatarGroup.AvatarGroupItem... items)
public void setItems(Collection<AvatarGroup.AvatarGroupItem> items)
items
- the items to setpublic void setItems(AvatarGroup.AvatarGroupItem... items)
items
- the items to setpublic void add(AvatarGroup.AvatarGroupItem... items)
items
- the items to addpublic void remove(AvatarGroup.AvatarGroupItem... items)
items
- the items to removepublic List<AvatarGroup.AvatarGroupItem> getItems()
public AvatarGroup.AvatarGroupI18n getI18n()
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)
null
, If the i18n
properties weren't set.public void setI18n(AvatarGroup.AvatarGroupI18n i18n)
i18n
- the internationalized properties, not null
public void setMaxItemsVisible(Integer max)
By default, all the avatars are displayed. When max is set, the overflowing avatars are grouped into one avatar.
max
- the maximum number of avatars, or null
to remove the
limitpublic Integer getMaxItemsVisible()
null
if no
limit has been set.setMaxItemsVisible(Integer)
public void addThemeVariants(AvatarGroupVariant... variants)
variants
- theme variants to addpublic void removeThemeVariants(AvatarGroupVariant... variants)
variants
- theme variants to removeCopyright © 2021. All rights reserved.