jap.pay
Class PaymentMainPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by gui.FlippingPanel
                      extended by jap.pay.PaymentMainPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class PaymentMainPanel
extends FlippingPanel

See Also:
Serialized Form

Nested Class Summary
private  class PaymentMainPanel.MyPaymentListener
          Notifies us when the state of the active account changes, so we can update the display
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static long FULL_AMOUNT
           
private  javax.swing.ImageIcon[] m_accountIcons
          Icons for the account icon display
private  JAPProgressBar m_BalanceProgressBar
          shows the current balance state
private  JAPProgressBar m_BalanceSmallProgressBar
           
private  javax.swing.JLabel m_BalanceText
          shows the current balance as text
private  javax.swing.JLabel m_BalanceTextSmall
          shows the current balance as text
private  boolean m_bShowingError
           
private  javax.swing.JLabel m_dateLabel
          show the date of the last balance update
private  javax.swing.JLabel m_labelSessionSpent
           
private  javax.swing.JLabel m_labelSessionSpentHeader
           
private  javax.swing.JLabel m_labelTitle
           
private  javax.swing.JLabel m_labelTitleSmall
           
private  javax.swing.JLabel m_labelTotalSpent
           
private  javax.swing.JLabel m_labelTotalSpentHeader
           
private  javax.swing.JLabel m_labelValidUntil
           
private  javax.swing.JLabel m_labelValidUntilHeader
           
private  PaymentMainPanel.MyPaymentListener m_MyPaymentListener
          Listens to payment events
private  boolean m_notifiedEmpty
          has user been notified about nearly empty accout?
private  JobQueue m_queueUpdate
           
private  long m_spentThisSession
           
private  JAPNewView m_view
          the main jap window
private static java.lang.String MSG_CHOOSE_FREE_SERVICES_ONLY
           
private static java.lang.String MSG_CREATE_ACCOUNT_QUESTION
           
private static java.lang.String MSG_CREATE_ACCOUNT_TITLE
           
private static java.lang.String MSG_ENABLE_AUTO_SWITCH
           
private static java.lang.String MSG_EURO_BALANCE
           
private static java.lang.String MSG_EXPERIMENTAL
           
private static java.lang.String MSG_FREE_OF_CHARGE
           
private static java.lang.String MSG_LASTUPDATE
           
private static java.lang.String MSG_MAYBE_LATER
           
private static java.lang.String MSG_NEARLYEMPTY_CREATE_ACCOUNT
           
private static java.lang.String MSG_NEARLYEXPIRED_CREATE_ACCOUNT
           
private static java.lang.String MSG_NO_ACTIVE_ACCOUNT
           
private static java.lang.String MSG_NO_FLATRATE
           
private static java.lang.String MSG_OPEN_TRANSACTION
           
private static java.lang.String[] MSG_PAYMENT_ERRORS
           
private static java.lang.String MSG_PAYMENTNOTACTIVE
           
private static java.lang.String MSG_SESSIONSPENT
           
private static java.lang.String MSG_TITLE
          Messages
private static java.lang.String MSG_TITLE_FLAT
           
private static java.lang.String MSG_TOTALSPENT
           
private static java.lang.String MSG_TT_CREATE_ACCOUNT
           
private static java.lang.String MSG_VALID_UNTIL
           
private static java.lang.String MSG_WANNA_CHARGE
           
private static java.lang.String MSG_WITH_COSTS
           
static long WARNING_AMOUNT
           
static long WARNING_TIME
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PaymentMainPanel(JAPNewView view, javax.swing.JLabel a_alignLabel)
           
 
Method Summary
private  void loadIcons()
          Loads some icons for the account display
 void stopUpdateQueue()
           
static java.lang.String translateBIError(XMLErrorMessage a_msg)
           
private  void updateDisplay(PayAccount activeAccount, boolean a_bWarnIfNearlyEmpty)
          This should be called by the changelistener whenever the state of the active account changes.
 
Methods inherited from class gui.FlippingPanel
getFullPanel, getMaximumSize, getMinimumSize, getPreferredSize, getSmallPanel, setFlipped, setFullPanel, setSmallPanel
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WARNING_AMOUNT

public static final long WARNING_AMOUNT
See Also:
Constant Field Values

WARNING_TIME

public static final long WARNING_TIME
See Also:
Constant Field Values

FULL_AMOUNT

public static final long FULL_AMOUNT
See Also:
Constant Field Values

MSG_TITLE

private static final java.lang.String MSG_TITLE
Messages


MSG_LASTUPDATE

private static final java.lang.String MSG_LASTUPDATE

MSG_PAYMENTNOTACTIVE

private static final java.lang.String MSG_PAYMENTNOTACTIVE

MSG_NEARLYEMPTY_CREATE_ACCOUNT

private static final java.lang.String MSG_NEARLYEMPTY_CREATE_ACCOUNT

MSG_NEARLYEXPIRED_CREATE_ACCOUNT

private static final java.lang.String MSG_NEARLYEXPIRED_CREATE_ACCOUNT

MSG_SESSIONSPENT

private static final java.lang.String MSG_SESSIONSPENT

MSG_TOTALSPENT

private static final java.lang.String MSG_TOTALSPENT

MSG_NO_ACTIVE_ACCOUNT

private static final java.lang.String MSG_NO_ACTIVE_ACCOUNT

MSG_ENABLE_AUTO_SWITCH

private static final java.lang.String MSG_ENABLE_AUTO_SWITCH

MSG_WITH_COSTS

private static final java.lang.String MSG_WITH_COSTS

MSG_CREATE_ACCOUNT_TITLE

private static final java.lang.String MSG_CREATE_ACCOUNT_TITLE

MSG_CHOOSE_FREE_SERVICES_ONLY

private static final java.lang.String MSG_CHOOSE_FREE_SERVICES_ONLY

MSG_EXPERIMENTAL

private static final java.lang.String MSG_EXPERIMENTAL

MSG_TITLE_FLAT

private static final java.lang.String MSG_TITLE_FLAT

MSG_VALID_UNTIL

private static final java.lang.String MSG_VALID_UNTIL

MSG_EURO_BALANCE

private static final java.lang.String MSG_EURO_BALANCE

MSG_NO_FLATRATE

private static final java.lang.String MSG_NO_FLATRATE

MSG_WANNA_CHARGE

private static final java.lang.String MSG_WANNA_CHARGE

MSG_TT_CREATE_ACCOUNT

private static final java.lang.String MSG_TT_CREATE_ACCOUNT

MSG_FREE_OF_CHARGE

private static final java.lang.String MSG_FREE_OF_CHARGE

MSG_OPEN_TRANSACTION

private static final java.lang.String MSG_OPEN_TRANSACTION

MSG_CREATE_ACCOUNT_QUESTION

private static final java.lang.String MSG_CREATE_ACCOUNT_QUESTION

MSG_MAYBE_LATER

private static final java.lang.String MSG_MAYBE_LATER

MSG_PAYMENT_ERRORS

private static final java.lang.String[] MSG_PAYMENT_ERRORS

m_accountIcons

private javax.swing.ImageIcon[] m_accountIcons
Icons for the account icon display


m_BalanceProgressBar

private JAPProgressBar m_BalanceProgressBar
shows the current balance state


m_BalanceSmallProgressBar

private JAPProgressBar m_BalanceSmallProgressBar

m_BalanceText

private javax.swing.JLabel m_BalanceText
shows the current balance as text


m_BalanceTextSmall

private javax.swing.JLabel m_BalanceTextSmall
shows the current balance as text


m_queueUpdate

private JobQueue m_queueUpdate

m_dateLabel

private javax.swing.JLabel m_dateLabel
show the date of the last balance update


m_view

private JAPNewView m_view
the main jap window


m_MyPaymentListener

private PaymentMainPanel.MyPaymentListener m_MyPaymentListener
Listens to payment events


m_notifiedEmpty

private boolean m_notifiedEmpty
has user been notified about nearly empty accout?


m_bShowingError

private boolean m_bShowingError

m_labelTotalSpent

private javax.swing.JLabel m_labelTotalSpent

m_labelSessionSpent

private javax.swing.JLabel m_labelSessionSpent

m_labelTitle

private javax.swing.JLabel m_labelTitle

m_labelTitleSmall

private javax.swing.JLabel m_labelTitleSmall

m_labelTotalSpentHeader

private javax.swing.JLabel m_labelTotalSpentHeader

m_labelSessionSpentHeader

private javax.swing.JLabel m_labelSessionSpentHeader

m_labelValidUntilHeader

private javax.swing.JLabel m_labelValidUntilHeader

m_labelValidUntil

private javax.swing.JLabel m_labelValidUntil

m_spentThisSession

private long m_spentThisSession
Constructor Detail

PaymentMainPanel

public PaymentMainPanel(JAPNewView view,
                        javax.swing.JLabel a_alignLabel)
Method Detail

translateBIError

public static java.lang.String translateBIError(XMLErrorMessage a_msg)

stopUpdateQueue

public void stopUpdateQueue()

updateDisplay

private void updateDisplay(PayAccount activeAccount,
                           boolean a_bWarnIfNearlyEmpty)
This should be called by the changelistener whenever the state of the active account changes.

Parameters:
activeAccount - PayAccount

loadIcons

private void loadIcons()
Loads some icons for the account display