コード例 #1
0
  @Override
  protected Object getRow(Client client) {
    Object row = ui.createTableRow(client);

    Object cell = ui.createTableCell("");
    markCell(cell, false);
    ui.add(row, cell);

    ui.add(row, ui.createTableCell(client.getFirstName() + " " + client.getOtherName()));
    ui.add(row, ui.createTableCell(client.getPhoneNumber()));

    ui.setAttachedObject(row, client);
    return addCustomData(client, row);
  }
コード例 #2
0
  public void showFooter() {
    if (ui.getSelectedIndex(this.tableClients) >= 0) {
      Object selectedItem = ui.getSelectedItem(this.tableClients);
      Client attachedClient = ui.getAttachedObject(selectedItem, Client.class);

      ui.setText(ui.find(LBL_CLIENT_NAME), NAME + attachedClient.getFullName());
      ui.setText(ui.find(LBL_TO_SAVE), TO_SAVE + reviewHandler.getTotalAmount());
      ui.setText(ui.find(LBL_START_DATE), STARTING_ON + sdf.format(reviewHandler.getStartDate()));
      ui.setText(ui.find(LBL_END_DATE), ENDING_ON + sdf.format(reviewHandler.getEndDate()));

    } else {
      Client fstClient = reviewHandler.getSelectedClients().get(0);
      ui.setText(ui.find(LBL_CLIENT_NAME), NAME + fstClient.getFirstName());
      ui.setText(ui.find(LBL_TO_SAVE), TO_SAVE + reviewHandler.getTotalAmount());
      ui.setText(ui.find(LBL_START_DATE), STARTING_ON + sdf.format(reviewHandler.getStartDate()));
      ui.setText(ui.find(LBL_END_DATE), ENDING_ON + sdf.format(reviewHandler.getEndDate()));
    }
  }