Interface IGroupbox<I extends IAnyGroup>
- All Superinterfaces:
IAnyGroup<IGroupbox<I>>,IChildable<IGroupbox<I>,,I> IComponent<IGroupbox<I>>,IComposite<IGroupbox<I>,,IAnyGroup> IHtmlBasedComponent<IGroupbox<I>>,IXulElement<IGroupbox<I>>
Groupbox component.
A group box is used to group components together. A border is typically
drawn around the components to show that they are related. The label across
the top of the group box can be created by using Caption component.
It works much like the HTML legend element. Unlike IWindow, a group box
cannot be overlapped or popup.
Support @Action
| Name | Action Type |
|---|---|
| onOpen | ActionData: OpenData
Denotes user has opened or closed a component. |
Support Molds
| Name | Snapshot |
|---|---|
"default" |
![]() |
"3d" |
![]() |
- Author:
- katherine
- See Also:
-
Groupbox
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classIGroupbox.Builder<I extends IAnyGroup>Builds instances of typeIGroupbox.static classBuilds an updater of typeIGroupboxforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the caption child of this groupbox.Returns the style class used for the content block of the groupbox.Returns the CSS style for the content block of the groupbox.default StringgetTitle()Returns the title.default StringReturns the client widget class.default booleanReturns whether user can open or close the group box.default booleanReturns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanisOpen()Returns whether this groupbox is open.of(I... children) Returns the instance with the given any group children.Returns the instance with the given any group children.Returns the instance with the given caption.Returns the instance with the given id.Returns the instance with the given size, width and heightReturns the instance with the given title.withAllComponents(Iterable<? extends IAnyGroup> elements) Copy the current immutable object with elements that replace the content ofchildren.withCaption(ICaption caption) Returns a copy ofthisimmutable component with the specifiedcaption.withClosable(boolean closable) Returns a copy ofthisimmutable component with the specifiedclosable.withContentSclass(String contentSclass) Returns a copy ofthisimmutable component with the specifiedcontentSclass.withContentStyle(String contentStyle) Returns a copy ofthisimmutable component with the specifiedcontentStyle.withNativeScrollbar(boolean nativeScrollbar) Returns a copy ofthisimmutable component with the specifiednativeScrollbar.withOpen(boolean open) Returns a copy ofthisimmutable component with the specifiedopen.Returns a copy ofthisimmutable component with the specifiedtitle.Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildrenMethods 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, withWidgetOverridesMethods 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, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component. -
THREE_D
Constant for 3d attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.wgt.Groupbox"- Specified by:
getWidgetClassin interfaceIComponent<I extends IAnyGroup>
-
getCaption
Returns the caption child of this groupbox. -
withCaption
Returns a copy ofthisimmutable component with the specifiedcaption.Sets the caption child of this component.
- Parameters:
caption- The caption child of the component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getContentStyle
Returns the CSS style for the content block of the groupbox. Used only ifIComponent.getMold()is not"default". -
withContentStyle
Returns a copy ofthisimmutable component with the specifiedcontentStyle.Sets the CSS style for the content block of the groupbox. Used only if
IComponent.getMold()is not"default".- Parameters:
contentStyle- The CSS style for the content block of the groupbox.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getContentSclass
Returns the style class used for the content block of the groupbox. Used only ifIComponent.getMold()is not"default". -
withContentSclass
Returns a copy ofthisimmutable component with the specifiedcontentSclass.Sets the style class used for the content block of the groupbox.
- Parameters:
contentSclass- The style class used for the content block of the groupboxDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getTitle
Returns the title. Besides this attribute, you could useICaptionto define a more sophisticated caption (a.k.a., title).It will be displayed before
captionif both are applied.Default:
""(empty). -
withTitle
Returns a copy ofthisimmutable component with the specifiedtitle.Sets the title. Besides this attribute, you could use
ICaptionto define a more sophisticated caption (a.k.a., title).It will be displayed before
captionif both are applied.- Parameters:
title- The title of the component.Default:
""(empty).- Returns:
- A modified copy of the
thisobject
-
isOpen
default boolean isOpen()Returns whether this groupbox is open.Default:
true. -
withOpen
Returns a copy ofthisimmutable component with the specifiedopen.Sets to open or close this groupbox.
- Parameters:
open- Whether to open or close this groupboxDefault:
true.- Returns:
- A modified copy of the
thisobject
-
isClosable
default boolean isClosable()Returns whether user can open or close the group box. In other words, if false, users are no longer allowed to change the open status (by clicking on the title).Default:
true. -
withClosable
Returns a copy ofthisimmutable component with the specifiedclosable.Sets whether user can open or close the group box. In other words, if false, users are no longer allowed to change the open status (by clicking on the title).
- Parameters:
closable- Whether user can open or close the group box.Default:
true.- Returns:
- A modified copy of the
thisobject
-
isNativeScrollbar
default boolean isNativeScrollbar()Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).Default:
trueto use Browser's scrollbar, if the"org.zkoss.zul.nativebar"library property is not set in zk.xml. -
withNativeScrollbar
Returns a copy ofthisimmutable component with the specifiednativeScrollbar.Sets to use Browser's scrollbar or a floating scrollbar
- Parameters:
nativeScrollbar-trueto use Browser's scrollbar, orfalseto use a floating scrollbar.Default:
true.- Returns:
- A modified copy of the
thisobject
-
withAllComponents
Description copied from interface:ICompositeCopy the current immutable object with elements that replace the content ofchildren. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withAllComponentsin interfaceIComposite<IGroupbox<I extends IAnyGroup>,IAnyGroup> - Parameters:
elements- An iterable of children elements to set- Returns:
- A modified copy of
thisobject
-
of
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
-
of
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
-
ofCaption
Returns the instance with the given caption.- Parameters:
caption- The caption child
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
ofTitle
Returns the instance with the given title.- Parameters:
title- The title of the groupbox.
-
ofSize
Returns the instance with the given size, width and height- Parameters:
width- The width of the componentheight- The height of the component
-

