|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--util.swing.AbstractTableModel | +--data.swing.CatalogTableModel
A TableModel
that models the contents of a Catalog
.
Field Summary | |
protected Catalog |
m_cModel
The Catalog that is being modelled. |
protected Comparator |
m_cmpComparator
The Comparator that defines the sorting order of records in the model. |
protected DataBasket |
m_dbBasket
The DataBasket used to determine visibility. |
protected List |
m_lKeys
The internal model. |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
CatalogTableModel(Catalog c,
DataBasket db,
Comparator cmp,
TableEntryDescriptor ted)
Create a new CatalogTableModel. |
Method Summary | |
void |
addedCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
canEditCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
canRemoveCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
protected void |
checkAdd(CatalogItem ci)
Internal helper method. |
protected void |
checkRemove(CatalogItem ci)
Internal helper method. |
protected void |
checkUpdate(CatalogItem ci)
Internal helper method. |
void |
commitedAddCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
commitEditCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
commitedRemoveCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
editingCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
Object |
getRecord(int row)
Get the record at the given index. |
int |
getRowCount()
Get the number of records in this model. |
void |
noEditCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
noRemoveCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
propertyChange(PropertyChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
removedCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
rollbackEditCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
rolledbackAddCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
rolledbackRemoveCatalogItem(CatalogChangeEvent e)
Update the internal model and inform any listeners according to the received event. |
void |
subscribe()
Subscribe as a listener to the model. |
void |
unsubscribe()
Un-Subscribe as a listener from the model. |
void |
updateModel()
Update the internal model based on the modelled Catalog . |
Methods inherited from class util.swing.AbstractTableModel |
getColumnClass,
getColumnCount,
getColumnName,
getEntryDescriptor,
getValueAt,
isCellEditable,
orderByColumn,
reOrderBy,
setValueAt |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener,
findColumn,
fireTableCellUpdated,
fireTableChanged,
fireTableDataChanged,
fireTableRowsDeleted,
fireTableRowsInserted,
fireTableRowsUpdated,
fireTableStructureChanged,
getListeners,
removeTableModelListener |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected DataBasket m_dbBasket
protected Catalog m_cModel
protected Comparator m_cmpComparator
protected List m_lKeys
Constructor Detail |
public CatalogTableModel(Catalog c, DataBasket db, Comparator cmp, TableEntryDescriptor ted)
c
- the Catalog to be modelled. May be filtered.db
- the DataBasket to be used to determine visibility.cmp
- a Comparator defining the sort order of the records. If null
, records are ordered
according to the natural ordering of the CatalogItems.ted
- a TableEntryDescriptor that can split individual CatalogItems into a table's cells.Method Detail |
public Object getRecord(int row)
row
- the index for which to retrieve the record. Element of [0, getRowCount()
).CatalogItem
to be displayed at the given index. May return null
if
either there is no record at the indicated position or an exception occurs.public int getRowCount()
public void subscribe()
Catalog
is a ListenableCatalog
,
subscribe as a listener.public void unsubscribe()
Catalog
is a ListenableCatalog
,
un-subscribe as a listener.public void updateModel()
Catalog
.public void addedCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void commitedAddCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void rolledbackAddCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void canRemoveCatalogItem(CatalogChangeEvent e) throws VetoException
This method is public as an implementation detail and must not be called directly.
public void noRemoveCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void removedCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void commitedRemoveCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void rolledbackRemoveCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void canEditCatalogItem(CatalogChangeEvent e) throws VetoException
This method is public as an implementation detail and must not be called directly.
public void noEditCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void editingCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void commitEditCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void rollbackEditCatalogItem(CatalogChangeEvent e)
This method is public as an implementation detail and must not be called directly.
public void propertyChange(PropertyChangeEvent e)
This method is public as an implementation detail and must not be called directly.
protected void checkAdd(CatalogItem ci)
ci
- the added CatalogItemprotected void checkRemove(CatalogItem ci)
ci
- the removed CatalogItemprotected void checkUpdate(CatalogItem ci)
ci
- the updated CatalogItem
|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |