Class PAccountNavigator

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

public class PAccountNavigator extends JPanel implements ActionListener, PropertyChangeListener
A navigator component which allows the user to select one account from a list of many. The data displayed for each account is configurable. This component also contains a command menu which allows the user to perform various actions on the accounts in the navigator.
Version:
%version: 20 % %date_modified: Wed Dec 12 09:00:15 2001 %
Author:
kapono
See Also:
  • Constructor Details

    • PAccountNavigator

      public PAccountNavigator()
      Instantiates the navigator component
  • Method Details

    • isMinimizedOnSelection

      public boolean isMinimizedOnSelection()
      Returns the state of the minimizeOnSelection property
      Returns:
      true if the navigator should be minimized when an item is selected in it; false otherwise
    • setMinimizedOnSelection

      public void setMinimizedOnSelection(boolean minimizeIt)
      Used to automatically minimize the account navigator whenever an account is selected for viewing. By default, the navigator does not minimize it.
      Parameters:
      minimizeIt - If true, the navigator will be minimized when an item in the navigator is selected.
    • isMinimized

      public boolean isMinimized()
      Retrieves the minimized state of the navigator
      Returns:
      The minimized state of the navigator
    • setMinimized

      public void setMinimized(boolean minimizeIt)
      Used to minimize/maximize the navigator
      Parameters:
      minimizeIt - If true, minimize the navigator; if false; maxmize it
    • getPreferredSize

      public Dimension getPreferredSize()
      Overridden to establish our desired width
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      The desired size for this component
    • setDisplayFieldDescription

      public void setDisplayFieldDescription(String s)
      Establish the data that will be displayed for each account listed
      Parameters:
      s - The string describing the Portal fields to display
    • setDisplayFieldFormat

      public void setDisplayFieldFormat(String s)
      Establish the format for the data displayed for each account listed If you are displaying multiple fields, you should initiate a line break between fields by using a "
      " between fields.
      For example "{0}
      {1}
      {2}"
      would result in three separate lines being displayed for each account.
      Parameters:
      s - The string describing the format used when displaying data
    • removeAccount

      public void removeAccount(PModelHandle pm)
      Removes the entry/account associated with the given PModelHandle
      Parameters:
      pm - Represents the account to remove
    • addAccount

      public void addAccount(PModelHandle pm)
      Adds a new entry/account to the navigator
      Parameters:
      pm - Represents the account to add
    • setSelected

      public void setSelected(PModelHandle pm)
      Selects the entry/account represented by the given PModelHandle
      Parameters:
      pm - Represents the account to select
    • getSelected

      public PModelHandle getSelected()
      Retrieves the currently selected entry/account
      Returns:
      The selected account
    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      Internal listener for entry selections
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      ae -
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Internal listener for changes to the current account. Takes care of adding a new entry to represent the new current account.
      This also listens for properties indicating an account is being closed and removes that account from the navigation list.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      The - property change event