Interface ISplitlayout<I extends IAnyGroup>
- All Superinterfaces:
IAnyGroup<ISplitlayout<I>>,IChildable<ISplitlayout<I>,,I> IComponent<ISplitlayout<I>>,IHtmlBasedComponent<ISplitlayout<I>>,IXulElement<ISplitlayout<I>>
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 ClassesModifier and TypeInterfaceDescriptionstatic classISplitlayout.Builder<I extends IAnyGroup>Builds instances of typeISplitlayout.static enumSpecifies the collapse ofISplitlayoutcomponentstatic enumSpecifies the orient ofISplitlayoutcomponentstatic classBuilds an updater of typeISplitlayoutforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ISplitlayout<IAnyGroup>Constant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns which side of the splitter is collapsed when its grippy is clicked.default StringReturns the heights.default StringReturns the minimum heights.default StringReturns the minimum widths.default StringReturns the orient.default StringReturns the client widget class.default StringReturns the widths.default booleanisOpen()Returns whether it is open (i.e., not collapsed.default booleanReturns resizable of the splitterstatic <I extends IAnyGroup>
ISplitlayout<I>of(I... children) Returns the instance with the given any group children.static <I extends IAnyGroup>
ISplitlayout<I>Returns the instance with the given any group children.static <I extends IAnyGroup>
ISplitlayout<I>Returns the instance with the given vflex and hflexstatic <I extends IAnyGroup>
ISplitlayout<I>Returns the instance with the given id.withCollapse(String collapse) Returns a copy ofthisimmutable component with the specifiedcollapse.default ISplitlayout<I>withCollapse(ISplitlayout.Collapse collapse) Returns a copy ofthisimmutable component with the specifiedcollapse.withHeights(String heights) Returns a copy ofthisimmutable component with the specifiedheights.withMinHeights(String minHeights) Returns a copy ofthisimmutable component with the specifiedminHeights.withMinWidths(String minWidths) Returns a copy ofthisimmutable component with the specifiedminWidths.withOpen(boolean open) Returns a copy ofthisimmutable component with the specifiedopen.withOrient(String orient) Returns a copy ofthisimmutable component with the specifiedorient.default ISplitlayout<I>withOrient(ISplitlayout.Orient orient) Returns a copy ofthisimmutable component with the specifiedorient.withResizable(boolean resizable) Returns a copy ofthisimmutable component with the specifiedresizable.withWidths(String widths) Returns a copy ofthisimmutable component with the specifiedwidths.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.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zkmax.layout.Splitlayout"- Specified by:
getWidgetClassin interfaceIComponent<I extends IAnyGroup>
-
getWidths
Returns the widths.Default:
""(empty) -
withWidths
Returns a copy ofthisimmutable component with the specifiedwidths.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 widthsDefault:
""(empty).- Returns:
- A modified copy of the
thisobject
-
getHeights
Returns the heights.Default:
""(empty) -
withHeights
Returns a copy ofthisimmutable component with the specifiedheights.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 heightsDefault:
""(empty).- Returns:
- A modified copy of the
thisobject
-
getMinWidths
Returns the minimum widths.Default:
""(empty). -
withMinWidths
Returns a copy ofthisimmutable component with the specifiedminWidths.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 widthsDefault:
""(empty).- Returns:
- A modified copy of the
thisobject
-
getMinHeights
Returns the minimum heights.Default:
""(empty). -
withMinHeights
Returns a copy ofthisimmutable component with the specifiedminHeights.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 widthsDefault:
""(empty).- Returns:
- A modified copy of the
thisobject
-
getOrient
Returns the orient.Default: vertical
-
withOrient
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient of component
- Parameters:
orient- Either"horizontal"or"vertical"Default:
"vertical".- Returns:
- A modified copy of the
thisobject
-
withOrient
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient of component
- Parameters:
orient- Either"horizontal"or"vertical"Default:
"vertical".- Returns:
- A modified copy of the
thisobject
-
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
Returns a copy ofthisimmutable component with the specifiedcollapse.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
thisobject
-
withCollapse
Returns a copy ofthisimmutable component with the specifiedcollapse.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
thisobject
-
isOpen
default boolean isOpen()Returns whether it is open (i.e., not collapsed. Meaningful only ifgetCollapse()is not "none". -
withOpen
Returns a copy ofthisimmutable component with the specifiedopen.Opens or collapses the splitter.
- Parameters:
open- Opens or collapses the splitter.Default:
true.- Returns:
- A modified copy of the
thisobject
-
isResizable
default boolean isResizable()Returns resizable of the splitter -
withResizable
Returns a copy ofthisimmutable component with the specifiedresizable.Sets resizable of the splitter
- Parameters:
resizable- Whether to enable resizable of the splitterDefault:
true.- Returns:
- A modified copy of the
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:
-
ofFlex
Returns the instance with the given vflex and hflex- Parameters:
hflex- The horizontal flex hintvflex- The vertical flex hint
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-