ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.vci.client.workflow.task;
 
import javax.swing.table.DefaultTableModel;
 
import com.vci.corba.workflow.data.FlowTaskInfo;
 
public class DoneTaskTableModel extends TodoTaskTableModel {
 
    private static final long serialVersionUID = 7508852076471337286L;
 
    public DoneTaskTableModel(){
        super();
        
        String[] oldColumns = super.getColumnIdentifiers();
        
        // 在最后添加
        String[] newColumns = new String[oldColumns.length + 1];
        System.arraycopy(oldColumns, 0, newColumns, 0, oldColumns.length);
        newColumns[newColumns.length - 1] = "结束时间";
 
        columnIdentifiers = newColumns;
    }
    
    @Override
    public Object getValueAt(int rowIndex, int column) {
        Object res = super.getValueAt(rowIndex, column);
        if(column == columnIdentifiers.length - 1){
            if (data != null && rowIndex < data.length && data.length > 0) {
                FlowTaskInfo flowHistoryTaskInfo = data[rowIndex];
                res = flowHistoryTaskInfo.endTime;
            }
        }
        return res;
    }
}