Interface ISplitlayout<I extends IAnyGroup>

    • 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 interface IComponent<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 of this immutable component with the specified widths.

        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 widths

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

        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 heights

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

        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 widths

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

        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 widths

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

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

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

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

        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 if getCollapse() is not "none".
      • withOpen

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

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

        Sets resizable of the splitter

        Parameters:
        resizable - Whether to enable resizable of the splitter

        Default: true.

        Returns:
        A modified copy of the this object
      • of

        static <I extends IAnyGroupISplitlayout<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 IAnyGroupISplitlayout<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 IAnyGroupISplitlayout<I> ofFlex​(java.lang.String hflex,
                                                            java.lang.String vflex)
        Returns the instance with the given vflex and hflex
        Parameters:
        hflex - The horizontal flex hint
        vflex - The vertical flex hint
      • ofId

        static <I extends IAnyGroupISplitlayout<I> ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component