-
- 所有已知实现类:
-
Book
public interface PageablePageable实现代表一组要打印的页面。Pageable对象返回集合中的总页数以及指定页面的PageFormat和Printable。- 另请参见:
-
PageFormat,Printable
-
-
Field Summary
Fields Modifier and Type Field 描述 static intUNKNOWN_NUMBER_OF_PAGES如果Pageable实现不知道其集合中的页数,则该常量将从getNumberOfPages方法返回。
-
方法摘要
所有方法 接口方法 抽象方法 Modifier and Type 方法 描述 intgetNumberOfPages()返回集合中的页数。PageFormatgetPageFormat(int pageIndex)返回PageFormat指定页面的pageIndex。PrintablegetPrintable(int pageIndex)返回Printable实例,负责渲染由pageIndex指定的pageIndex。
-
-
-
字段详细信息
-
UNKNOWN_NUMBER_OF_PAGES
@Native static final int UNKNOWN_NUMBER_OF_PAGES
如果一个Pageable实现不知道其集合中的页数,则该常量将从getNumberOfPages方法返回。- 另请参见:
- Constant Field Values
-
-
方法详细信息
-
getNumberOfPages
int getNumberOfPages()
返回集合中的页数。 要启用高级打印功能,建议Pageable实现返回真实的页数,而不是UNKNOWN_NUMBER_OF_PAGES常量。- 结果
-
这个
Pageable的页数。
-
getPageFormat
PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
返回PageFormat指定页面的pageIndex。- 参数
-
pageIndex- 正在请求PageFormat的页面的零PageFormat - 结果
-
PageFormat描述了大小和方向。 - 异常
-
IndexOutOfBoundsException- 如果Pageable不包含请求的页面。
-
getPrintable
Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException
返回Printable实例,负责渲染由pageIndex指定的pageIndex。- 参数
-
pageIndex- 正在请求Printable的页面的零Printable - 结果
-
Printable呈现页面。 - 异常
-
IndexOutOfBoundsException- if thePageabledoes not contain the requested page.
-
-