A {@link com.amazon.kindle.kindlet.ui.pages.PageModel} provides access to the data to be paged. Each item in the model has a location. Locations are never split over multiple pages - they represent the finest level of granularity for the page model. For instance, if each location contains a paragraph, the paragraph could never be split over two pages. On the other hand, if each location corresponds to a word, the paragraphs could be easily split.
It is common for a PageModel to be backed by an in-memory list, so that each object (image, text message, email, etc.) is stored in the list and intended to be displayed in a page. The PageModels class provides a convenience adapter for Java List instances.
A {@link com.amazon.kindle.kindlet.ui.pages.PageProvider} is responsible for iterating over the page model and building the next page of content. Each page is returned to the page container as a single component (commonly a Container). The page provider has complete flexibility in how it builds this page and how it assigns items from the model to components. Some examples:
The {@link com.amazon.kindle.kindlet.ui.pages.PageProviders} class provides default page providers that arrange items into a Container using a common AWT layout. These allow the developer to quickly organize a series of data items into pages of boxes (KBoxLayout), grids (GridLayout), full pages (BorderLayout) or flows (FlowLayout).
For instance, a common Kindle experience is a vertical list of items. This can be created by using a KPagedContainer and {@link com.amazon.kindle.kindlet.ui.pages.PageProviders#createKBoxLayoutProvider(int)}.
A {@link com.amazon.kindle.kindlet.ui.pages.ComponentProvider} is used by the providers created with PageProviders to convert the Object at a given location into a Component that can be displayed in the page.
Although the default page providers all map objects one-to-one with components, this is not a requirement. Custom page providers are free to maps objects to components in whatever way they see fit. For instance, a PageModel that iterates over text may generate only a single component for a full page for more efficient rendering.
@since 1.0