|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IViewerCanvas
IViewerCanvas is the viewing interface for graphical data. Implementations will support the reading and display of data that conforms to a specific mime type. The model (the data to be viewed) may be loaded from an object, a file or a stream. This is a paged viewer, so each model may contain more than one page and the interface allows a navigator to control what page is shown.
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface com.elixirtech.ui.INavigation |
|---|
first, gotoPage, last, next, previous |
| Method Detail |
|---|
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 view
void read(java.io.File f)
throws java.io.IOException
f - The file to read
java.io.IOException - if the file is invalid for this viewer, or doesn't exist
void read(java.io.InputStream is)
throws java.io.IOException
is - The input stream
java.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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||