public class MultipageModel
extends java.lang.Object
Constructor and Description |
---|
MultipageModel() |
Modifier and Type | Method and Description |
---|---|
void |
addPage(Page p)
Add a page to the document and notify page listeners.
|
void |
addPageListener(javax.swing.event.ListDataListener listener)
Add a page listener to this document.
|
Page |
getCurrentPage()
Get the current page.
|
Page |
getPage(int index)
Get the page at the given index.
|
Page |
getPage(java.lang.String title)
Get the page with the given title.
|
int |
getPageCount()
Get the number of pages in this document.
|
java.lang.String |
getTitle()
Return the title of this model
|
int |
indexOf(Page p)
Get the index of the given page. -1 if it is not known.
|
void |
insertPage(Page p,
int index)
Add a page to the document at the given index (between 0
and getPageCount()-1) and notify page listeners.
|
java.util.Iterator |
pages()
Return an iterator over all pages
|
void |
removePage(Page p)
Remove the given page from this document and notify listeners.
|
void |
removePageListener(javax.swing.event.ListDataListener listener)
Remove a page listener from this document.
|
void |
setCurrentPage(Page p)
Set the current page.
|
void |
setTitle(java.lang.String title)
Set the title of this model to the given title.
|
public void addPage(Page p)
public void insertPage(Page p, int index)
public void addPageListener(javax.swing.event.ListDataListener listener)
public Page getCurrentPage()
public Page getPage(int index)
public Page getPage(java.lang.String title)
public int getPageCount()
public java.lang.String getTitle()
public int indexOf(Page p)
public java.util.Iterator pages()
public void removePage(Page p)
public void removePageListener(javax.swing.event.ListDataListener listener)
public void setCurrentPage(Page p)
public void setTitle(java.lang.String title)