|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A Table binder represets an array of objects (rows) that are the basis for a table model. This model will be bound to a service or another object.
A Table binder also exports an Object (from the IDataObject interface) that represents the selected object (row[selectedIndex]) in the visual table. Because of this, a ITableBinder can only be associated with a single visual table.
If the visual table is setup to allow multiple row selections, the selection object will be the first selected row.
| Nested Class Summary | |
static interface |
ITableBinder.SelectionChangedEvent
Notice of a change of selection in the ITableBinder's visual table. |
static interface |
ITableBinder.SelectionChangedListener
Listen for changes to the ITableBinder's selected object. |
| Field Summary |
| Fields inherited from interface jve.generated.IBoundObject |
DELIMITER, PROPERTY_OBJ_CHANGED |
| Method Summary | |
void |
addSelectionChangedListener(ITableBinder.SelectionChangedListener l)
Add a listener for table selection changes |
int |
getColumnCount()
Get the number of columns available for the table. |
java.lang.String |
getColumnName(int column)
Get the name of the given column. |
int |
getDataIndexFromVisualIndex(int index)
Get the index of the row data associated with this table binder that corresponds to the given index in the visual table. |
IFilterBinder |
getFilter()
Get the filter used by this table. |
int |
getRowCount()
Get the number of rows in the table. |
int |
getSelectedIndex()
This returns the index of the selected row in the visual table. |
java.lang.Object |
getSelectedObject()
Get the selected object for the currently selected row in the visual table. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Get the value of the given cell in the table. |
java.lang.Object |
getValueAt(int rowIndex,
java.lang.String property)
Get the value of the given property from the object at the given row (index in the array of objects.) |
int |
getVisualIndexFromDataIndex(int index)
Get the index of the visual table row that corresponds to the given index in the row data associated with this table binder. |
void |
removeSelectionChangedListener(ITableBinder.SelectionChangedListener l)
Remove an existing table selection listener |
void |
setFilter(IFilterBinder filter)
Set a filter to attatch to this table. |
| Methods inherited from interface jve.generated.IDataObject |
getValue, isPrimitive, isReadOnly, setValue |
| Methods inherited from interface jve.generated.IBoundObject |
actionPerformed, addPropertyChangeListener, getObject, getProperty, getSourceObject, getType, refresh, removePropertyChangeListener, setProperty, setSourceObject, setSourceObject |
| Method Detail |
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - the cell's rowcolumnIndex - the cell's column
public java.lang.Object getValueAt(int rowIndex,
java.lang.String property)
rowIndex - the index of the object in the arrayproperty - the property of the object
public java.lang.String getColumnName(int column)
column - the column index
public int getRowCount()
public int getColumnCount()
public int getSelectedIndex()
public java.lang.Object getSelectedObject()
public void addSelectionChangedListener(ITableBinder.SelectionChangedListener l)
l - the SelectionChangedListenerpublic void removeSelectionChangedListener(ITableBinder.SelectionChangedListener l)
l - the listener to removepublic void setFilter(IFilterBinder filter)
filter - the filter to use with this table.public IFilterBinder getFilter()
public int getDataIndexFromVisualIndex(int index)
index - the row index from the visual table
public int getVisualIndexFromDataIndex(int index)
index - the row index from the row data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||