jap.pay.wizardnew
Class PaymentInfoPane

java.lang.Object
  extended by gui.dialog.DialogContentPane
      extended by jap.pay.wizardnew.PaymentInfoPane
All Implemented Interfaces:
DialogContentPane.IWizardSuitable, IDialogOptions, JAPHelpContext.IHelpContext, java.awt.event.ActionListener, java.util.EventListener

public class PaymentInfoPane
extends DialogContentPane
implements DialogContentPane.IWizardSuitable, java.awt.event.ActionListener


Nested Class Summary
 
Nested classes/interfaces inherited from class gui.dialog.DialogContentPane
DialogContentPane.CheckError, DialogContentPane.IWizardSuitable, DialogContentPane.IWizardSuitableNoWizardButtons, DialogContentPane.Layout
 
Field Summary
private  javax.swing.JButton m_bttnCopy
           
private  javax.swing.JButton m_bttnOpen
           
private  boolean m_bURL
           
private  java.awt.GridBagConstraints m_c
           
private  javax.swing.JLabel m_imageLabel
           
private  java.lang.String m_language
           
private  javax.swing.JCheckBox m_linkOpenedInBrowser
           
private  LinkMouseListener.ILinkGenerator m_paymentLinkGenerator
           
private  java.awt.Container m_rootPanel
           
private  XMLPaymentOption m_selectedOption
           
private  XMLTransCert m_transCert
           
private static java.lang.String MSG_BUTTONCOPY
           
private static java.lang.String MSG_BUTTONOPEN
           
private static java.lang.String MSG_COULD_OPEN
           
private static java.lang.String MSG_EXPLAIN_COULD_OPEN
           
private static java.lang.String MSG_INFOS
          Messages
private static java.lang.String MSG_NO_FURTHER_PAYMENT
           
static java.lang.String MSG_PAYPAL_ITEM_NAME
           
private static java.lang.String MSG_REMINDER_PAYMENT
           
private static java.lang.String MSG_REMINDER_PAYMENT_EXPLAIN
           
private static java.lang.String MSG_USE_OTHER_METHOD
           
 
Fields inherited from class gui.dialog.DialogContentPane
BUTTON_OPERATION_WIZARD, DEFAULT_BUTTON_CANCEL, DEFAULT_BUTTON_EMPTY, DEFAULT_BUTTON_HELP, DEFAULT_BUTTON_KEEP, DEFAULT_BUTTON_NO, DEFAULT_BUTTON_OK, DEFAULT_BUTTON_YES, MSG_CANCEL, MSG_FINISH, MSG_NEXT, MSG_NO, MSG_OK, MSG_OPERATION_FAILED, MSG_PREVIOUS, MSG_SEE_FULL_MESSAGE, MSG_YES, ON_CANCEL_DISPOSE_DIALOG, ON_CANCEL_HIDE_DIALOG, ON_CANCEL_SHOW_NEXT_CONTENT, ON_CANCEL_SHOW_PREVIOUS_CONTENT, ON_CLICK_DISPOSE_DIALOG, ON_CLICK_DO_NOTHING, ON_CLICK_HIDE_DIALOG, ON_CLICK_SHOW_NEXT_CONTENT, ON_CLICK_SHOW_PREVIOUS_CONTENT, ON_NO_DISPOSE_DIALOG, ON_NO_HIDE_DIALOG, ON_NO_SHOW_NEXT_CONTENT, ON_NO_SHOW_PREVIOUS_CONTENT, ON_YESOK_DISPOSE_DIALOG, ON_YESOK_HIDE_DIALOG, ON_YESOK_SHOW_NEXT_CONTENT, ON_YESOK_SHOW_PREVIOUS_CONTENT
 
Fields inherited from interface gui.dialog.IDialogOptions
MESSAGE_TYPE_ERROR, MESSAGE_TYPE_INFORMATION, MESSAGE_TYPE_PLAIN, MESSAGE_TYPE_QUESTION, MESSAGE_TYPE_WARNING, OPTION_TYPE_CANCEL, OPTION_TYPE_DEFAULT, OPTION_TYPE_EMPTY, OPTION_TYPE_OK_CANCEL, OPTION_TYPE_YES_NO, OPTION_TYPE_YES_NO_CANCEL, RETURN_VALUE_CANCEL, RETURN_VALUE_CLOSED, RETURN_VALUE_NO, RETURN_VALUE_OK, RETURN_VALUE_UNINITIALIZED, RETURN_VALUE_YES
 
Constructor Summary
PaymentInfoPane(JAPDialog a_parentDialog, DialogContentPane a_previousContentPane)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
private static java.lang.String amountAsString(long amount)
           
 DialogContentPane.CheckError[] checkUpdate()
          Is called when someone calls updateDialog() on this content pane.
 DialogContentPane.CheckError[] checkYesOK()
          Is called when the "Yes", "OK" or "Next" button is clicked.
private  void copyExtraInfoToClipboard()
          Copies the extra payment info to the system clipboard
static java.lang.String createEgoldLink(java.lang.String baseLink, long amount, java.lang.String planName, java.lang.String transferNumber)
           
static java.lang.String createPaypalLink(java.lang.String baseLink, long amount, java.lang.String planName, java.lang.String transferNumber)
           
static java.lang.String createPaysafecardLink(java.lang.String baseLink, long intAmount, java.lang.String transferNumber)
          takes the extrainfo as contained in the database's paymentoption configuration, and replaces the placeholders etc in a way suitable for the paysafecard syntax
static java.lang.String getMethodImageFilename(java.lang.String a_methodName)
           
 XMLTransCert getTransCert()
           
 void openURL()
           
 void showInfo()
           
 
Methods inherited from class gui.dialog.DialogContentPane
addComponentListener, addDialogComponentListener, addDialogWindowListener, checkCancel, checkNo, clearStatusMessage, clearStatusMessage, closeDialog, dispose, getButtonCancel, getButtonHelp, getButtonNo, getButtonValue, getButtonYesOK, getContentPane, getDefaultButton, getDefaultButtonOperation, getDialog, getHelpContext, getHelpExtractionDisplayContext, getMessageIcon, getNextContentPane, getPreviousContentPane, getText, getValue, hasNextContentPane, hasPreviousContentPane, hasValidValue, hasWizardLayout, isActive, isAutomaticFocusSettingEnabled, isDialogVisible, isDisposed, isMoveBackAllowed, isMoveForwardAllowed, isSkippedAsNextContentPane, isSkippedAsPreviousContentPane, isVisible, moveToNextContentPane, moveToPreviousContentPane, printErrorStatusMessage, printErrorStatusMessage, printErrorStatusMessage, printStatusMessage, printStatusMessage, removeComponentListener, removeDialogComponentListener, removeDialogWindowListener, setButtonValue, setContentPane, setDefaultButton, setDefaultButtonOperation, setMouseListener, setText, showDialog, updateDialog, updateDialogOptimalSized, updateDialogOptimalSized, validateDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_INFOS

private static final java.lang.String MSG_INFOS
Messages


MSG_BUTTONCOPY

private static final java.lang.String MSG_BUTTONCOPY

MSG_BUTTONOPEN

private static final java.lang.String MSG_BUTTONOPEN

MSG_PAYPAL_ITEM_NAME

public static final java.lang.String MSG_PAYPAL_ITEM_NAME

MSG_COULD_OPEN

private static final java.lang.String MSG_COULD_OPEN

MSG_REMINDER_PAYMENT

private static final java.lang.String MSG_REMINDER_PAYMENT

MSG_REMINDER_PAYMENT_EXPLAIN

private static final java.lang.String MSG_REMINDER_PAYMENT_EXPLAIN

MSG_EXPLAIN_COULD_OPEN

private static final java.lang.String MSG_EXPLAIN_COULD_OPEN

MSG_NO_FURTHER_PAYMENT

private static final java.lang.String MSG_NO_FURTHER_PAYMENT

MSG_USE_OTHER_METHOD

private static final java.lang.String MSG_USE_OTHER_METHOD

m_rootPanel

private java.awt.Container m_rootPanel

m_c

private java.awt.GridBagConstraints m_c

m_bttnCopy

private javax.swing.JButton m_bttnCopy

m_bttnOpen

private javax.swing.JButton m_bttnOpen

m_language

private java.lang.String m_language

m_selectedOption

private XMLPaymentOption m_selectedOption

m_transCert

private XMLTransCert m_transCert

m_linkOpenedInBrowser

private javax.swing.JCheckBox m_linkOpenedInBrowser

m_imageLabel

private javax.swing.JLabel m_imageLabel

m_paymentLinkGenerator

private LinkMouseListener.ILinkGenerator m_paymentLinkGenerator

m_bURL

private boolean m_bURL
Constructor Detail

PaymentInfoPane

public PaymentInfoPane(JAPDialog a_parentDialog,
                       DialogContentPane a_previousContentPane)
Method Detail

createPaysafecardLink

public static java.lang.String createPaysafecardLink(java.lang.String baseLink,
                                                     long intAmount,
                                                     java.lang.String transferNumber)
takes the extrainfo as contained in the database's paymentoption configuration, and replaces the placeholders etc in a way suitable for the paysafecard syntax


createPaypalLink

public static java.lang.String createPaypalLink(java.lang.String baseLink,
                                                long amount,
                                                java.lang.String planName,
                                                java.lang.String transferNumber)

createEgoldLink

public static java.lang.String createEgoldLink(java.lang.String baseLink,
                                               long amount,
                                               java.lang.String planName,
                                               java.lang.String transferNumber)

amountAsString

private static java.lang.String amountAsString(long amount)

showInfo

public void showInfo()

getTransCert

public XMLTransCert getTransCert()

getMethodImageFilename

public static java.lang.String getMethodImageFilename(java.lang.String a_methodName)
Parameters:
a_methodName - String: String of the method name, as contained in db table paymentoptions and returned by .getName()
Returns:
String: path to the image file as contained in JAPConstants in a String constant called IMAGE_, or null if not found, or on error

copyExtraInfoToClipboard

private void copyExtraInfoToClipboard()
Copies the extra payment info to the system clipboard


openURL

public void openURL()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

checkUpdate

public DialogContentPane.CheckError[] checkUpdate()
Description copied from class: DialogContentPane
Is called when someone calls updateDialog() on this content pane. The update operation is only performed if null is returned. Otherwise, the caller may interpret the errors he gets from updateDialog. This is done by moveToNextContentPane() and moveToPreviousContentPane() . Overwrite this method to set your own check; it returns null by default. This method should never be called directly and is only used internally.

Overrides:
checkUpdate in class DialogContentPane
Returns:
errors that prohibit the operation or null or an empty array if the operation is allowed

checkYesOK

public DialogContentPane.CheckError[] checkYesOK()
Description copied from class: DialogContentPane
Is called when the "Yes", "OK" or "Next" button is clicked. If one or more error occured, they should be returned as CheckErrors to inform the user. In this case, the automatic reaction on the button click is prohibited and getValue() will not change. Overwrite this method to set your own check; it returns null by default. This method should never be called directly and is only used internally.

Overrides:
checkYesOK in class DialogContentPane
Returns:
errors that prohibit the operation or null or an empty array if the operation is allowed