Interface IScrollview<I extends IAnyGroup>

  • All Superinterfaces:
    IAnyGroup<IScrollview<I>>, IChildable<IScrollview<I>,​I>, IComponent<IScrollview<I>>, IHtmlBasedComponent<IScrollview<I>>, IXulElement<IScrollview<I>>

    public interface IScrollview<I extends IAnyGroup>
    extends IXulElement<IScrollview<I>>, IAnyGroup<IScrollview<I>>, IChildable<IScrollview<I>,​I>
    Immutable Scrollview component

    A container that can scroll containing elements on touch devices.

    Note: if using this component not in touch devices, it will treat as a simple DIV element, no functions at all.

    Support @Action

    Name Action Type
    onScroll ActionData: ScrollData
    In mobile devices: Denotes that the content of a scrollable component has been scrolled by the user. Notice that you can check if it is scrolled outside/inside boundaries by invoking getOutOfBound method in the ScrollEvent.
    In desktop: This action will be triggered when users scroll all the way to the top or to the end of the page.
    onScrolling ActionData: ScrollData
    Denotes that the user is scrolling a scrollable component.
    Author:
    katherine
    See Also:
    Scrollview
    • Field Detail

      • DEFAULT

        static final IScrollview<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.Scrollview"

        Specified by:
        getWidgetClass in interface IComponent<I extends IAnyGroup>
      • getOrient

        default java.lang.String getOrient()
        Returns current orient (horizontal or vertical).

        Default: "vertical"

      • withOrient

        IScrollview<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 IScrollview<I> withOrient​(IScrollview.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
      • of

        static <I extends IAnyGroupIScrollview<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 IAnyGroupIScrollview<I> of​(I... children)
        Returns the instance with the given any group children.
        Parameters:
        children - The children belong to any group
        See Also:
        IAnyGroup
      • ofSize

        static <I extends IAnyGroupIScrollview<I> ofSize​(java.lang.String width,
                                                           java.lang.String height)
        Returns the instance with the given size, width and height.
        Parameters:
        width - The width of the component
        height - The height of the component
      • ofId

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