Ejemplo n.º 1
0
  public Component getTableCellRendererComponent(
      JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

    String textValue = "";
    if (value != null) {
      Domain domain = (Domain) value;
      textValue = domain.getName();
    }

    return super.getTableCellRendererComponent(table, textValue, isSelected, hasFocus, row, column);
  }
Ejemplo n.º 2
0
  protected void unReserve() {
    List<ClientReservation> clientUnReservations = new ArrayList<ClientReservation>();

    int[] selectedRows = domainTable.getSelectedRows();
    for (int i = 0; i < selectedRows.length; i++) {
      ClientSession clientSession =
          FactoryMethods.getLoginFactory().getServiceAdaptor().getClientSession();
      Domain domain =
          (Domain) domainTableModel.getValueAt(selectedRows[i], DomainTableModel.DOMAIN_COL_IDX);
      clientUnReservations.add(
          new ClientReservation(
              clientSession.getLoginId(), ClientReservation.DOMAIN_ENTITY, domain.getName()));
    }

    log.info(
        "*** unReserve: selectedRows="
            + selectedRows
            + ", clientUnReservations="
            + clientUnReservations
            + " ***");
    FactoryMethods.getClientReservationFactory()
        .getCache()
        .reserveUnReserve(Collections.EMPTY_LIST, clientUnReservations);
  }