Interface Paginal

  • All Superinterfaces:
    Disable, Pageable
    All Known Implementing Classes:
    MeshElement.InternalPaging, Paging

    public interface Paginal
    extends Pageable, Disable
    Represents a component that is used to control how to display other components in multiple pages. In other words, it represents a paging controller.

    It is used to provide an abstract contract between controller and controllee. For example, Paging is a paging controller while Grid is a paging controllee. In other words, Grid (contains long content) can be controlled by Paging.

    The paging controller must implement this interface, while the paging controllee shall access only this interface (rather than Paging or so).

    Note: If a component supports multiple pages but it cannot be controlled by a paging controller, it shall implement Pageable instead. Example, Treechildren is Pageable but not controllable by Paginal.

    • Paginated: a multi-page component whose pagination is controlled by an external page controller (Paginal).
    • Paginal: the paging controller used to control the pagination of Paginated.
    • Pageable: a multi-page component that handles pagination by itself.
    Author:
    tomyeh
    See Also:
    Paginated
    • Method Detail

      • isAutohide

        boolean isAutohide()
        Returns whether to automatically hide the paging if there is only one page available.
        Since:
        7.0.1
      • setAutohide

        void setAutohide​(boolean autohide)
        Sets whether to automatically hide the paging if there is only one page available.
        Since:
        7.0.1
      • getTotalSize

        int getTotalSize()
        Returns the total number of items.
      • getPageIncrement

        int getPageIncrement()
        Returns the number of page anchors shall appear at the client.

        Default: 10.

      • isDetailed

        boolean isDetailed()
        Returns whether to show the detailed info, such as getTotalSize().
      • setDetailed

        void setDetailed​(boolean detailed)
        Sets whether to show the detailed info, such as getTotalSize().
      • addEventListener

        boolean addEventListener​(java.lang.String evtnm,
                                 EventListener<? extends Event> listener)
        Adds an event listener to specified event for this component. The second registration is ignored and false is returned.

        The onPaging event is sent with an instance of PagingEvent to notify which page is selected.

        Parameters:
        evtnm - what event to listen (never null)
        Returns:
        whether the listener is added; false if it was added before
        See Also:
        PagingEvent
      • removeEventListener

        boolean removeEventListener​(java.lang.String evtnm,
                                    EventListener<? extends Event> listener)
        Removes an event listener.
        Returns:
        whether the listener is removed; false if it was never added.