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>>
ImmutableSplitlayout
componentA 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 typeISplitlayout
.static class
ISplitlayout.Collapse
Specifies the collapse ofISplitlayout
componentstatic class
ISplitlayout.Orient
Specifies the orient ofISplitlayout
componentstatic class
ISplitlayout.Updater
Builds an updater of typeISplitlayout
forUiAgent.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 splitterstatic <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 hflexstatic <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 ofthis
immutable component with the specifiedcollapse
.default ISplitlayout<I>
withCollapse(ISplitlayout.Collapse collapse)
Returns a copy ofthis
immutable component with the specifiedcollapse
.ISplitlayout<I>
withHeights(java.lang.String heights)
Returns a copy ofthis
immutable component with the specifiedheights
.ISplitlayout<I>
withMinHeights(java.lang.String minHeights)
Returns a copy ofthis
immutable component with the specifiedminHeights
.ISplitlayout<I>
withMinWidths(java.lang.String minWidths)
Returns a copy ofthis
immutable component with the specifiedminWidths
.ISplitlayout<I>
withOpen(boolean open)
Returns a copy ofthis
immutable component with the specifiedopen
.ISplitlayout<I>
withOrient(java.lang.String orient)
Returns a copy ofthis
immutable component with the specifiedorient
.default ISplitlayout<I>
withOrient(ISplitlayout.Orient orient)
Returns a copy ofthis
immutable component with the specifiedorient
.ISplitlayout<I>
withResizable(boolean resizable)
Returns a copy ofthis
immutable component with the specifiedresizable
.ISplitlayout<I>
withWidths(java.lang.String widths)
Returns a copy ofthis
immutable component with the specifiedwidths
.-
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 interfaceIComponent<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 ofthis
immutable 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
this
object
-
getHeights
default java.lang.String getHeights()
Returns the heights.Default:
""
(empty)
-
withHeights
ISplitlayout<I> withHeights(java.lang.String heights)
Returns a copy ofthis
immutable 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
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 ofthis
immutable 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
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 ofthis
immutable 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
this
object
-
getOrient
default java.lang.String getOrient()
Returns the orient.Default: vertical
-
withOrient
ISplitlayout<I> withOrient(java.lang.String orient)
Returns a copy ofthis
immutable component with the specifiedorient
.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 ofthis
immutable component with the specifiedorient
.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 ofthis
immutable 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
this
object
-
withCollapse
default ISplitlayout<I> withCollapse(ISplitlayout.Collapse collapse)
Returns a copy ofthis
immutable 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
this
object
-
isOpen
default boolean isOpen()
Returns whether it is open (i.e., not collapsed. Meaningful only ifgetCollapse()
is not "none".
-
withOpen
ISplitlayout<I> withOpen(boolean open)
Returns a copy ofthis
immutable component with the specifiedopen
.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 ofthis
immutable 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
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 hintvflex
- 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
-
-