Class PAccountView

All Implemented Interfaces:
PAccountViewContext, PClientComponent, PComponent, PContextChangedListener, PViewComponent, PViewDataChangeListener, ImageObserver, MenuContainer, PropertyChangeListener, VetoableChangeListener, Serializable, EventListener, Accessible, ChangeListener, SwingConstants

Contains the various screens displayed for each account in the system.
Version:
%version: 23 % %date_modified: Wed May 08 11:24:33 2002 %
Author:
kapono
See Also:
  • Constructor Details

    • PAccountView

      public PAccountView()
      Constructs a tabbed pane containing components described in the "custinfo.panel" property. Components are dynamically instantiated, placed in a scrolled window, and then added as a tab to the tabbed pane.
  • Method Details

    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class JComponent
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Verifies that each tab is valid for this context. If the tab is not valid for this context, removes it from the view and moves up the next tab in the stack to become the current tab.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIATabbedPane
      Parameters:
      data - the model handle for the account data to display
      Throws:
      RemoteException
    • refreshModelHandle

      public void refreshModelHandle(PModelHandle data) throws RemoteException
      Refreshes the view with this account's data.
      Parameters:
      data - the model handle for the new account data to display
      Throws:
      RemoteException
    • getTools

      public Vector getTools()
      Returns the set of tools to use for all panels in this panel. Individual panels, or even the currently-selected panel, are not queried for their tools. It is currently assumed that they will be queried as they are selected or become active.
      Specified by:
      getTools in interface PClientComponent
      Overrides:
      getTools in class PIATabbedPane
      Returns:
      The global toolkit for the account info panel.
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Looks for notification of property changes on the active tab. Passes the current PModelHandle to update if there is a change.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      e - the property change event
    • vetoableChange

      public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
      Attempts to save changed properties before a tab switch occurs.
      Specified by:
      vetoableChange in interface VetoableChangeListener
      Parameters:
      evt - a PropertyChangeEvent object describing the event source and the property that was changed
      Throws:
      PropertyVetoException - thrown if the recipient wants to roll back the property change
    • addNotify

      public void addNotify()
      Sends out a property change event indicating the currently selected tab.
      Overrides:
      addNotify in class JComponent
    • recycle

      public void recycle()
      Prepares this component for reuse. Cleans up each tab and makes the first tab visible.
    • okToExit

      public boolean okToExit(PContextChangedEvent event)
      Handles a user's exit from this tabbed pane and attempts to save any changes made.
      Specified by:
      okToExit in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • toTop

      public void toTop(PContextChangedEvent event)
      Handles a context change event, where this tabbed pane is moved to the top.
      Specified by:
      toTop in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • wasOnTop

      public void wasOnTop(PContextChangedEvent event)
      Handles a context change event, where this tabbed pane is moved from the top.
      Specified by:
      wasOnTop in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • appletStart

      public void appletStart(PContextChangedEvent event)
      Handles a context change event associated with starting an applet.
      Specified by:
      appletStart in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • appletStop

      public void appletStop(PContextChangedEvent event)
      Handles a context change event associated with stopping an applet.
      Specified by:
      appletStop in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • sizeChanged

      public void sizeChanged(PContextChangedEvent event)
      Handles a user's resizing of this tabbed pane.
      Specified by:
      sizeChanged in interface PContextChangedListener
      Parameters:
      event - the context change event to handle
    • switchToPage

      public void switchToPage(String tag, PAccountViewPage page)
      Description copied from interface: PAccountViewContext
      This method searches through the set of drill downs previously added to the current top-level page looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly. If it is not found then the page is added as a new drill down.

      If the 'tag' parameter is null, getLabel() is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down
      Specified by:
      switchToPage in interface PAccountViewContext
      Parameters:
      tag -
      page -
    • switchToPage

      public boolean switchToPage(String tag, PAccountViewPage page, String parentName)
      Description copied from interface: PAccountViewContext
      This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the summary screen and need to drill down into detailed billing data.

      This method will atempt to locate the named parent and add the PAccountViewPage as a drill down to it. It will not be added if it was previously added as a drill down - in that case it is simply made visible. If for some reason the parent is not found this method returns false and does not modify the display
      If the 'tag' parameter is null, getLabel() is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.
      Specified by:
      switchToPage in interface PAccountViewContext
      Parameters:
      tag -
      page -
      parentName -
      Returns:
      true if the parent was found and the page successfully displayed as a drill down; false otherwise
    • switchToPage

      public PAccountViewPage switchToPage(String tag, Class pageClass)
      Description copied from interface: PAccountViewContext
      This method searches through the set of drill downs previously added to the current top-level page looking for the given class type. If the given type is found, it is made visible and the breadcrumb trail is updated accordingly. Otherwise the Class is instantiated, added as a drill down, and that instance returned to the caller. This means you can call this API over and over and only one instance of the page will be created and added to the view.

      If the 'tag' parameter is null, getLabel() is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down
      Specified by:
      switchToPage in interface PAccountViewContext
      Parameters:
      tag -
      pageClass -
      Returns:
      The new visible page, or null if the switch fails.
    • switchToPage

      public PAccountViewPage switchToPage(String tag, Class pageClass, String parentName)
      Description copied from interface: PAccountViewContext
      This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the General summary screen and need to drill down into detailed billing data.

      This method will atempt to locate the named parent and locate an existing drill down of the given Class type. If the Class type exists, that instance is made the current drill down and returned to the caller. Otherwise the Class is instantiated and added as a drill down. This means you can call this method over and over and only one instance of the page will be created and added to the view. If for some reason the parent is not found this method returns false and does not modify the display.
      If the 'tag' parameter is null, getLabel() is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.
      Specified by:
      switchToPage in interface PAccountViewContext
      Parameters:
      tag -
      pageClass -
      parentName -
      Returns:
      The new visible page, or null if the switch fails.
    • switchToPreviousPage

      public void switchToPreviousPage(int idx, Enumeration tags, PAccountViewPage page)
      Assumes the current tab's position; will either move up one level in the breadcrumb trail (back) or forward if the specified tag/page does not represent the page one level up (back).
      Specified by:
      switchToPreviousPage in interface PAccountViewContext
      Parameters:
      idx -
      tags -
      page -
    • getVisibleTemplate

      public PPageTemplate getVisibleTemplate()
      Description copied from interface: PAccountViewContext
      Retrieves the encompassing template for the currently visible top-level page.
      Specified by:
      getVisibleTemplate in interface PAccountViewContext
      Returns:
      The currently visible template.
    • getPageTracker

      public PPageTracker getPageTracker()
      Description copied from interface: PAccountViewContext
      Retrieves the class that manages the navigation stack (back button)
      Specified by:
      getPageTracker in interface PAccountViewContext
      Returns:
      The stack storing the pages; used for the back button.
    • getRefreshManager

      public PRefreshManager getRefreshManager()
      Description copied from interface: PAccountViewContext
      Retrieves the class through which pages register for Refresh notification. Note that each active account view contains its own refresh manager instance, so an entity (Action) sitting outside the view (i.e. in a toolbar) will need to register each time an account is opened. At the same time, be sure not to register multiple times for the same view.
      Specified by:
      getRefreshManager in interface PAccountViewContext
      Returns:
      The data refresh manager instance.
    • addToView

      public void addToView(PAccountViewPage sp)
      Adds a page to this account view as a tab. The page being added must have been defined in the configuration file specification for this view or it will be ignored.

      This is typically used in conjunction with a page that may or may not be valid for a given account context. A page that may have been omitted from the view by returning false in its isValidContext() method should use this method to add itself back.

      Specified by:
      addToView in interface PAccountViewContext
      Parameters:
      sp - the page to add as a tab
    • removeFromView

      public void removeFromView(PAccountViewPage sp)
      Locates the tab containing this top-level page and removes that tab.

      This is typically used in conjunction with a page that may or may not be valid for a given account context. If your page suddenly goes out of context due to some event in the account, use this method to remove the tab associated with this page. Note that the specified page must be the top-level page on a tab.

      Specified by:
      removeFromView in interface PAccountViewContext
      Parameters:
      sp - the top-level page to remove from the view
    • isPartOfView

      public boolean isPartOfView(PAccountViewPage sp)
      Determines if this page is a visible tab.
      Specified by:
      isPartOfView in interface PAccountViewContext
      Parameters:
      sp - the page in question
      Returns:
      True if this page is currently a visible tab; false otherwise.
    • setSelectedIndex

      public void setSelectedIndex(int idx)
      Overrides:
      setSelectedIndex in class JTabbedPane