if (suspend || resume || stop || remove) {
final int[] selectedRows = _taskTable.getSelectedRows();
final TaskStatus[] tsArray = new TaskStatus[selectedRows.length];
for (int index = 0; index < tsArray.length; index++) {
final int row = selectedRows[index];
final TaskStatus ts = (TaskStatus) _taskStatusArrayModel.getValueAt(row, -1);
tsArray[index] = ts;
}
for (int index = 0; index < tsArray.length; index++) {
final TaskStatus ts = tsArray[index];
final long taskId = ts.getTaskId();
if (suspend || resume) {
management.setTaskSuspended(taskId, suspend);
} else if (stop || remove) {
management.stopTask(taskId, remove);
}