Package org.zkoss.stateless.sul

## Interface ISplitlayout<I extends IAnyGroup>

- All Superinterfaces:
    `IAnyGroup<ISplitlayout<I>>`, `IChildable<ISplitlayout<I>,​I>`, `IComponent<ISplitlayout<I>>`, `IHtmlBasedComponent<ISplitlayout<I>>`, `IXulElement<ISplitlayout<I>>`

      public interface ISplitlayout<I extends IAnyGroup>
      extends IXulElement<ISplitlayout<I>>, IChildable<ISplitlayout<I>,​I>, IAnyGroup<ISplitlayout<I>>

  Immutable `Splitlayout` component

  A layout container which is used to divide a component into two components. These two components inside Splitlayout, the splitlayouts, are placed either horizontally or vertically by setting the orientation, and users can easily resize these two viewports by dragging the splitter bar. It also supports hflex and vflex, indicating that users can divide the area into three or more spaces by putting the splitlayouts into the outer Splitlayout.

  ### Support @Action

  Name | Action Type
  --- | ---
  onOpen | ActionData: `OpenData` When a splitter is collapsed or opened by a user, the onOpen action is sent to the application.
  onDivisionSize | ActionData: `DivisionSizeData` Represents an event that indicates two inner size of splitlayout.

  Author:
    katherine
  See Also:
    `Splitlayout`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `ISplitlayout.Builder<I extends IAnyGroup>` | Builds instances of type `ISplitlayout`.
    `static class` | `ISplitlayout.Collapse` | Specifies the collapse of `ISplitlayout` component
    `static class` | `ISplitlayout.Orient` | Specifies the orient of `ISplitlayout` component
    `static class` | `ISplitlayout.Updater` | Builds an updater of type `ISplitlayout` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static ISplitlayout<IAnyGroup>` | `DEFAULT` | Constant 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 java.lang.String` | `getCollapse()` | Returns which side of the splitter is collapsed when its grippy is clicked.
    `default java.lang.String` | `getHeights()` | Returns the heights.
    `default java.lang.String` | `getMinHeights()` | Returns the minimum heights.
    `default java.lang.String` | `getMinWidths()` | Returns the minimum widths.
    `default java.lang.String` | `getOrient()` | Returns the orient.
    `default java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `default java.lang.String` | `getWidths()` | Returns the widths.
    `default boolean` | `isOpen()` | Returns whether it is open (i.e., not collapsed.
    `default boolean` | `isResizable()` | Returns resizable of the splitter
    `static <I extends IAnyGroup> ISplitlayout<I>` | `of​(I... children)` | Returns the instance with the given any group children.
    `static <I extends IAnyGroup> ISplitlayout<I>` | `of​(java.lang.Iterable<? extends I> children)` | Returns the instance with the given any group children.
    `static <I extends IAnyGroup> ISplitlayout<I>` | `ofFlex​(java.lang.String hflex, java.lang.String vflex)` | Returns the instance with the given vflex and hflex
    `static <I extends IAnyGroup> ISplitlayout<I>` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `ISplitlayout<I>` | `withCollapse​(java.lang.String collapse)` | Returns a copy of `this` immutable component with the specified `collapse`.
    `default ISplitlayout<I>` | `withCollapse​(ISplitlayout.Collapse collapse)` | Returns a copy of `this` immutable component with the specified `collapse`.
    `ISplitlayout<I>` | `withHeights​(java.lang.String heights)` | Returns a copy of `this` immutable component with the specified `heights`.
    `ISplitlayout<I>` | `withMinHeights​(java.lang.String minHeights)` | Returns a copy of `this` immutable component with the specified `minHeights`.
    `ISplitlayout<I>` | `withMinWidths​(java.lang.String minWidths)` | Returns a copy of `this` immutable component with the specified `minWidths`.
    `ISplitlayout<I>` | `withOpen​(boolean open)` | Returns a copy of `this` immutable component with the specified `open`.
    `ISplitlayout<I>` | `withOrient​(java.lang.String orient)` | Returns a copy of `this` immutable component with the specified `orient`.
    `default ISplitlayout<I>` | `withOrient​(ISplitlayout.Orient orient)` | Returns a copy of `this` immutable component with the specified `orient`.
    `ISplitlayout<I>` | `withResizable​(boolean resizable)` | Returns a copy of `this` immutable component with the specified `resizable`.
    `ISplitlayout<I>` | `withWidths​(java.lang.String widths)` | Returns a copy of `this` immutable component with the specified `widths`.

    - ### 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 ISplitlayout<IAnyGroup> DEFAULT

      Constant for default attributes of this immutable component.

  - ### Method Detail

    - #### getWidgetClass

          default java.lang.String getWidgetClass()

      Returns the client widget class.

      Default: `"zkmax.layout.Splitlayout"`

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

    - #### getWidths

          default java.lang.String getWidths()

      Returns the widths.

      Default: `""` (empty)

    - #### withWidths

          ISplitlayout<I> withWidths​(java.lang.String widths)

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

      Sets the widths, which is a list of numbers separated by comma to denote the width/height of two caves in splitlayout.

      For example, "100, 200" means the first cave shall occupy 100px width, the second cave 200px.

      Note: the splitters are ignored, i.e., they are not two children in the splitlayout.

      Another example, ",300" means the second caves shall occupy 300px width, and the first cave don't specify any width. Of course, the real widths depend on the interpretation of the browser.

      Parameters:
        `widths` - The widths

        Default: `""` (empty).

      Returns:
        A modified copy of the `this` object

    - #### getHeights

          default java.lang.String getHeights()

      Returns the heights.

      Default: `""` (empty)

    - #### withHeights

          ISplitlayout<I> withHeights​(java.lang.String heights)

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

      Sets the heights, which is a list of numbers separated by comma to denote the width/height of two caves in splitlayout.

      For example, "100 ,200" means the first cave shall occupy 100px height, the second cave 200px.

      Note: the splitters are ignored, i.e., they are not two children in the splitlayout.

      Another example, ",300" means the second caves shall occupy 300px height, and the first cave don't specify any height.

      Parameters:
        `heights` - The heights

        Default: `""` (empty).

      Returns:
        A modified copy of the `this` object

    - #### getMinWidths

          default java.lang.String getMinWidths()

      Returns the minimum widths.

      Default: `""` (empty).

    - #### withMinWidths

          ISplitlayout<I> withMinWidths​(java.lang.String minWidths)

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

      Sets the minimum widths, which is a list of numbers separated by comma to denote the minimum width of two caves in splitlayout.

      For example, "10%,20%" in "horizontal" splitlayout means that the first cave should not be smaller than 10% width and the second cave 20% when moving the splitter.

      Note: If the sum of minWidths larger than the width of splitlayout, the splitter would be fixed.

      Another example, ",30%" in "horizontal" splitlayout means the second caves should not be smaller than 30% height, and the first cave has no restrictions. Of course, the real width depend on the interpretation of the browser.

      Parameters:
        `minWidths` - The minimum widths

        Default: `""` (empty).

      Returns:
        A modified copy of the `this` object

    - #### getMinHeights

          default java.lang.String getMinHeights()

      Returns the minimum heights.

      Default: `""` (empty).

    - #### withMinHeights

          ISplitlayout<I> withMinHeights​(java.lang.String minHeights)

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

      Sets the minimum heights, which is a list of numbers separated by comma to denote the minimum heights of two caves in splitlayout.

      For example, "10%,20%" in "vertical" splitlayout means that the first cave should not be smaller than 10% height and the second cave 20% when moving the splitter.

      Note: If the sum of minHeights larger than the height of splitlayout, the splitter would be fixed.

      Another example, ",30%" in "vertical" splitlayout means the second caves should not be smaller than 30% height, and the first cave has no restrictions. Of course, the real height depend on the interpretation of the browser.

      Parameters:
        `minHeights` - The minimum widths

        Default: `""` (empty).

      Returns:
        A modified copy of the `this` object

    - #### getOrient

          default java.lang.String getOrient()

      Returns the orient.

      Default: vertical

    - #### withOrient

          ISplitlayout<I> withOrient​(java.lang.String orient)

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

      Sets the orient of component

      Parameters:
        `orient` - Either `"horizontal"` or `"vertical"`

        Default: `"vertical"`.

      Returns:
        A modified copy of the `this` object

    - #### withOrient

          default ISplitlayout<I> withOrient​(ISplitlayout.Orient orient)

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

      Sets the orient of component

      Parameters:
        `orient` - Either `"horizontal"` or `"vertical"`

        Default: `"vertical"`.

      Returns:
        A modified copy of the `this` object

    - #### getCollapse

          default java.lang.String getCollapse()

      Returns which side of the splitter is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse. If it is collapsed, `isOpen()` returns false.

      Default: `"none"`.

      The returned value can be one of the following.

      none
        No collapsing occurs.
      before
        When the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
      after
        When the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.

    - #### withCollapse

          ISplitlayout<I> withCollapse​(java.lang.String collapse)

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

      Sets which side of the splitter is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse.

      The valid values:

      none
        No collapsing occurs.
      before
        When the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
      after
        When the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.
      Parameters:
        `collapse` - Valid values are `"none"`, `"before"`, and `"after"`

        Default: `"none"`.

      Returns:
        A modified copy of the `this` object

    - #### withCollapse

          default ISplitlayout<I> withCollapse​(ISplitlayout.Collapse collapse)

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

      Sets which side of the splitter is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse.

      The valid values:

      none
        No collapsing occurs.
      before
        When the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
      after
        When the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.
      Parameters:
        `collapse` - Valid values are `"none"`, `"before"`, and `"after"`

        Default: `"none"`.

      Returns:
        A modified copy of the `this` object

    - #### isOpen

          default boolean isOpen()

      Returns whether it is open (i.e., not collapsed. Meaningful only if `getCollapse()` is not "none".

    - #### withOpen

          ISplitlayout<I> withOpen​(boolean open)

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

      Opens or collapses the splitter.

      Parameters:
        `open` - Opens or collapses the splitter.

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### isResizable

          default boolean isResizable()

      Returns resizable of the splitter

    - #### withResizable

          ISplitlayout<I> withResizable​(boolean resizable)

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

      Sets resizable of the splitter

      Parameters:
        `resizable` - Whether to enable resizable of the splitter

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### of

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

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

    - #### ofFlex

          static <I extends IAnyGroup> ISplitlayout<I> ofFlex​(java.lang.String hflex,
                                                              java.lang.String vflex)

      Returns the instance with the given vflex and hflex
      Parameters:
        `hflex` - The horizontal flex hint
        `vflex` - The vertical flex hint

    - #### ofId

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

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