|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.Row
com.sptci.echo2.table.TableNavigation<D>
D - The class of the model object displayed in the associated
table.public class TableNavigation<D>
A navigation component for displaying paging controls for a Table.
The following shows sample localisation of this class:
com.sptci.echo2.table.TableNavigation.resultsPerPage.options 10,25,50,100 com.sptci.echo2.table.TableNavigation.page.label Page com.sptci.echo2.table.TableNavigation.pageCount.label of com.sptci.echo2.table.TableNavigation.FirstPage.text First com.sptci.echo2.table.TableNavigation.FirstPage.tooltip Go to first page
© Copyright 2007 Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
protected class |
TableNavigation.FirstListener
The ActionListener for events
triggered by the button to go to the first page. |
protected class |
TableNavigation.LastListener
The ActionListener used to control the
navigation to the last available page. |
protected class |
TableNavigation.NextListener
The ActionListener for the control
used to navigation to the next page of data. |
protected class |
TableNavigation.PageSelectListener
The ActionListener for events
fired by the page select component. |
protected class |
TableNavigation.PreviousListener
The ActionListener for the control
used to navigate to the previous page. |
protected class |
TableNavigation.RowsPerPageListener
The ActionListener used to control
the number or rows displayed per page. |
| Field Summary | |
|---|---|
static int |
MINIMUM_PAGE_SIZE
The minimum number of rows to hold in a page. |
| Fields inherited from class nextapp.echo2.app.Row |
|---|
PROPERTY_ALIGNMENT, PROPERTY_BORDER, PROPERTY_CELL_SPACING, PROPERTY_INSETS |
| Constructor Summary | |
|---|---|
TableNavigation(PageableTableModel model)
Create a new instance of the navigation component using the specified table component. |
|
| Method Summary | |
|---|---|
protected void |
doLayout()
|
protected Button |
getButton(String name)
Create the button used to control navigation among the pages. |
protected ActionListener |
getListener(String name)
Return the ActionListener to use
for the specified name. |
PageableTableModel<D> |
getModel()
Return the model backing this navigation component. |
protected Label |
getPageCountLabel()
Create the label used to display the page count indicator to user. |
protected Label |
getPageLabel()
Create the label used to display the page indicator to user. |
protected SelectField |
getPageSelect()
Create a SelectField that displays all
the pages of data that are viewable by the user. |
protected Label |
getResultsPerPageLabel()
Create the label used to display the component used to control the number of items displayed on a page. |
protected SelectField |
getResultsPerPageSelect()
Create a SelectField that displays the
options for displaying number of rows on a page. |
void |
init()
Re-initialises all the controls for this component. |
protected void |
reset()
Reset the display of this component. |
void |
setCurrentPage(int page)
Set the page that is to be displayed. |
protected void |
setDisplayedPage(int page)
Set the page that is to be displayed. |
| Methods inherited from class nextapp.echo2.app.Row |
|---|
getAlignment, getBorder, getCellSpacing, getInsets, setAlignment, setBorder, setCellSpacing, setInsets |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MINIMUM_PAGE_SIZE
| Constructor Detail |
|---|
public TableNavigation(PageableTableModel model)
model - The model that is used as the backing
(model) for this navigation component.| Method Detail |
|---|
public void init()
init in class ComponentComponent.init(),
reset()protected void doLayout()
getButton(java.lang.String),
getResultsPerPageSelect(),
getPageLabel(),
getPageSelect(),
getPageCountLabel()protected void reset()
public PageableTableModel<D> getModel()
public void setCurrentPage(int page)
model
to display the specified page of data.
page - The number of the page that is to be displayed.setDisplayedPage(int)protected void setDisplayedPage(int page)
model. Updates only the value selected in pageSelect.
page - The number of the page that is to be displayed.protected SelectField getPageSelect()
SelectField that displays all
the pages of data that are viewable by the user.
protected Label getPageLabel()
com.sptci.echo2.table.TableNavigation.page.label
key.
protected Label getPageCountLabel()
com.sptci.echo2.table.TableNavigation.pageCount.label
key.
protected Button getButton(String name)
com.sptci.echo2.table.TableNavigation.<name>Page.text
com.sptci.echo2.table.TableNavigation.<name>Page.tooltip
keys.
name - The name to use to identify the button being created.
getListener(java.lang.String)protected Label getResultsPerPageLabel()
com.sptci.echo2.table.TableNavigation.resultsPerPage.label
key.
protected SelectField getResultsPerPageSelect()
SelectField that displays the
options for displaying number of rows on a page.
protected ActionListener getListener(String name)
throws RuntimeException
ActionListener to use
for the specified name. The listeners are used to navigate between
the pages.
name - The name to use to create the listener.
RuntimeException - If errors are encountered while fetching
or initialising the Constructor for the
action listener via reflection.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||