treeTable.scrollRectToVisible(treeTable.getCellRect(row, 0, true));
}
private TableColumnModel createFlatColumnModel() {
DefaultTableColumnModel result = new DefaultTableColumnModel();
int extraWidth = 0;
for (int i = 0; i < treeColumnModel.getColumnCount(); i++) {
TableColumn c = treeColumnModel.getColumn(i);
switch (c.getModelIndex()) {
case EVTaskList.TASK_COLUMN:
case EVTaskList.NODE_TYPE_COLUMN:
case EVTaskList.PLAN_TIME_COLUMN:
case EVTaskList.PLAN_DTIME_COLUMN:
//case EVTaskList.ACT_TIME_COLUMN:
//case EVTaskList.ACT_DTIME_COLUMN:
case EVTaskList.PLAN_DATE_COLUMN:
case EVTaskList.REPLAN_DATE_COLUMN:
case EVTaskList.FORECAST_DATE_COLUMN:
case EVTaskList.MILESTONE_COLUMN:
case EVTaskList.LABELS_COLUMN:
case EVTaskList.NOTES_COLUMN:
case EVTaskList.DEPENDENCIES_COLUMN:
case EVTaskList.PCT_SPENT_COLUMN:
result.addColumn(TableUtils.cloneTableColumn(c));
break;
default:
extraWidth += c.getPreferredWidth();
break;
}
}
TableColumn c = result.getColumn(0);
c.setPreferredWidth(c.getWidth() + extraWidth);
return result;
}