Interface ILayoutRegion<I extends ILayoutRegion>
-
- All Superinterfaces:
IComponent<I>
,IHtmlBasedComponent<I>
,IXulElement<I>
public interface ILayoutRegion<I extends ILayoutRegion> extends IXulElement<I>
ImmutableLayoutRegion
interfaceThis 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, theonOpen
action is sent to the application.onSize ActionData: SizeData
When a layout is resized by a user, theonSize
action is sent to the application..onSlide ActionData: SlideData
When a collapsed layout is slided (preview) by a user, theonSlide
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 Classes Modifier and Type Interface Description static class
ILayoutRegion.Border
Specifies the border toILayoutRegion
component.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
getBorder()
Returns the border.default java.lang.String
getMargins()
Returns the margins, which is a list of numbers separated by comma.default int
getMaxsize()
Returns the maximum size of the resizing component.default int
getMinsize()
Returns the minimum size of the resizing component.java.lang.String
getTitle()
Returns the title.default boolean
isAutoscroll()
Returns whether enable overflow scrolling.default boolean
isClosable()
Returns whether users can open or close the region.default boolean
isCollapsible()
Returns whether set the initial display to collapse.default boolean
isNativeScrollbar()
Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse
).default boolean
isOpen()
Returns whether it is open (i.e., not collapsed.default boolean
isSlidable()
Returns whether users can slide (preview) the region when clicked on a collapsed region.default boolean
isSlide()
Returns whether it is slide down.default boolean
isSplittable()
Returns whether enable the split functionality.I
withAutoscroll(boolean autoscroll)
Returns a copy ofthis
immutable component with the specifiedautoscroll
.I
withBorder(java.lang.String border)
Returns a copy ofthis
immutable component with the specifiedborder
.default I
withBorder(ILayoutRegion.Border border)
Returns a copy ofthis
immutable component with the specifiedborder
.I
withClosable(boolean closable)
Returns a copy ofthis
immutable component with the specifiedclosable
.I
withCollapsible(boolean collapsible)
Returns a copy ofthis
immutable component with the specifiedcollapsible
.I
withMargins(java.lang.String margins)
Returns a copy ofthis
immutable component with the specifiedmargins
.I
withMaxsize(int maxsize)
Returns a copy ofthis
immutable component with the specifiedmaxsize
.I
withMinsize(int minsize)
Returns a copy ofthis
immutable component with the specifiedminsize
.I
withNativeScrollbar(boolean nativeScrollbar)
Returns a copy ofthis
immutable component with the specifiednativeScrollbar
.I
withOpen(boolean open)
Returns a copy ofthis
immutable component with the specifiedopen
.I
withSlidable(boolean slidable)
Returns a copy ofthis
immutable component with the specifiedslidable
.I
withSlide(boolean slide)
Returns a copy ofthis
immutable component with the specifiedslidable
.I
withSplittable(boolean splittable)
Returns a copy ofthis
immutable component with the specifiedsplittable
.I
withTitle(java.lang.String title)
Returns a copy ofthis
immutable 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, 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
-
-
-
-
Method Detail
-
getTitle
@Nullable java.lang.String getTitle()
Returns the title.Default:
null
.
-
withTitle
I withTitle(@Nullable java.lang.String title)
Returns a copy ofthis
immutable 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
this
object
-
getBorder
default java.lang.String 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
I withBorder(java.lang.String border)
Returns a copy ofthis
immutable 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
this
object
-
withBorder
default I withBorder(ILayoutRegion.Border border)
Returns a copy ofthis
immutable component with the specifiedborder
.Sets the border with the given
border
.- Parameters:
border
- The border- Returns:
- A modified copy of the
this
object
-
isAutoscroll
default boolean isAutoscroll()
Returns whether enable overflow scrolling.Default:
false
.
-
withAutoscroll
I withAutoscroll(boolean autoscroll)
Returns a copy ofthis
immutable component with the specifiedautoscroll
.Sets whether enable overflow scrolling.
- Parameters:
autoscroll
- Whether enable overflow scrolling.- Returns:
- A modified copy of the
this
object
-
getMargins
default java.lang.String getMargins()
Returns the margins, which is a list of numbers separated by comma.Default: "0,0,0,0".
-
withMargins
I withMargins(java.lang.String margins)
Returns a copy ofthis
immutable 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
this
object
-
getMaxsize
default int getMaxsize()
Returns the maximum size of the resizing component.Default:
2000
.
-
withMaxsize
I withMaxsize(int maxsize)
Returns a copy ofthis
immutable 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
this
object
-
getMinsize
default int getMinsize()
Returns the minimum size of the resizing component.Default:
0
.
-
withMinsize
I withMinsize(int minsize)
Returns a copy ofthis
immutable 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
this
object
-
isSplittable
default boolean isSplittable()
Returns whether enable the split functionality.Default:
false
.
-
withSplittable
I withSplittable(boolean splittable)
Returns a copy ofthis
immutable component with the specifiedsplittable
.Sets whether enable the split functionality.
- Parameters:
splittable
- Whether enable the split functionality.- Returns:
- A modified copy of the
this
object
-
isCollapsible
default boolean isCollapsible()
Returns whether set the initial display to collapse.It only applied when
getTitle()
is not null.Default:
false
.
-
withCollapsible
I withCollapsible(boolean collapsible)
Returns a copy ofthis
immutable 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
this
object
-
isOpen
default boolean isOpen()
Returns whether it is open (i.e., not collapsed. Meaningful only ifisCollapsible()
is not false).Default:
true
.
-
withOpen
I withOpen(boolean open)
Returns a copy ofthis
immutable 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
this
object
-
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
I withSlidable(boolean slidable)
Returns a copy ofthis
immutable 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
this
object
-
isSlide
default boolean isSlide()
Returns whether it is slide down.Default:
false
.
-
withSlide
I withSlide(boolean slide)
Returns a copy ofthis
immutable 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
this
object
-
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
I withClosable(boolean closable)
Returns a copy ofthis
immutable 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
this
object
-
isNativeScrollbar
default boolean isNativeScrollbar()
Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse
).Default:
true
to use Browser's scrollbar, if the"org.zkoss.zul.nativebar"
library property is not set in zk.xml.
-
withNativeScrollbar
I withNativeScrollbar(boolean nativeScrollbar)
Returns a copy ofthis
immutable component with the specifiednativeScrollbar
.Sets to use Browser's scrollbar or a floating scrollbar
- Parameters:
nativeScrollbar
-true
to use Browser's scrollbar, orfalse
to use a floating scrollbar.Default:
true
.- Returns:
- A modified copy of the
this
object
-
-