setContentProvider(new GenericTabContentProvider());
setLabelProvider(new GenericTabLabelProvider());
// Create Columns
TableColumn colonne;
TableSortSelectionListener listener;
for (int indice = 0; indice < _fd.getAttributList().size(); indice++)
{
int wicon = 0;
Attribut attr = _mapAttr[indice];
colonne = new TableColumn(tabFile, SWT.LEFT);
colonne.setText(attr.getName());
if (attr.getType() == AttrType.T_Image)
{
wicon = ((AttrImageChecker) attr.getChecker()).getIconSize();
if (wicon > _maxIconSize)
{
_maxIconSize = wicon;
}
}
colonne.setWidth(Math.max(attr.getColumnWidth(), wicon));
// Create sorter
listener = new TableSortSelectionListener(this, colonne, new GenericTabSorter(indice), SWT.UP, false);
// Initialise sort for 1st column
if (indice == 0)
{
listener.chooseColumnForSorting();
}
}
// Set the editors, cell modifier, and column properties
setColumnProperties(_columnProp);