|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.Component
nextapp.echo.app.Table
com.sptci.echo.table.Table<D>
D - The class of the model object displayed in the table.public class Table<D>
A genericised Table used to display instances
of objects of the type specified.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
protected class |
Table.DefaultActionListener
The default ActionListener for the
table. |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
protected |
Table()
Default constructor. |
|
Table(TableModel<D> model)
Create a new table using the specified model for its data. |
| Method Summary | |
|---|---|
void |
addRow(D row)
Add the specified object to the end of the backing table model. |
void |
addSelectionListener(SelectionListener<D,? extends Table> listener)
Adds a selection listener to be notified of row selections. |
void |
deleteRow(D rowData)
Delete the row(s) containing the specified object from the model. |
void |
deleteRow(int row)
Delete the specified row from the model. |
protected TableNavigation |
fetchNavigation(Component parent)
Returns the associated TableNavigation component for this
table. |
protected void |
fireRowSelection()
Notifies configured SelectionListener of row selections. |
TableModel<D> |
getModel()
Over-ridden to return a properly type-cast model. |
void |
init()
Life-cyle method invoked when the component is added to the component hierarchy. |
void |
insertRow(int row,
D rowData)
Insert the specified object at the specified row index into the backing table model. |
void |
removeSelectionListener(SelectionListener<D,? extends Table> listener)
Remove a selection listener from being notified of row selections. |
void |
setModel(TableModel model)
Over-ridden to only allow instances of TableModel. |
protected void |
updateNavigation()
Updates the associated TableNavigation component for this
table. |
void |
updateRow(int row,
D rowData)
Replace the row specified with the object specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Table()
public Table(TableModel<D> model)
model - The underlying data model to use for the table.| Method Detail |
|---|
public void init()
init in class Componentpublic void addSelectionListener(SelectionListener<D,? extends Table> listener)
listener - The listener to add.Component.getEventListenerList()public void removeSelectionListener(SelectionListener<D,? extends Table> listener)
listener - The listener to remove.public void setModel(TableModel model)
TableModel.
setModel in class Tablemodel - The table model to use for this component.
IllegalArgumentException - If the specified table mode is not
an instance of TableModel.public TableModel<D> getModel()
getModel in class Tablepublic void addRow(D row)
ListSelectionModel may be
affected through this method only.
row - The data object that is to be added to the model.TableModel.addRow(Object),
updateNavigation()
public void insertRow(int row,
D rowData)
ListSelectionModel may be
affected through this method only.
row - The index at which the object is to be inserted.rowData - The object that is to be added to the model.TableModel.insertRow(int, D),
updateNavigation()public void deleteRow(int row)
ListSelectionModel may be affected through
this method only.
row - The index of the row that is to be deleted.TableModel.deleteRow( int ),
updateNavigation()public void deleteRow(D rowData)
ListSelectionModel may be affected
through this method only.
rowData - The object that is to be removed.deleteRow( int )
public void updateRow(int row,
D rowData)
ListSelectionModel may be affected
through this method only.
row - The index at which the object is to be updated.rowData - The new object that is to be used in the model.TableModel.updateRow(int, D)protected void fireRowSelection()
SelectionListener of row selections.
protected void updateNavigation()
TableNavigation component for this
table.
fetchNavigation( Component )protected TableNavigation fetchNavigation(Component parent)
TableNavigation component for this
table.
parent - The component whose children are to iterated over.
null.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||