Interface IToolbar<I extends IAnyGroup>
-
- All Superinterfaces:
IAnyGroup<IToolbar<I>>,IChildable<IToolbar<I>,I>,IChildrenOfPanel<IToolbar<I>>,IComponent<IToolbar<I>>,IHtmlBasedComponent<IToolbar<I>>,ITabboxComposite<IToolbar<I>>,IXulElement<IToolbar<I>>
public interface IToolbar<I extends IAnyGroup> extends IXulElement<IToolbar<I>>, IChildable<IToolbar<I>,I>, IChildrenOfPanel<IToolbar<I>>, IAnyGroup<IToolbar<I>>, ITabboxComposite<IToolbar<I>>
ImmutableToolbarcomponentA toolbar is used to place a series of buttons, such as toolbarbutton or button. The toolbar buttons could be used without toolbars, so a toolbar could be used without tool buttons. However, the tool buttons change their appearance if they are placed inside a toolbar.
The toolbar has two orientation: horizontal and vertical. It controls how the buttons are placed.
Support Molds
Name Snapshot "default"
"panel"
- Author:
- katherine
- See Also:
Toolbar
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIToolbar.Builder<I extends IAnyGroup>Builds instances of typeIToolbar.static classIToolbar.OrientSpecifies the orient withwithOrient(Orient)static classIToolbar.UpdaterBuilds an updater of typeIToolbarforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetAlign()Returns the alignment of any children added to this toolbar.default java.lang.StringgetOrient()Returns the orient.default java.lang.StringgetOverflowPopupIconSclass()Returns the overflow sclass name of overflow popup icon of this toolbar.default java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisOverflowPopup()Return whether toolbar has a button that shows a popup which contains those content weren't able to fit in the toolbar.static <I extends IAnyGroup>
IToolbar<I>of(I... children)Returns the instance with the given any group children.static <I extends IAnyGroup>
IToolbar<I>of(java.lang.Iterable<? extends I> children)Returns the instance with the given any group children.static <I extends IAnyGroup>
IToolbar<I>ofId(java.lang.String id)Returns the instance with the given id.IToolbar<I>withAlign(java.lang.String align)Returns a copy ofthisimmutable component with the specifiedalign.IToolbar<I>withOrient(java.lang.String orient)Returns a copy ofthisimmutable component with the specifiedorient.default IToolbar<I>withOrient(IToolbar.Orient orient)Returns a copy ofthisimmutable component with the specifiedorient.IToolbar<I>withOverflowPopup(boolean overflowPopup)Returns a copy ofthisimmutable component with the specifiedoverflowPopup.IToolbar<I>withOverflowPopupIconSclass(java.lang.String overflowPopupIconSclass)Returns a copy ofthisimmutable component with the specifiedoverflowPopupIconSclass.-
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, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, 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
-
-
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Toolbar"- Specified by:
getWidgetClassin interfaceIComponent<I extends IAnyGroup>
-
getOrient
default java.lang.String getOrient()
Returns the orient.Default:
"horizontal".
-
withOrient
IToolbar<I> withOrient(java.lang.String orient)
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient.
- Parameters:
orient- Either"horizontal"or"vertical"Default:
"horizontal".- Returns:
- A modified copy of the
thisobject
-
withOrient
default IToolbar<I> withOrient(IToolbar.Orient orient)
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient.
- Parameters:
orient- Either"horizontal"or"vertical"Default:
"horizontal".- Returns:
- A modified copy of the
thisobject
-
getAlign
default java.lang.String getAlign()
Returns the alignment of any children added to this toolbar. Valid values are"start","end"and"center".Default:
"start"
-
withAlign
IToolbar<I> withAlign(java.lang.String align)
Returns a copy ofthisimmutable component with the specifiedalign.Sets the alignment of any children added to this toolbar.
- Parameters:
align- Valid values are"start","end"and"center"Default:
"start".- Returns:
- A modified copy of the
thisobject
-
isOverflowPopup
default boolean isOverflowPopup()
Return whether toolbar has a button that shows a popup which contains those content weren't able to fit in the toolbar. If overflowPopup is false, toolbar will display multiple rows when content is wider than toolbar.Default:
false.
-
withOverflowPopup
IToolbar<I> withOverflowPopup(boolean overflowPopup)
Returns a copy ofthisimmutable component with the specifiedoverflowPopup.Sets whether toolbar has a button that shows a popup
- Parameters:
overflowPopup- Whether toolbar has a button that shows a popupDefault:
false.- Returns:
- A modified copy of the
thisobject
-
getOverflowPopupIconSclass
default java.lang.String getOverflowPopupIconSclass()
Returns the overflow sclass name of overflow popup icon of this toolbar. Default:"z-icon-ellipsis-h".
-
withOverflowPopupIconSclass
IToolbar<I> withOverflowPopupIconSclass(java.lang.String overflowPopupIconSclass)
Returns a copy ofthisimmutable component with the specifiedoverflowPopupIconSclass.Sets the overflow sclass name of overflow popup icon of this toolbar.
- Parameters:
overflowPopupIconSclass- The overflow sclass name of overflow popup icon of this toolbar.Default:
"z-icon-ellipsis-h".- Returns:
- A modified copy of the
thisobject
-
of
static <I extends IAnyGroup> IToolbar<I> of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
IAnyGroup
-
of
static <I extends IAnyGroup> IToolbar<I> of(I... children)
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
IAnyGroup
-
-