Class PCurrencyManager

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class PCurrencyManager extends JPanel implements ActionListener
A class that manages the currency display for the client.
This class tracks the currently active account, and retrieves the Portal currencies for that account. Client components requiring this information can retrieve it locally from this class without going to their controller. If the CSR decides to toggle the client's display currency, this class will be notified and it will take care of notifying the currently visible page that the display currency has changed.
Version:
%version: 12 % %date_modified: Wed Oct 24 09:15:13 2001 %
Author:
kapono
See Also:
  • Field Details

    • mNumCurrenciesCurrentlyDisplayed

      protected int mNumCurrenciesCurrentlyDisplayed
    • mCurrencies

      protected int[] mCurrencies
    • mCombo

      protected JComboBox mCombo
    • mSingleCurL

      protected JLabel mSingleCurL
    • mDisplayedCurrency

      protected int mDisplayedCurrency
  • Constructor Details

    • PCurrencyManager

      public PCurrencyManager()
      Creates the PCurrencyManager instance
  • Method Details

    • getDisplayedCurrency

      public int getDisplayedCurrency()
      Returns the current display currency for the currently active account. This will either be the primary or secondary currency of the account.
      Returns:
      The int representation of the active currency, or -1 if there isn't one.
    • getCurrencies

      public int[] getCurrencies()
      Retrieves the primary and secondary currencies for the active account
      Returns:
      An array containing the primary (and secondary, if it exists) currency for the active account.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Handles a currency change. This method retrieves the visible page and tells it to update any currency data displayed on it by calling the toggleCurrency() method.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      e - The selection changed event
    • update

      public void update()
      Causes the manager to refresh its display. It retrieves the current account and displays the currency(s) for it.