gui.dialog
Class TermsAndConditionsPane

java.lang.Object
  extended by gui.dialog.DialogContentPane
      extended by gui.dialog.TermsAndConditionsPane
All Implemented Interfaces:
DialogContentPane.IWizardSuitable, IDialogOptions, JAPHelpContext.IHelpContext

public class TermsAndConditionsPane
extends DialogContentPane
implements DialogContentPane.IWizardSuitable

Shows the terms and conditions as gotten from the JPI. User has to agree to them in order to proceed Part of the wizard for charging an account

Author:
Elmar Schraml

Nested Class Summary
static class TermsAndConditionsPane.CancellationPolicyMessages
           
static interface TermsAndConditionsPane.IMessages
           
static class TermsAndConditionsPane.TermsAndConditionsMessages
           
 
Nested classes/interfaces inherited from class gui.dialog.DialogContentPane
DialogContentPane.CheckError, DialogContentPane.IWizardSuitable, DialogContentPane.IWizardSuitableNoWizardButtons, DialogContentPane.Layout
 
Field Summary
private  javax.swing.JCheckBox m_accepted
           
private  java.awt.GridBagConstraints m_c
           
private  WorkerContentPane m_fetchTermsPane
           
private  TermsAndConditionsPane.IMessages m_messages
           
private  java.awt.Container m_rootPanel
           
private  javax.swing.JScrollPane m_scrollingTerms
           
private  javax.swing.JEditorPane m_termsPane
           
private static java.lang.String MSG_CANCEL_ERROR_HAVE_TO_ACCEPT
           
private static java.lang.String MSG_CANCEL_HEADING
           
private static java.lang.String MSG_CANCEL_I_ACCEPT
           
private static java.lang.String MSG_CANCEL_NO_POLICY_FOUND
           
private static java.lang.String MSG_ERROR_HAVE_TO_ACCEPT
           
static java.lang.String MSG_HEADING
           
private static java.lang.String MSG_I_ACCEPT
           
private static java.lang.String MSG_NO_TERMS_FOUND
           
 
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
TermsAndConditionsPane(JAPDialog a_parentDialog, boolean a_bAccepted, TermsAndConditionsPane.IMessages a_messages)
           
TermsAndConditionsPane(JAPDialog a_parentDialog, WorkerContentPane a_previousContentPane, boolean a_bShowCheckAccept, TermsAndConditionsPane.IMessages a_messages)
           
 
Method Summary
 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 init(boolean a_bShowCheckAccept)
           
 boolean isTermsAccepted()
           
 void setText(java.lang.String a_text)
          Use this method to set a new text for the content pane.
private  void showTerms()
           
 
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, 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_HEADING

public static final java.lang.String MSG_HEADING

MSG_ERROR_HAVE_TO_ACCEPT

private static final java.lang.String MSG_ERROR_HAVE_TO_ACCEPT

MSG_NO_TERMS_FOUND

private static final java.lang.String MSG_NO_TERMS_FOUND

MSG_I_ACCEPT

private static final java.lang.String MSG_I_ACCEPT

MSG_CANCEL_HEADING

private static final java.lang.String MSG_CANCEL_HEADING

MSG_CANCEL_ERROR_HAVE_TO_ACCEPT

private static final java.lang.String MSG_CANCEL_ERROR_HAVE_TO_ACCEPT

MSG_CANCEL_NO_POLICY_FOUND

private static final java.lang.String MSG_CANCEL_NO_POLICY_FOUND

MSG_CANCEL_I_ACCEPT

private static final java.lang.String MSG_CANCEL_I_ACCEPT

m_fetchTermsPane

private WorkerContentPane m_fetchTermsPane

m_c

private java.awt.GridBagConstraints m_c

m_rootPanel

private java.awt.Container m_rootPanel

m_accepted

private javax.swing.JCheckBox m_accepted

m_termsPane

private javax.swing.JEditorPane m_termsPane

m_scrollingTerms

private javax.swing.JScrollPane m_scrollingTerms

m_messages

private TermsAndConditionsPane.IMessages m_messages
Constructor Detail

TermsAndConditionsPane

public TermsAndConditionsPane(JAPDialog a_parentDialog,
                              WorkerContentPane a_previousContentPane,
                              boolean a_bShowCheckAccept,
                              TermsAndConditionsPane.IMessages a_messages)

TermsAndConditionsPane

public TermsAndConditionsPane(JAPDialog a_parentDialog,
                              boolean a_bAccepted,
                              TermsAndConditionsPane.IMessages a_messages)
Method Detail

init

private void init(boolean a_bShowCheckAccept)

isTermsAccepted

public boolean isTermsAccepted()

showTerms

private void showTerms()

setText

public void setText(java.lang.String a_text)
Description copied from class: DialogContentPane
Use this method to set a new text for the content pane. Note that this is only possible if The new text will not influence the current size or the preferred size of the content pane and the dialog. If the text is too big to show it completely, a link is generated that opens an extra dialog to view the text. HINT: Please use this method ONLY if the whole layout ouf the content pane has already been set. Otherwise, the text size cannot be calculated correctly if the text is too big for the dialog!

Overrides:
setText in class DialogContentPane
Parameters:
a_text - a new text for this content pane

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