public interface IViewerCanvas
extends com.elixirtech.ui.INavigation
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener cl)
Register interest in changes to the viewer.
|
javax.swing.JComponent |
getCanvasComponent()
Get the component that shows the view.
|
int |
getPageCount()
Get the number of pages in the model
|
int |
getPageNo()
Get the current page number
|
void |
read(java.io.File f)
Read the model from a file
|
void |
read(java.io.InputStream is)
Read the model from a stream
|
void |
removeChangeListener(javax.swing.event.ChangeListener cl)
Remove the change listener
|
void |
setObject(java.lang.Object o)
Set an object as the model for the viewer.
|
void |
setPageNo(int no)
Show a specific page (in the range 1<=no<=getPageCount())
|
void |
update()
Recalculates the dimensions of the view and repaints.
|
void addChangeListener(javax.swing.event.ChangeListener cl)
cl - The change listenervoid removeChangeListener(javax.swing.event.ChangeListener cl)
cl - The change listenervoid setObject(java.lang.Object o)
o - The object to viewvoid read(java.io.File f) throws java.io.IOException
f - The file to readjava.io.IOException - if the file is invalid for this viewer, or doesn't existvoid read(java.io.InputStream is) throws java.io.IOException
is - The input streamjava.io.IOException - if the stream is invalid for this viewervoid update()
int getPageCount()
getPageCount in interface com.elixirtech.ui.INavigationvoid setPageNo(int no)
no - The page to show (1-based)int getPageNo()
getPageNo in interface com.elixirtech.ui.INavigationjavax.swing.JComponent getCanvasComponent()