use of teamdash.wbs.WBSModel in project processdash by dtuma.
the class TaskDependencyColumn method recalculate.
public boolean recalculate() {
boolean result = needsRecalc;
needsRecalc = false;
WBSModel wbs = dataModel.getWBSModel();
if (recalculate(wbs, wbs.getRoot()))
result = true;
return result;
}
use of teamdash.wbs.WBSModel in project processdash by dtuma.
the class BlameSelectionListener method actionPerformed.
public void actionPerformed(ActionEvent e) {
if (!hasFocus())
return;
int[] selectedRows = table.getSelectedRows();
int[] selectedColumns = table.getSelectedColumns();
if (selectedRows.length == 0 || selectedColumns.length == 0)
return;
WBSModel wbsModel;
List<String> columns = new ArrayList(selectedColumns.length);
if (table.getModel() instanceof DataTableModel) {
wbsModel = ((DataTableModel) table.getModel()).getWBSModel();
for (int i = 0; i < selectedColumns.length; i++) {
String identifier = (String) table.getColumnModel().getColumn(selectedColumns[i]).getIdentifier();
columns.add(identifier);
}
} else {
wbsModel = (WBSModel) table.getModel();
columns.add(WBSNodeColumn.COLUMN_ID);
}
List<Integer> nodes = new ArrayList();
for (int i = 0; i < selectedRows.length; i++) {
WBSNode node = wbsModel.getNodeForRow(selectedRows[i]);
nodes.add(node.getTreeNodeID());
}
BlameCaretPos caretPos = new BlameCaretPos(wbsModel.getModelType(), nodes, columns);
if (SET_EMPTY_CARETS || blameData.countAnnotations(caretPos) > 0)
blameData.setCaretPos(caretPos);
}
Aggregations