lists.add(list);
tables.add(table);
table.setModel(new HostInstallTableModel(list, getInstallHeaders(), getInstallClassTypes()));
table.setTableHeader(new TooltipTableHeader(table.getColumnModel(), headerTooltips));
JTableHeader header = table.getTableHeader();
final SortedColumnHeaderRenderer headerRenderer = new SortedColumnHeaderRenderer(
header,
getImageIcon("columns.sorted.asc"),
getImageIcon("columns.sorted.desc"));
for (int col = 0; col < table.getColumnCount(); col++) {
table.getColumnModel().getColumn(col).setHeaderRenderer(headerRenderer);
}
table.getColumn(getLabel("column.progress.label")).setCellRenderer(new StateCellRenderer());
table.getColumn(getLabel("column.log.label")).setCellRenderer(new LogButtonCellRenderer(getLabel("cell.log.label"), getLabel("cell.nolog.label")));
table.getColumn(getLabel("column.log.label")).setCellEditor(new LogButtonCellEditor(getLabel("cell.log.label")));
// 6786350 - gui-installer: when moving columns the sorting stays in the column index not on the column ifself
table.getColumnModel().addColumnModelListener(new TableColumnModelListener() {
public void columnAdded(TableColumnModelEvent e) {}
public void columnRemoved(TableColumnModelEvent e) {}
public void columnMoved(TableColumnModelEvent e) {
headerRenderer.setPressedColumn(e.getToIndex());
headerRenderer.setSelectedColumn(e.getToIndex(), headerRenderer.getSelectedColumnState());
}
public void columnMarginChanged(ChangeEvent e) {}
public void columnSelectionChanged(ListSelectionEvent e) {}
});
header.addMouseListener(new TableHeaderListener(header, headerRenderer));
table.getModel().addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
HostPanel.this.tableChanged();