|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.bibalex.daf.handlers.dbhandler.DataTable
org.bibalex.daf.commongui.datamodels.UIListModel
public class UIListModel
A Data Model Class used with JLists, it also extends DataTable. It acts as a transformation layer to display DataTable values into a JList. We do not recommend using this class with editable data (add or remove entries dynamically) as this functionality was not tested properly. For such purposes use the UIListEditableModel instead.
| Field Summary | |
|---|---|
protected int |
colID
The index of the Column in the DataTable considered as ID. |
protected int |
colVisisble
The index of the Column in the DataTable to be displayed in the List. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
UIListModel(DataTable dataTable,
int colID,
int colVisible)
Constructor (1). |
|
UIListModel(int colID,
int colVisible)
Constructor (2). |
|
| Method Summary | |
|---|---|
void |
addElement(int elementID,
java.lang.String elementValue)
Adds an element to the list. |
void |
addListDataListener(javax.swing.event.ListDataListener l)
(not implemented) |
java.lang.Object |
getElementAt(int index)
Retreives the element at the specified index. |
int |
getIDAt(int index)
Retreives the ID of the element at the given index. |
int |
getSize()
Retrieves the List items count. |
void |
removeElementAt(int index)
Removes an element from the list. |
void |
removeListDataListener(javax.swing.event.ListDataListener l)
(not implemented) |
| Methods inherited from class org.bibalex.daf.handlers.dbhandler.DataTable |
|---|
addRow, addRow, addRowAt, addRowAt, deleteRow, elementAt, elementAt, ExportToExcel, getColumnCount, getColumnName, getDynamicColumnIndices, getNameOfColumn, getNoOfColumns, getNoOfRows, getRow, getRowCount, getValueAt, setArchivingMatrix, setDynamicColumnIndices, setDynamicTable, setNameOfColumn, setNoOfColumn, setValueAt |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int colID
protected int colVisisble
| Constructor Detail |
|---|
public UIListModel(DataTable dataTable,
int colID,
int colVisible)
dataTable - The DataTable to extract the data from.colID - The index of the column indicating the ID in the DataTable.colVisible - The index of the column to be displayed on the list from the DataTable.
public UIListModel(int colID,
int colVisible)
colID - The index of the column indicating the ID in the DataTable.colVisible - The index of the column to be displayed on the list from the DataTable.| Method Detail |
|---|
public int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModelindex - The index of the Element to retreive.
public void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener in interface javax.swing.ListModell - public void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener in interface javax.swing.ListModell - public int getIDAt(int index)
index - The index to get the ID for.
public void removeElementAt(int index)
index - The index of the element in the list.
public void addElement(int elementID,
java.lang.String elementValue)
elementID - The ID of the added element.elementValue - The displayed value of the added element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||