net.sourceforge.toscanaj.dbviewer
Class PagingDatabaseViewer

java.lang.Object
  extended bynet.sourceforge.toscanaj.dbviewer.PagingDatabaseViewer
All Implemented Interfaces:
DatabaseViewer
Direct Known Subclasses:
BarChartDatabaseViewer, InfoDatabaseViewer, SimpleDatabaseViewer

public abstract class PagingDatabaseViewer
extends java.lang.Object
implements DatabaseViewer

This abstract class gives a framework for implementing database viewers with paging buttons. If a specific database viewer can handle only one item at a time, this class can be used to add a set of buttons to navigate through the items given. These buttons implement going to the first, previous, next and last item. In addition a label shows the current position and the total number of items. To use this class derive from it and implement the two abstract methods. The getPanel() method has to return the Swing component used in your viewer, while the showItem(String) should cause your viewer to show the item for the specific object key given. See the documentation of DatabaseViewer about getting the table and object key information.


Nested Class Summary
protected static interface PagingDatabaseViewer.PageViewPanel
           
 
Constructor Summary
PagingDatabaseViewer()
           
 
Method Summary
protected abstract  PagingDatabaseViewer.PageViewPanel createPanel()
           
protected  DatabaseViewerManager getManager()
           
 void initialize(DatabaseViewerManager manager)
           
 void showView(java.lang.String whereClause)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagingDatabaseViewer

public PagingDatabaseViewer()
Method Detail

createPanel

protected abstract PagingDatabaseViewer.PageViewPanel createPanel()
                                                           throws DatabaseViewerException
Throws:
DatabaseViewerException

getManager

protected DatabaseViewerManager getManager()

initialize

public void initialize(DatabaseViewerManager manager)
Specified by:
initialize in interface DatabaseViewer

showView

public final void showView(java.lang.String whereClause)
                    throws DatabaseViewerException
Specified by:
showView in interface DatabaseViewer
Throws:
DatabaseViewerException


The ToscanaJ project