Ejemplo n.º 1
0
  private void initialize(ReceiptBillVO vo) {
    List<ReceiptLineItemVO> items = vo.receiptLineItemVOs;

    Object[] columnname = {"列1", "列2", "列3", "列4"};
    Object[][] data = new Object[items.size() + 3][4];
    data[0][0] = "机构id";
    data[0][1] = vo.institutionID;
    data[0][2] = "总金额";
    data[0][3] = vo.totalMoney;
    data[1][0] = "收款时间";
    data[1][1] = vo.time.toString();
    data[2][0] = "序号";
    data[2][1] = "快递员编号";
    data[2][2] = "barcode";
    data[2][3] = "金额";

    for (int i = 0; i < items.size(); i++) {
      data[3 + i][0] = i + 1;
      data[3 + i][1] = items.get(i).deliveryManID;
      data[3 + i][2] = items.get(i).barCode;
      data[3 + i][3] = items.get(i).money;
    }

    MyJTable table = new MyJTable(data, columnname);
    table.setWidth(new int[] {200, 200, 200, 200});

    JScrollPane scroller = new JScrollPane(table);
    scroller.setBounds(0, 0, 810, 500);

    this.add(scroller);
  }
Ejemplo n.º 2
0
  private void initialize(ArrayList<InstitutionMessageVO> vos) {
    Object[][] rowdata = new Object[vos.size()][3];

    for (int i = 0; i < vos.size(); i++) {
      rowdata[i][0] = vos.get(i).name;
      rowdata[i][1] = vos.get(i).id;
      rowdata[i][2] = InstitutionType.typeTpString(vos.get(i).institutionType);
    }

    MyJTable table = new MyJTable(rowdata, header);
    table.setWidth(new int[] {200, 200, 200});

    JScrollPane scroller = new JScrollPane(table);
    scroller.setBounds(0, 0, 810, 500);

    this.add(scroller);
  }
Ejemplo n.º 3
0
 private void init() {
   Object[][] data = new Object[driverMessageVOs.size()][numbers];
   for (int i = 0; i < data.length; i++) {
     // {"司机编号","姓名","身份证号","手机号码","性别","出生日期","驾照期限"};
     data[i][0] = driverMessageVOs.get(i).driverId;
     data[i][1] = driverMessageVOs.get(i).name;
     data[i][2] = driverMessageVOs.get(i).ID;
     data[i][3] = driverMessageVOs.get(i).phoneNum;
     data[i][4] = Sex.sexToString(driverMessageVOs.get(i).sex);
     data[i][5] = driverMessageVOs.get(i).birth.toDayString();
     data[i][6] = driverMessageVOs.get(i).terminationTime.toDayString();
   }
   MyJTable jTable = new MyJTable(data, nameStrings);
   jTable.setWidth(new int[] {115, 115, 115, 115, 115, 115, 115});
   JScrollPane scroller = new JScrollPane(jTable);
   scroller.setBounds(0, 0, 810, 650);
   this.add(scroller);
 }