Class PExtendedServicePanel

All Implemented Interfaces:
PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewComponent, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class PExtendedServicePanel extends PIAPanelGroup
Container for extended service and device panels. The panels that are added to this container MUST be PIAExtendedServicesBase subclasses.
This component depends on setModelHandle() being called when the displayed account changes. At that point, any old data/panels are discarded. Then, new extended service/device panels are added/displayed by calling showService() or showDevice() with a PModelHandle representing a known /service or /device object. These panels are later retrieved for saving by calling getServices() or getDevices().
Version:
%version: 24 % %date_modified: Mon Jul 01 15:59:10 2002 %
Author:
kapono
See Also:
  • Constructor Details

    • PExtendedServicePanel

      public PExtendedServicePanel()
      Creates a panel that displays services/devices purchased by the customer.
  • Method Details

    • setModelHandle

      public void setModelHandle(PModelHandle pm) throws RemoteException
      Establishes the new account object from which the service/device data will be retrieved and displayed. All panels from any previous account are discarded when this is called.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIAPanel
      Parameters:
      pm -
      Throws:
      RemoteException - thrown for errors
    • clearContents

      public void clearContents()
      Removes any previously added service/device panels and returns this component to its initial pristine state.
    • getServices

      public PIAExtendedServicesBase[] getServices()
      Retrieves all extended service panels contained in this container. This is a convenience method which allows you to get the panels as an array of PIAExtendedServiceBase objects instead of Components.
      Returns:
      array of service panels, or null if there are no panels
    • getService

      public PIAExtendedServicesBase getService(PModelHandle pmh, int index)
      Retrieves the extended service panel contained in this container.
      Returns:
      the service panel, or null if there is no panel
    • getDevices

      public PIAExtendedServicesBase[] getDevices()
      Retrieves all extended device panels contained in this container. This is a convenience method which allows you to get the panels as an array of PIAExtendedServiceBase objects instead of Components.
      Returns:
      array of device panels, or null if there are no panels
    • getVisibleIDValue

      public String getVisibleIDValue()
      Retrive the ID (login) from the visible panel.
      Returns:
      the ID (login) of the visible panel
    • getIDValue

      public String getIDValue(PModelHandle pm)
      Retrive the ID (login) by given PModelHandle. The extended service panel will be retrived according to the PModelHandle then the ID will be returned. The PModelHandle must represent a known service oterwise null will be returned.
      Parameters:
      pm -
    • getServicesBases

      public Object[] getServicesBases()
      Gets the services base panels
      Returns:
    • getIDValue

      public String getIDValue(PModelHandle pm, int index)
      Retrieves the id (login) of the given PModelHandle, and the index. If the PModelHandle is unknown, null will be returned.
      Parameters:
      pm -
      index - Used for account creation - determines the array index for this service in the FldServices array.
    • showService

      public void showService(PModelHandle pm)
      Looks at the type of the given PModelHandle and retrieves the correct extended service panel for that service. The PModelHandle must represent a known service or a blank panel will be displayed.
      Parameters:
      pm -
    • showService

      public void showService(PModelHandle pm, int index)
      Retrieves the type of the given PModelHandle, and retrieves the correct extended service panel for that service. The PModelHandle must represent a known service or a blank panel will be displayed.
      Parameters:
      pm -
      index - Used for account creation - determines the array index for this service in the FldServices array.
    • showDevice

      public void showDevice(PModelHandle pm)
      Looks at the type of the given PModelHandle and retrieves the correct extended device panel for that PModelHandle. The PModelHandle must represent a known device or a blank panel will be displayed.
      Parameters:
      pm -
    • getServicePanel

      public Component getServicePanel(PModelHandle pm, int index)
      Gets the service panel from the service store by finding the key (pm+index)
    • getDevicePanel

      public Component getDevicePanel(PModelHandle pm, int index)
      Gets the device panel from the device store by finding the key (pm+index)