 package com.connor.erp.materialquery.ViewWorkInProcessOfERP;
 
 import com.connor.erp.toolkit.UtilApi;
 import com.teamcenter.rac.aif.AbstractAIFDialog;
 import com.teamcenter.rac.common.TCTable;
 import com.teamcenter.rac.kernel.TCSession;
 import java.awt.Component;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 import javax.swing.JScrollPane;
 import javax.swing.JTable;
 
 public class ViewWorkInProcessOfERPDialog extends AbstractAIFDialog {
   private static final long serialVersionUID = 1L;
   
   private TCSession session;
   
   private TCTable table;
   
   private List<String[]> tableDataList;
   
   private JScrollPane scrollPane;
   
   public ViewWorkInProcessOfERPDialog(TCSession pSession, List<String[]> ptableDataList) {
/*  43 */     super(false);
/*  44 */     this.tableDataList = ptableDataList;
/*  45 */     initUI();
   }
   
   private void initUI() {
/*  52 */     setTitle("ERP库存在制品");
/*  53 */     String[] colName = { 
/*  53 */         "序号", "制造件号", "制造名称", "任务号", "生产日期", "车型分类", "计划件数", 
/*  54 */         "完成件数", "报废件数", "配套件数", 
/*  54 */         "部件种数", "部件总个数" };
/*  55 */     this.table = new TCTable(this.session, colName) {
         private static final long serialVersionUID = 1L;
         
         public boolean isCellEditable(int i, int j) {
/*  63 */           return false;
         }
       };
/*  66 */     fillData();
/*  67 */     UtilApi.FitTableColumns((JTable)this.table);
/*  68 */     this.scrollPane = new JScrollPane((Component)this.table);
/*  72 */     getContentPane().add(this.scrollPane);
   }
   
   public void fillData() {
/*  77 */     Collections.sort((List)this.tableDataList, (Comparator)new Comparator<String[]>() {
           public int compare(String[] o1, String[] o2) {
/*  81 */             return o1[0].compareTo(o2[0]);
           }
         });
/*  85 */     int tableSize = this.tableDataList.size();
/*  86 */     for (int i = 0; i < tableSize; i++) {
/*  87 */       String[] arrStr = this.tableDataList.get(i);
/*  88 */       String[] tableData = new String[12];
/*  89 */       tableData[0] = String.valueOf(i + 1);
/*  90 */       tableData[1] = arrStr[0];
/*  91 */       tableData[2] = arrStr[1];
/*  92 */       tableData[3] = arrStr[2];
/*  93 */       tableData[4] = arrStr[3];
/*  94 */       tableData[5] = arrStr[4];
/*  95 */       tableData[6] = arrStr[5];
/*  96 */       tableData[7] = arrStr[6];
/*  97 */       tableData[8] = arrStr[7];
/*  98 */       tableData[9] = arrStr[8];
/*  99 */       tableData[10] = arrStr[9];
/* 100 */       tableData[11] = arrStr[10];
/* 101 */       this.table.addRow(tableData);
     } 
   }
 }
