public class MultipageModel
A document that contains a linear sequence of Pages.
This class is useful for documents which their data into logical
pages. Generally this class is most useful for partitioned documents
where all the partitions are stored together. For partitions that are
stored separately, it is probably easiest to just use separate documents.
Note that a page can contain any kind of data, and the
interpretation and graphical representation of a list of page is
up to the concrete document class and the corresponding
application. Other than containing a sequence of pages, this
class is used the same as AbstractDocument and provides the same abstract
Add a page to the document at the given index (between 0
and getPageCount()-1) and notify page listeners.
public void addPageListener(javax.swing.event.ListDataListener listener)
Add a page listener to this document. The page listener is
in fact a ListDataListener, which will be notified with
intervalAdded() and intervalRemoved() events when pages are
added or removed, and with a contentsChanged() event when the
current page is changed.
Remove the given page from this document and notify listeners.
If the removed page is the current page, change the current
page to the one after it, unless it was the last one, in which
case changed it to the one before, unless this was the last page,
in which case there is no selected page.
public void removePageListener(javax.swing.event.ListDataListener listener)