Package org.zkoss.stateless.sul

## 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>>`

      public interface IGroupbox<I extends IAnyGroup>
      extends IXulElement<IGroupbox<I>>, IChildable<IGroupbox<I>,​I>, IAnyGroup<IGroupbox<I>>, IComposite<IGroupbox<I>,​IAnyGroup>

  Immutable `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 Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `IGroupbox.Builder<I extends IAnyGroup>` | Builds instances of type `IGroupbox`.
    `static class` | `IGroupbox.Updater` | Builds an updater of type `IGroupbox` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static IGroupbox<IAnyGroup>` | `DEFAULT` | Constant for default attributes of this immutable component.
    `static IGroupbox<IAnyGroup>` | `THREE_D` | Constant for 3d attributes of this immutable component.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ICaption` | `getCaption()` | Returns the caption child of this groupbox.
    `java.lang.String` | `getContentSclass()` | Returns the style class used for the content block of the groupbox.
    `java.lang.String` | `getContentStyle()` | Returns the CSS style for the content block of the groupbox.
    `default java.lang.String` | `getTitle()` | Returns the title.
    `default java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `default boolean` | `isClosable()` | Returns whether user can open or close the group box.
    `default boolean` | `isNativeScrollbar()` | Returns whether to use Browser's scrollbar or a floating scrollbar (if with `false`).
    `default boolean` | `isOpen()` | Returns whether this groupbox is open.
    `static <I extends IAnyGroup> IGroupbox<I>` | `of​(I... children)` | Returns the instance with the given any group children.
    `static <I extends IAnyGroup> IGroupbox<I>` | `of​(java.lang.Iterable<? extends I> children)` | Returns the instance with the given any group children.
    `static <I extends IAnyGroup> IGroupbox<I>` | `ofCaption​(ICaption caption)` | Returns the instance with the given caption.
    `static <I extends IAnyGroup> IGroupbox<I>` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `static <I extends IAnyGroup> IGroupbox<I>` | `ofSize​(java.lang.String width, java.lang.String height)` | Returns the instance with the given size, width and height
    `static <I extends IAnyGroup> IGroupbox<I>` | `ofTitle​(java.lang.String title)` | Returns the instance with the given title.
    `default IGroupbox<I>` | `withAllComponents​(java.lang.Iterable<? extends IAnyGroup> elements)` | Copy the current immutable object with elements that replace the content of `children`.
    `IGroupbox<I>` | `withCaption​(ICaption caption)` | Returns a copy of `this` immutable component with the specified `caption`.
    `IGroupbox<I>` | `withClosable​(boolean closable)` | Returns a copy of `this` immutable component with the specified `closable`.
    `IGroupbox<I>` | `withContentSclass​(java.lang.String contentSclass)` | Returns a copy of `this` immutable component with the specified `contentSclass`.
    `IGroupbox<I>` | `withContentStyle​(java.lang.String contentStyle)` | Returns a copy of `this` immutable component with the specified `contentStyle`.
    `IGroupbox` | `withNativeScrollbar​(boolean nativeScrollbar)` | Returns a copy of `this` immutable component with the specified `nativeScrollbar`.
    `IGroupbox<I>` | `withOpen​(boolean open)` | Returns a copy of `this` immutable component with the specified `open`.
    `IGroupbox<I>` | `withTitle​(java.lang.String title)` | Returns a copy of `this` immutable component with the specified `title`.

    - ### 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`

- - ### Field Detail

    - #### DEFAULT

          static final IGroupbox<IAnyGroup> DEFAULT

      Constant for default attributes of this immutable component.

    - #### THREE_D

          static final IGroupbox<IAnyGroup> THREE_D

      Constant for 3d attributes of this immutable component.

  - ### Method Detail

    - #### getWidgetClass

          default java.lang.String getWidgetClass()

      Returns the client widget class.

      Default: `"zul.wgt.Groupbox"`

      Specified by:
        `getWidgetClass` in interface `IComponent<I extends IAnyGroup>`

    - #### getCaption

          @Nullable
          ICaption getCaption()

      Returns the caption child of this groupbox.

    - #### withCaption

          IGroupbox<I> withCaption​(@Nullable
                                   ICaption caption)

      Returns a copy of `this` immutable component with the specified `caption`.

      Sets the caption child of this component.

      Parameters:
        `caption` - The caption child of the component.

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getContentStyle

          @Nullable
          java.lang.String getContentStyle()

      Returns the CSS style for the content block of the groupbox. Used only if `IComponent.getMold()` is not `"default"`.

    - #### withContentStyle

          IGroupbox<I> withContentStyle​(@Nullable
                                        java.lang.String contentStyle)

      Returns a copy of `this` immutable component with the specified `contentStyle`.

      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 `this` object

    - #### getContentSclass

          @Nullable
          java.lang.String getContentSclass()

      Returns the style class used for the content block of the groupbox. Used only if `IComponent.getMold()` is not `"default"`.

    - #### withContentSclass

          IGroupbox<I> withContentSclass​(@Nullable
                                         java.lang.String contentSclass)

      Returns a copy of `this` immutable component with the specified `contentSclass`.

      Sets the style class used for the content block of the groupbox.

      Parameters:
        `contentSclass` - The style class used for the content block of the groupbox

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getTitle

          default java.lang.String getTitle()

      Returns the title. Besides this attribute, you could use `ICaption` to define a more sophisticated caption (a.k.a., title).

      It will be displayed before `caption` if both are applied.

      Default: `""` (empty).

    - #### withTitle

          IGroupbox<I> withTitle​(java.lang.String title)

      Returns a copy of `this` immutable component with the specified `title`.

      Sets the title. Besides this attribute, you could use `ICaption` to define a more sophisticated caption (a.k.a., title).

      It will be displayed before `caption` if both are applied.

      Parameters:
        `title` - The title of the component.

        Default: `""` (empty).

      Returns:
        A modified copy of the `this` object

    - #### isOpen

          default boolean isOpen()

      Returns whether this groupbox is open.

      Default: `true`.

    - #### withOpen

          IGroupbox<I> withOpen​(boolean open)

      Returns a copy of `this` immutable component with the specified `open`.

      Sets to open or close this groupbox.

      Parameters:
        `open` - Whether to open or close this groupbox

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### 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

          IGroupbox<I> withClosable​(boolean closable)

      Returns a copy of `this` immutable component with the specified `closable`.

      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 `this` object

    - #### isNativeScrollbar

          default boolean isNativeScrollbar()

      Returns whether to use Browser's scrollbar or a floating scrollbar (if with `false`).

      Default: `true` to use Browser's scrollbar, if the `"org.zkoss.zul.nativebar"` library property is not set in zk.xml.

    - #### withNativeScrollbar

          IGroupbox withNativeScrollbar​(boolean nativeScrollbar)

      Returns a copy of `this` immutable component with the specified `nativeScrollbar`.

      Sets to use Browser's scrollbar or a floating scrollbar

      Parameters:
        `nativeScrollbar` - `true` to use Browser's scrollbar, or `false` to use a floating scrollbar.

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### withAllComponents

          default IGroupbox<I> withAllComponents​(java.lang.Iterable<? extends IAnyGroup> elements)

      Description copied from interface: `IComposite`
      Copy the current immutable object with elements that replace the content of `children`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Specified by:
        `withAllComponents` in interface `IComposite<IGroupbox<I extends IAnyGroup>,​IAnyGroup>`
      Parameters:
        `elements` - An iterable of children elements to set
      Returns:
        A modified copy of `this` object

    - #### of

          static <I extends IAnyGroup> IGroupbox<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> IGroupbox<I> of​(I... children)

      Returns the instance with the given any group children.
      Parameters:
        `children` - The children belong to any group
      See Also:
        `IAnyGroup`

    - #### ofCaption

          static <I extends IAnyGroup> IGroupbox<I> ofCaption​(ICaption caption)

      Returns the instance with the given caption.
      Parameters:
        `caption` - The caption child

    - #### ofId

          static <I extends IAnyGroup> IGroupbox<I> ofId​(java.lang.String id)

      Returns the instance with the given id.
      Parameters:
        `id` - The id to identify this component

    - #### ofTitle

          static <I extends IAnyGroup> IGroupbox<I> ofTitle​(java.lang.String title)

      Returns the instance with the given title.
      Parameters:
        `title` - The title of the groupbox.

    - #### ofSize

          static <I extends IAnyGroup> IGroupbox<I> ofSize​(java.lang.String width,
                                                           java.lang.String height)

      Returns the instance with the given size, width and height
      Parameters:
        `width` - The width of the component
        `height` - The height of the component