Interface ILayoutRegion<I extends ILayoutRegion>
- All Superinterfaces:
IComponent<I>,IHtmlBasedComponent<I>,IXulElement<I>
LayoutRegion interface
This class represents a region in a layout manager.
Support @Action
| Name | Action Type |
|---|---|
| onOpen | ActionData: OpenData
When a layout is collapsed or opened by a user, the onOpen
action is sent to the application. |
| onSize | ActionData: SizeData
When a layout is resized by a user, the onSize action is sent to the application.. |
| onSlide | ActionData: SlideData
When a collapsed layout is slided (preview) by a user, the onSlide action is sent to the application. |
Support Application Library Properties
-
To set to use Browser's scrollbar or not, you have to specify
withNativeScrollbar(boolean).Or configure it from zk.xml by setting library properties. For example,
<library-property/> <name>org.zkoss.zul.nativebar</name/> <value>false</value/> </library-property/>
- Author:
- katherine
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies the border toILayoutRegioncomponent. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the border.default StringReturns the margins, which is a list of numbers separated by comma.default intReturns the maximum size of the resizing component.default intReturns the minimum size of the resizing component.getTitle()Returns the title.default booleanReturns whether enable overflow scrolling.default booleanReturns whether users can open or close the region.default booleanReturns whether set the initial display to collapse.default booleanReturns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanisOpen()Returns whether it is open (i.e., not collapsed.default booleanReturns whether users can slide (preview) the region when clicked on a collapsed region.default booleanisSlide()Returns whether it is slide down.default booleanReturns whether enable the split functionality.withAutoscroll(boolean autoscroll) Returns a copy ofthisimmutable component with the specifiedautoscroll.withBorder(String border) Returns a copy ofthisimmutable component with the specifiedborder.default IwithBorder(ILayoutRegion.Border border) Returns a copy ofthisimmutable component with the specifiedborder.withClosable(boolean closable) Returns a copy ofthisimmutable component with the specifiedclosable.withCollapsible(boolean collapsible) Returns a copy ofthisimmutable component with the specifiedcollapsible.withMargins(String margins) Returns a copy ofthisimmutable component with the specifiedmargins.withMaxsize(int maxsize) Returns a copy ofthisimmutable component with the specifiedmaxsize.withMinsize(int minsize) Returns a copy ofthisimmutable component with the specifiedminsize.withNativeScrollbar(boolean nativeScrollbar) Returns a copy ofthisimmutable component with the specifiednativeScrollbar.withOpen(boolean open) Returns a copy ofthisimmutable component with the specifiedopen.withSlidable(boolean slidable) Returns a copy ofthisimmutable component with the specifiedslidable.withSlide(boolean slide) Returns a copy ofthisimmutable component with the specifiedslidable.withSplittable(boolean splittable) Returns a copy ofthisimmutable component with the specifiedsplittable.Returns a copy ofthisimmutable component with the specifiedtitle.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, 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
-
Method Details
-
getTitle
Returns the title.Default:
null. -
withTitle
Returns a copy ofthisimmutable component with the specifiedtitle.Sets the title of this component.
- Parameters:
title- The title of this component.Default:
null(empty).- Returns:
- A modified copy of the
thisobject
-
getBorder
Returns the border.The border actually controls what CSS class to use: If border is null, it implies
"none".If you also specify the CSS class (
IHtmlBasedComponent.withSclass(java.lang.String)), it overwrites whatever border you specify here.Default:
"normal". -
withBorder
Returns a copy ofthisimmutable component with the specifiedborder.Sets the border. Allowed values include
none(default), andnormal.- Parameters:
border- the border. If null,"0"or"false","none"is assumed.- Returns:
- A modified copy of the
thisobject
-
withBorder
Returns a copy ofthisimmutable component with the specifiedborder.Sets the border with the given
border.- Parameters:
border- The border- Returns:
- A modified copy of the
thisobject
-
isAutoscroll
default boolean isAutoscroll()Returns whether enable overflow scrolling.Default:
false. -
withAutoscroll
Returns a copy ofthisimmutable component with the specifiedautoscroll.Sets whether enable overflow scrolling.
- Parameters:
autoscroll- Whether enable overflow scrolling.- Returns:
- A modified copy of the
thisobject
-
getMargins
Returns the margins, which is a list of numbers separated by comma.Default: "0,0,0,0".
-
withMargins
Returns a copy ofthisimmutable component with the specifiedmargins.Sets margins for the element "0,1,2,3" that direction is "top,left,right,bottom"
- Parameters:
margins- The margins of the region.- Returns:
- A modified copy of the
thisobject
-
getMaxsize
default int getMaxsize()Returns the maximum size of the resizing component.Default:
2000. -
withMaxsize
Returns a copy ofthisimmutable component with the specifiedmaxsize.Sets the maximum size of the resizing component.
- Parameters:
maxsize- The maximum size of the resizing component.- Returns:
- A modified copy of the
thisobject
-
getMinsize
default int getMinsize()Returns the minimum size of the resizing component.Default:
0. -
withMinsize
Returns a copy ofthisimmutable component with the specifiedminsize.Sets the minimum size of the resizing component.
- Parameters:
minsize- The minimum size of the resizing component.- Returns:
- A modified copy of the
thisobject
-
isSplittable
default boolean isSplittable()Returns whether enable the split functionality.Default:
false. -
withSplittable
Returns a copy ofthisimmutable component with the specifiedsplittable.Sets whether enable the split functionality.
- Parameters:
splittable- Whether enable the split functionality.- Returns:
- A modified copy of the
thisobject
-
isCollapsible
default boolean isCollapsible()Returns whether set the initial display to collapse.It only applied when
getTitle()is not null.Default:
false. -
withCollapsible
Returns a copy ofthisimmutable component with the specifiedcollapsible.Sets whether set the initial display to collapse.
It only applied when
getTitle()is not null.- Parameters:
collapsible- Whether set the initial display to collapse.- Returns:
- A modified copy of the
thisobject
-
isOpen
default boolean isOpen()Returns whether it is open (i.e., not collapsed. Meaningful only ifisCollapsible()is not false).Default:
true. -
withOpen
Returns a copy ofthisimmutable component with the specifiedopen.Sets whether it is open (i.e., not collapsed. Meaningful only if
isCollapsible()is not false).- Parameters:
open- Whether to open.- Returns:
- A modified copy of the
thisobject
-
isSlidable
default boolean isSlidable()Returns whether users can slide (preview) the region when clicked on a collapsed region. In other words, if false, clicking on a collapsed region will open it instead of sliding.Default:
true. -
withSlidable
Returns a copy ofthisimmutable component with the specifiedslidable.Sets whether users can slide (preview) the region when clicked on a collapsed region. In other words, if false, clicking on a collapsed region will open it instead of sliding.
- Parameters:
slidable- Whether users can slide this region.Default:
true.- Returns:
- A modified copy of the
thisobject
-
isSlide
default boolean isSlide()Returns whether it is slide down.Default:
false. -
withSlide
Returns a copy ofthisimmutable component with the specifiedslidable.Sets whether slides down or up the region. Meaningful only if
isCollapsible()is not false andisOpen()is false.- Parameters:
slide- Whether slides down or up the regionDefault:
false.- Returns:
- A modified copy of the
thisobject
-
isClosable
default boolean isClosable()Returns whether users can open or close the region. In other words, if false, users are no longer allowed to change the open status (by clicking the button on the bar).Default:
true. -
withClosable
Returns a copy ofthisimmutable component with the specifiedclosable.Sets whether users can open or close the region.
- Parameters:
closable- Whether users can open or close the region.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
-