Interface ILayoutRegion<I extends ILayoutRegion>

  • All Superinterfaces:
    IComponent<I>, IHtmlBasedComponent<I>, IXulElement<I>
    All Known Subinterfaces:
    ICenter<I>, IEast<I>, INorth<I>, ISouth<I>, IWest<I>

    public interface ILayoutRegion<I extends ILayoutRegion>
    extends IXulElement<I>
    Immutable 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
    • Method Detail

      • getTitle

        @Nullable
        java.lang.String getTitle()
        Returns the title.

        Default: null.

      • withTitle

        I withTitle​(@Nullable
                    java.lang.String title)
        Returns a copy of this immutable component with the specified title.

        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 of this immutable component with the specified border.

        Sets the border. Allowed values include none (default), and normal.

        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 of this immutable component with the specified border.

        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 of this immutable component with the specified autoscroll.

        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 of this immutable component with the specified margins.

        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 of this immutable component with the specified maxsize.

        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 of this immutable component with the specified minsize.

        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 of this immutable component with the specified splittable.

        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 of this immutable component with the specified collapsible.

        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 if isCollapsible() is not false).

        Default: true.

      • withOpen

        I withOpen​(boolean open)
        Returns a copy of this immutable component with the specified open.

        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 of this immutable component with the specified slidable.

        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 of this immutable component with the specified slidable.

        Sets whether slides down or up the region. Meaningful only if isCollapsible() is not false and isOpen() is false.

        Parameters:
        slide - Whether slides down or up the region

        Default: 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 of this immutable component with the specified closable.

        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 with false).

        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 of this immutable component with the specified nativeScrollbar.

        Sets to use Browser's scrollbar or a floating scrollbar

        Parameters:
        nativeScrollbar - true to use Browser's scrollbar, or false to use a floating scrollbar.

        Default: true.

        Returns:
        A modified copy of the this object