Exemple #1
0
  public boolean showDialog(double total, CustomerInfoExt customerext) {

    m_aPaymentInfo = new PaymentInfoList();
    accepted = false;

    m_dTotal = total;

    this.customerext = customerext;

    m_jButtonPrint.setSelected(printselected);
    m_jButtonPrintFiscal.setSelected(printFiscSelected);
    m_jTotalEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dTotal)));

    addTabs();

    if (m_jTabPayment.getTabCount() == 0) {
      // No payment panels available
      m_aPaymentInfo.add(getDefaultPayment(total));
      accepted = true;
    } else {
      getRootPane().setDefaultButton(m_jButtonOK);
      printState();
      setVisible(true);
    }

    // gets the print button state
    printselected = m_jButtonPrint.isSelected();
    printFiscSelected = m_jButtonPrintFiscal.isSelected();

    // remove all tabs
    m_jTabPayment.removeAll();

    return accepted;
  }
Exemple #2
0
  private void m_jButtonAddActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_m_jButtonAddActionPerformed

    PaymentInfo returnPayment =
        ((JPaymentInterface) m_jTabPayment.getSelectedComponent()).executePayment();
    if (returnPayment != null) {
      m_aPaymentInfo.add(returnPayment);
      printState();
    }
  } // GEN-LAST:event_m_jButtonAddActionPerformed
Exemple #3
0
  private void m_jButtonRemoveActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_m_jButtonRemoveActionPerformed

    m_aPaymentInfo.removeLast();
    printState();
  } // GEN-LAST:event_m_jButtonRemoveActionPerformed