Class PPageTemplate

All Implemented Interfaces:
BillInfoChangeListener, PaymentChangeListener, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, VetoableChangeListener, Serializable, EventListener, Accessible

Used internally as a wrapper around each page/screen in the tabbed pane. This template creates the PBreadCrumbs component and places it along the top. It takes care of providing borders around the page as well. The "real" page/screen to be viewed on a given tabbed pane is added below the PBreadCrumbs component. This component also supports a simulated drill down effect which allows the user to change viewed screens while remaining on the same page.
Version:
%version: 19 % %date_modified: Mon Nov 26 13:50:32 2001 %
Author:
kapono
See Also:
  • Constructor Details

    • PPageTemplate

      public PPageTemplate(String tag, PAccountViewPage page)
      Instantiates the template, with the given component being created as the base for this page. The tag will be placed in the breadcrumb trail as the root link in the trail whenever a drilldown from the base page occurs.
      Parameters:
      tag - The label to be used in the breadcrumb trail for the given page
      page - The root/base component
  • Method Details

    • setModelHandle

      public void setModelHandle(PModelHandle pm) throws RemoteException
      A mechanism for passing in a new account for display
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      pm - the new PModelHandle from which to extract information
      The - model handle for a new account
      Throws:
      RemoteException - thrown for errors
    • getBaseComponent

      public PAccountViewPage getBaseComponent()
      Return the base component in this template
      Returns:
      The panel that was originally added as the base component
    • getVisibleComponent

      public PAccountViewPage getVisibleComponent()
      Returns the currently visible component in this template. This may be the base component if that is the component that is visible.
      Returns:
      The currently visible component in this template
    • getPageNames

      public String[] getPageNames()
      Returns the names of all previously added drill down components and the name of the base component as well. The names returned will be the breadcrumb trail tags associated with each component.
      Returns:
      The names of all drill downs previously added to this template
    • getPageTypes

      public Class[] getPageTypes()
      Returns the Class types of all previously added drill down components including the type of the base component as well.
      Returns:
      the Class type for every drill down previously added to this template
    • getComponentFrom

      public PAccountViewPage getComponentFrom(String name)
      Retrieves the page that was added to this template with the given tag.
      Parameters:
      name - The tag used when the page was originally added
      Returns:
      The page instance, or null if it does not exist
    • getComponentFrom

      public PAccountViewPage getComponentFrom(Class type)
      Retrieves the first instance of the given Class type
      Parameters:
      The - Class type to locate
      Returns:
      The page instance, or null if it does not exist
    • addPage

      public void addPage(String tag, PAccountViewPage page)
      This method should be called when you want to simulate drilling down from one screen to another. When used in conjunction with a tabbed pane, this method allows the user to switch to a different page while remaining on the current tab in the tabbed pane.
      Parameters:
      tag - The label to be used in the breadcrumb trail for this component.
      page - The component which will become the new active page
    • gotoExisting

      public void gotoExisting(Enumeration tags, PAccountViewPage page)
      Parameters:
      tags -
      page - The component which will become the new active page
    • gotoPage

      public boolean gotoPage(String tag, PAccountViewPage page)
      This method searches through the set of drill downs previously added to this template looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly.
      If you attempt to goto a page that is already visible, this method is basically a no-op. Nothing will change visually.
      Parameters:
      tag - The label to display in the breadcrumb trail
      page - The new screen to display
      Returns:
      true if the page if successfully found; false otherwise
    • gotoPage

      public boolean gotoPage(String tag, PAccountViewPage page, boolean updateTrail)
      This method searches through the set of drill downs previously added to this template looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly.
      If you attempt to goto a page that is already visible and the 'updateTrial' parameter is true, the breadcrumb trail will be updated to reflect that you are "drilling down" though the page itself will not be updated. This might be useful if you have previously cleared the trail and attempt to switch to the current page.
      Parameters:
      tag - The label to display in the breadcrumb trail
      page - The new screen to display
      updateTrail - If true, add a link to the trail. Otherwise, no update will be made to the breadcrumb trail.
      Returns:
      true if the page if successfully found; false otherwise
    • clearBreadCrumbs

      public void clearBreadCrumbs()
      Wipes out the existing breadcrumb trail, leaving it empty.
    • getBreadCrumb

      public String getBreadCrumb()
      Retrieves the current breadcrumb label
      Returns:
      The current breadcrumb label
    • getBreadCrumbTrail

      public Enumeration getBreadCrumbTrail()
      Returns:
      The current breadcrumb trail as an enumeration starting at the beginning of the trail.
    • markAllForRefresh

      public void markAllForRefresh()
      Mark every page in this template (toplevel, and any drill downs) as needing to be refreshed.
    • recycle

      public void recycle()
      Responsible for cleaning up the component and preparing it for reuse.
    • billInfoChange

      public void billInfoChange(BillInfoChangeEvent e)
      listen to billInfoChange event
      Specified by:
      billInfoChange in interface BillInfoChangeListener
      Parameters:
      e - a ServiceChangeEvent encapsulating the event information
    • paymentChange

      public void paymentChange(PaymentChangeEvent e)
      Description copied from interface: PaymentChangeListener
      Called when an event is sent out that impacts the payment type or related billing info (billing frequency, day of month, cycle)
      Specified by:
      paymentChange in interface PaymentChangeListener
      Parameters:
      e - a PaymentChangeEvent encapsulating the event information
    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class JComponent
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class JComponent
    • vetoableChange

      public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
      This method gets called before a link switch occurs
      Specified by:
      vetoableChange in interface VetoableChangeListener
      Parameters:
      evt - a PropertyChangeEvent object describing the event source and the property that has changed.
      Throws:
      PropertyVetoException - if the recipient wishes the property change to be rolled back.