Package org.zkoss.stateless.sul
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>
ImmutableAvatargroupcomponent.A group container that stacks multiple
IAvatarcomponents with an overlapping layout. WhengetMaxItems()is set, avatars beyond the limit are hidden and a "+N" overflow indicator is shown.- Since:
- 11.0.0
- Author:
- peaker
- See Also:
Avatargroup
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIAvatargroup.BuilderBuilds instances of typeIAvatargroup.static classIAvatargroup.UpdaterBuilds an updater of typeIAvatargroupforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Field Summary
Fields Modifier and Type Field Description static IAvatargroupDEFAULTConstant for default attributes of this immutable component.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetMaxItems()Returns the maximum number of visible avatars.java.lang.StringgetShape()Returns the shape override applied to all child avatars, ornullif not overriding.java.lang.StringgetSize()Returns the size override applied to all child avatars, ornullif not overriding.default java.lang.StringgetWidgetClass()Returns the client widget class.static IAvatargroupof(java.lang.Iterable<? extends IAvatar> children)Returns the instance with the givenIAvatarchildren.static IAvatargroupof(IAvatar... children)Returns the instance with the givenIAvatarchildren.static IAvatargroupofId(java.lang.String id)Returns the instance with the given id.IAvatargroupwithMaxItems(int maxItems)Returns a copy ofthisimmutable component with the specifiedmaxItems.IAvatargroupwithShape(java.lang.String shape)Returns a copy ofthisimmutable component with the specifiedshape.IAvatargroupwithSize(java.lang.String size)Returns a copy ofthisimmutable component with the specifiedsize.-
Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildren
-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final IAvatargroup DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Avatargroup"- Specified by:
getWidgetClassin interfaceIComponent<IAvatargroup>
-
getMaxItems
default int getMaxItems()
Returns the maximum number of visible avatars.Default:
0(unlimited).
-
withMaxItems
IAvatargroup withMaxItems(int maxItems)
Returns a copy ofthisimmutable component with the specifiedmaxItems.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;0means unlimited and a negative value is rejected.Default:
0.- Returns:
- A modified copy of the
thisobject
-
getSize
@Nullable java.lang.String getSize()
Returns the size override applied to all child avatars, ornullif not overriding.Default:
null.
-
withSize
IAvatargroup withSize(@Nullable java.lang.String size)
Returns a copy ofthisimmutable component with the specifiedsize.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
thisobject
-
getShape
@Nullable java.lang.String getShape()
Returns the shape override applied to all child avatars, ornullif not overriding.Default:
null.
-
withShape
IAvatargroup withShape(@Nullable java.lang.String shape)
Returns a copy ofthisimmutable component with the specifiedshape.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
thisobject
-
of
static IAvatargroup of(java.lang.Iterable<? extends IAvatar> children)
Returns the instance with the givenIAvatarchildren.- Parameters:
children- The children ofIAvatar
-
of
static IAvatargroup of(IAvatar... children)
Returns the instance with the givenIAvatarchildren.- Parameters:
children- The children ofIAvatar
-
ofId
static IAvatargroup ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-