D - The class of the model object displayed in the associated
table.public class TableNavigation<D> extends Row
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.
| Modifier and Type | Class and Description |
|---|---|
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. |
| Modifier and Type | Field and Description |
|---|---|
static int |
MINIMUM_PAGE_SIZE
The minimum number of rows to hold in a page.
|
PROPERTY_ALIGNMENT, PROPERTY_BORDER, PROPERTY_CELL_SPACING, PROPERTY_INSETSCHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY| Constructor and Description |
|---|
TableNavigation(PageableTableModel model)
Create a new instance of the navigation component using the specified
table component.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getAlignment, getBorder, getCellSpacing, getInsets, setAlignment, setBorder, setCellSpacing, setInsetsadd, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOfpublic static final int MINIMUM_PAGE_SIZE
public TableNavigation(PageableTableModel model)
model - The model that is used as the backing
(model) for this navigation component.public void init()
init in class ComponentComponent.init(),
reset()protected void doLayout()
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.