package com.vci.client.workflow.task;
|
|
import javax.swing.table.AbstractTableModel;
|
|
import com.vci.corba.workflow.data.FlowApproveHistoryInfo;
|
|
public class HistoryTableModel extends AbstractTableModel {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 7508852076471337286L;
|
|
private String[] columnIdentifiers = new String[] { "任务名称", "执行人", "处理意见", "创建时间", "结束时间", "备注" };
|
|
private FlowApproveHistoryInfo[] data;
|
|
@Override
|
public String getColumnName(int column) {
|
return columnIdentifiers[column];
|
}
|
|
public int getRowCount() {
|
if (data == null) {
|
return 0;
|
} else {
|
return data.length;
|
}
|
}
|
|
public int getColumnCount() {
|
return columnIdentifiers.length;
|
}
|
|
public Object getValueAt(int rowIndex, int column) {
|
if (data != null && data.length > 0) {
|
FlowApproveHistoryInfo flowApproveHistory = data[rowIndex];
|
switch (column) {
|
case 0:
|
return flowApproveHistory.taskName;
|
case 1:
|
return flowApproveHistory.assignee;
|
case 2:
|
return flowApproveHistory.opinion;
|
case 3:
|
return flowApproveHistory.createTime;
|
case 4:
|
return flowApproveHistory.endTime;
|
case 5:
|
return flowApproveHistory.note;
|
default:
|
break;
|
}
|
}
|
return null;
|
}
|
|
@Override
|
public boolean isCellEditable(int row, int column) {
|
return false;
|
}
|
|
public FlowApproveHistoryInfo getValue(int rowIndex) {
|
if (data != null && data.length > 0) {
|
return data[rowIndex];
|
}
|
return null;
|
}
|
|
public void setData(FlowApproveHistoryInfo[] data) {
|
this.data = data;
|
}
|
|
}
|