jap.pay.wizardnew
Class VolumePlanSelectionPane
java.lang.Object
gui.dialog.DialogContentPane
jap.pay.wizardnew.VolumePlanSelectionPane
- All Implemented Interfaces:
- DialogContentPane.IWizardSuitable, IDialogOptions, JAPHelpContext.IHelpContext, java.awt.event.ActionListener, java.util.EventListener, javax.swing.event.DocumentListener
public class VolumePlanSelectionPane
- extends DialogContentPane
- implements DialogContentPane.IWizardSuitable, java.awt.event.ActionListener, javax.swing.event.DocumentListener
Shows all available volume plans (as sent by the jpi in the form of a XMLVolumePlans object),
and allows the user to pick one.
Part of the wizard for charging an account.
- Author:
- Elmar Schraml
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 |
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 |
MSG_PRICE
private static final java.lang.String MSG_PRICE
MSG_HEADING
private static final java.lang.String MSG_HEADING
MSG_VOLUME
private static final java.lang.String MSG_VOLUME
MSG_UNLIMITED
private static final java.lang.String MSG_UNLIMITED
MSG_ERROR_NO_PLAN_CHOSEN
private static final java.lang.String MSG_ERROR_NO_PLAN_CHOSEN
MSG_VALIDUNTIL
private static final java.lang.String MSG_VALIDUNTIL
MSG_CHOOSEAPLAN
private static final java.lang.String MSG_CHOOSEAPLAN
MSG_ENTER_COUPON
private static final java.lang.String MSG_ENTER_COUPON
MSG_PLAN_OR_COUPON
private static final java.lang.String MSG_PLAN_OR_COUPON
MSG_INVALID_COUPON
private static final java.lang.String MSG_INVALID_COUPON
MSG_COUPON_INCOMPLETE
private static final java.lang.String MSG_COUPON_INCOMPLETE
m_allPlans
private XMLVolumePlans m_allPlans
m_selectedPlan
private XMLVolumePlan m_selectedPlan
m_coupon1
private JapCouponField m_coupon1
m_coupon2
private JapCouponField m_coupon2
m_coupon3
private JapCouponField m_coupon3
m_coupon4
private JapCouponField m_coupon4
m_c
private java.awt.GridBagConstraints m_c
m_rootPanel
private java.awt.Container m_rootPanel
m_rbGroup
private javax.swing.ButtonGroup m_rbGroup
m_couponButton
private javax.swing.JRadioButton m_couponButton
m_fetchPlansPane
private WorkerContentPane m_fetchPlansPane
m_isNewAccount
private boolean m_isNewAccount
m_isCouponUsed
private boolean m_isCouponUsed
m_hasBeenShown
private boolean m_hasBeenShown
VolumePlanSelectionPane
public VolumePlanSelectionPane(JAPDialog a_parentDialog,
WorkerContentPane a_previousContentPane,
boolean a_newAccount)
getSelectedVolumePlan
public XMLVolumePlan getSelectedVolumePlan()
getEnteredCouponCode
public java.lang.String getEnteredCouponCode()
setCouponUsed
private void setCouponUsed(boolean curValue)
isCouponUsed
public boolean isCouponUsed()
isCouponComplete
public boolean isCouponComplete()
getAmount
public java.lang.String getAmount()
- returns the amount (= price) of the currently selected plan
for reasons of backwards compatibility (amount used to be a field of MethodSelectionPane)
as a String
- Returns:
- String: e.g. "500" for 500 Eurocent
getCurrency
public java.lang.String getCurrency()
- get Currency of the selected volume Plan
- Returns:
- String: currently always "EUR"
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
insertUpdate
public void insertUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
insertUpdate
in interface javax.swing.event.DocumentListener
removeUpdate
public void removeUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
removeUpdate
in interface javax.swing.event.DocumentListener
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
changedUpdate
in interface javax.swing.event.DocumentListener
addPlan
private void addPlan(XMLVolumePlan aPlan)
addCouponField
private void addCouponField()
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
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
showVolumePlans
public void showVolumePlans()
resetSelection
public void resetSelection()
clearCouponFields
private void clearCouponFields()
getCouponString
private java.lang.String getCouponString()