|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel org.bibalex.daf.handlers.dbhandler.DataTable org.bibalex.daf.commongui.datamodels.UICheckList
public class UICheckList
This class holds a DataModel used in CheckBoxList, the data is retrieved from a DataTable. It supports 2 schemes. The 1st is to add a DataTable that doesn't define an IsSelected Column. This scheme stores the selection into a separete boolean array, and the other scheme is to define a specific column that indicates if the item is selected or not.
Field Summary | |
---|---|
protected int |
colID
The Column that represents the ID in the DataTable. |
protected int |
colSelected
The column that defines if the Item is selected or not. |
protected int |
colVisible
The Column to be displayed in the list. |
protected boolean[] |
isSelected
A boolean array to save selection in case of 1st scheme. |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
UICheckList(DataTable dataTable,
int colID,
int colVisible)
Constructor. |
|
UICheckList(DataTable dataTable,
int colID,
int colVisible,
int colSelected)
Constructor. |
Method Summary | |
---|---|
java.util.Vector |
getCheckBoxVector()
Retreives a vector containing all the CheckBoxes in the list. |
int |
getIDAt(int index)
Retreives the DB ID at the given index. |
boolean |
isSelected(int index)
Retreives the status of a given index, either it is selected or not. |
void |
setSelected(int index,
boolean isSelected)
Sets a specific CheckBox in the list to be either selected or not. |
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 colVisible
protected int colSelected
protected boolean[] isSelected
Constructor Detail |
---|
public UICheckList(DataTable dataTable, int colID, int colVisible)
dataTable
- The DataTable to extract data from.colID
- The Column that represents the ID in the DataTable.colVisible
- The Column to be displayed in the list.public UICheckList(DataTable dataTable, int colID, int colVisible, int colSelected)
dataTable
- The DataTable to extract data from.colID
- The Column that represents the ID in the DataTable.colVisible
- The Column to be displayed in the list.colSelected
- The column that defines if the Item is selected or not.Method Detail |
---|
public java.util.Vector getCheckBoxVector()
public void setSelected(int index, boolean isSelected)
index
- The index of the item in the List.isSelected
- true if selected, false otherwise.public boolean isSelected(int index)
index
- The index of the item in question.
public int getIDAt(int index)
index
- The index of the item in question.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |