use of org.jbpm.task.query.TaskSummary in project jBPM5-Developer-Guide by Salaboy.
the class TaskListJFrame method refreshTable.
private void refreshTable() {
List<TaskSummary> tasks = TaskClientHelper.getInstance().getAssignedTasksByUser("salaboy");
DefaultTableModel tableModel = new javax.swing.table.DefaultTableModel(new String[] { "Id", "Task Name" }, 0) {
Class[] types = new Class[] { java.lang.Number.class, java.lang.String.class };
public Class getColumnClass(int columnIndex) {
return types[columnIndex];
}
};
int i = 0;
for (TaskSummary task : tasks) {
String name = task.getName();
tableModel.addRow(new Object[] { task.getId(), name });
}
tasksjTable.setModel(tableModel);
}
Aggregations