Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.
Zoyn edited this page Aug 27, 2018 · 1 revision

Pager

When we want to make a gui partition, we can use this util, see the code below

public static void main(String[] args) {
    List<Integer> list = new ArrayList<>();
    for (int i = 1; i <= 20; i++) {
        list.add(i);
    }
    ListPager<Integer> pager = Pagers.newListPager(3, list);
    System.out.println(pager.getPage(-1));
    System.out.println(pager.getPage(0));
    System.out.println(pager.getPage(1));
    System.out.println(pager.getPage(2));
}

The Output

[1, 2, 3]
[1, 2, 3]
[1, 2, 3]
[4, 5, 6]

BTW

More information can be found at ListPager and Pagers

This wiki hopes to help you!

没有中文教程...自己看代码吧..

Clone this wiki locally