Class PIACustomizablePanel

All Implemented Interfaces:
PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
AbstractSearchModule, AdjustEventPanel, BrowserPanel, BrowseWin, PAccountsResultsPanel, PAccountTitlePanel, PActiveAccountManager, PARAcctAdjustPanel, PARAllocatePanel, PARBillAdjustPanel, PARConnectionAdjustPanel, PARCreditLimitPanel, PARDebitAllocatePanel, PAREventAdjustPanel, PAREventDisputePanel, PAREventSettlementPanel, PARItemAdjustPanel, PARWriteoffPanel, PAvailableServicesPanel, PBackdateSetupPanel, PBestConfigPanel, PBestPricingSavingsPanel, PBillingPage, PBillUnitDetailsPanel, PBillUnitPanel, PCAConsumerPaymentBillPanel, PChangeAccountStatusOptionPanel, PChargeSharingPanel, PCollectionsMembershipPanel, PCollectionsSharingPanel, PComparePage, PContactPanel, PCreditLimitPage, PCustomerCenterInternals, PCustomizeProductsPanel, PDeviceSearchResultsPanelBase, PDiscountSharingPanel, PEffectiveMoveDatePanel, PGeneralPage, PI18NPanel, PIACAPaymentPanel, PIAExtendedServicesBase, PIASearchPanel, PMaintenancePage, PMapInfoPage, PMembershipPanel, PNCDetailPanel, PNCPanel, PNewServicePage, PNewServiceTable, PNonCurrencyResourcePanel, PNotesPage, PNumberResultsPanel, POwnershipPanel, PPageTemplate, PPaymentWizard, PPlanOptionsPage, PProductAttributesPanel, PProductsViewConfigPanel, PProfileMembershipPanel, PProfileSharingPanel, PPromotionPanel, PPurchasePanel, PRemoveBillInProgressPanel, PRemoveHierarchyPage, PRemovePaymentSetupPanel, PRolloverTransferPanel, PRolloverTransferSearchExtendedWizardPanel, PRolloverTransferTablePanel, PSearchButtonPanel, PSearchExtendedWizardPanel, PServiceTable, PSettopResultsPanel, PSIMResultsPanel, PSummaryPanel, PTelcoPromotionPanel, PVoucherPage, ResultsTablePanel

public class PIACustomizablePanel extends ImagePanel implements PAppComponent, PComponentAttribute, PCollectDataListener, ContainerListener, Serializable
Version:
%version: 10 % %date_modified: Fri Nov 02 09:26:04 2001 %
Author:
larrylf
See Also:
  • Field Details

  • Constructor Details

    • PIACustomizablePanel

      public PIACustomizablePanel()
      Creates a PIACustomizablePanel that contains some knowledge of Portal. This panel can display a default image centered in the background.
    • PIACustomizablePanel

      public PIACustomizablePanel(ImageIcon img, int mode)
      Creates a PIACustomizablePanel that contains some knowledge of Portal. This panel can display a specified image in the background.
      Parameters:
      img - the image to display
      mode - an indicator of how to display the background image
  • Method Details

    • unregister

      public void unregister() throws RemoteException
      Used to disconnect the controller from the component for all child widgets contained within this panel.
      Specified by:
      unregister in interface PClientComponent
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Establishes the PModelHandle for this component and all its descendants.
      Specified by:
      setModelHandle in interface PComponent
      Parameters:
      data - the new PModelHandle from which to extract information
      Throws:
      RemoteException - thrown for errors
    • getModelHandle

      public PModelHandle getModelHandle() throws RemoteException
      Retrieves the PModelHandle for this component.
      Specified by:
      getModelHandle in interface PComponent
      Returns:
      The PModelHandle associated with this component.
      Throws:
      RemoteException - thrown for errors
    • isLight

      public boolean isLight() throws RemoteException
      Determines if this component delegates PModelHandle processing to its parent container. If so, the parent container passes the PModelHandle to this component on the server side (by way of the controller), which saves a client/server round trip for data exchange.

      If specific processing is required, when PModelHandle is called subclass this component and override this method. Otherwise, setModelHandle() is not called.

      Specified by:
      isLight in interface PComponent
      Returns:
      False, by default.
      Throws:
      RemoteException - thrown for errors
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Retrieves the class name of this component's controller, in this case, null.
      Specified by:
      getControllerClassName in interface PComponent
      Returns:
      A null String.
      Throws:
      RemoteException - thrown for errors
    • getTools

      public Vector getTools()
      Gets a list of actions supported by this component. When subclassed, the overriding class should call its superclass version, then add its actions to the returned list. This preserves actions supplied by base classes. The default, supplied here, includes help for this component.
      Specified by:
      getTools in interface PClientComponent
      Returns:
      A Vector that contains Action objects.
    • setResourceName

      public void setResourceName(String name)
      Sets the base resource name used in resource lookup. Basically, the resource name is this base, followed by a dot, followed by the local name (label).
      Specified by:
      setResourceName in interface PClientComponent
      Parameters:
      name - the new base resource name
    • getResourceName

      public String getResourceName()
      Gets the base resource name used in resource lookup.
      Specified by:
      getResourceName in interface PClientComponent
      Returns:
      A String with the base resource name.
    • getRemoteComponent

      public Remote getRemoteComponent()
      Gets a reference to the remote component for this object. The remote component interfaces with this component's controller.
      Specified by:
      getRemoteComponent in interface PAppComponent
      Returns:
      A Remote component.
    • viewDataChange

      public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
      Overrides PViewDataChangeListener. This method is no longer called by the controller itself. To ensure backward compatibility, it is called after the model is set, by any operation that causes a change in the display data. The client code should call the appropriate get() methods on the controller to get the data, because the PViewDataChangeEvent parameter is no longer used.
      Specified by:
      viewDataChange in interface PViewDataChangeListener
      Parameters:
      event - the PViewDataChangeEvent event that describes the change. No longer used. By default, the value passed in is always set to null.
      Throws:
      RemoteException - thrown for errors
    • setBackgroundImageSource

      public void setBackgroundImageSource(String loc)
      Sets the supplied background image.
      Parameters:
      loc - the location of the image source
    • getBackgroundImageSource

      public String getBackgroundImageSource()
      Gets the supplied background image.
      Returns:
      A String with the location of the image source.
    • setBackgroundImageMode

      public void setBackgroundImageMode(int drawMode)
      Sets the drawing mode for the background image.
      Overrides:
      setBackgroundImageMode in class ImagePanel
      Parameters:
      drawMode - the mode to use for drawing the background image
    • componentAdded

      public void componentAdded(ContainerEvent e)
      Tracks all Portal-aware components that are added to this panel.
      Specified by:
      componentAdded in interface ContainerListener
      Parameters:
      e - the event that indicates a child was added
    • componentRemoved

      public void componentRemoved(ContainerEvent e)
      Tracks all Portal-aware components that are removed from this panel.
      Specified by:
      componentRemoved in interface ContainerListener
      Parameters:
      e - the event that indicates a child was removed
    • setRequired

      public void setRequired(boolean b)
      Delegates the setRequired() method call to all Portal-aware descendants.
      Specified by:
      setRequired in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in REQUIRED state
    • isRequired

      public boolean isRequired()
      Determines if any descendant is required in its current context.
      Specified by:
      isRequired in interface PComponentAttribute
      Returns:
      True if any descendant is marked REQUIRED; false otherwise.
    • setError

      public void setError(boolean b)
      Passes the setError method call to all Portal-aware descendants.
      Specified by:
      setError in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in ERROR state
    • isError

      public boolean isError()
      Determines if any descendant is marked ERROR in its current context.
      Specified by:
      isError in interface PComponentAttribute
      Returns:
      True if any descendant is marked ERROR; false otherwise.
    • isDirty

      public boolean isDirty()
      Determines if any descendant is marked DIRTY in its current context.
      Specified by:
      isDirty in interface PComponentAttribute
      Returns:
      True if any descendant is marked DIRTY; false otherwise.
    • setDefault

      public void setDefault()
      Establishes the current value of every Portal-aware descendant as the default value for that component.
      Specified by:
      setDefault in interface PComponentAttribute
    • isCurrencyDisplay

      public boolean isCurrencyDisplay()
      Determines whether any component in the widget tree currently displays currency data.
      Specified by:
      isCurrencyDisplay in interface PComponentAttribute
      Returns:
      True if a component currently displays currency data; false otherwise.
      Since:
      Release 6.2
    • setCurrencyDisplay

      public void setCurrencyDisplay(boolean b)
      Determines if this component currently displays currency data. Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type. This method iterates through the widget tree and calls setCurrencyDisplay on every child component
      Specified by:
      setCurrencyDisplay in interface PComponentAttribute
      Parameters:
      b - if true, indicates that the widget currently displays currency data
      Since:
      Release 6.2
    • togglePrimaryToSecondary

      public Object togglePrimaryToSecondary(int pri, int sec) throws RemoteException
      Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplay returns true), converts the displayed data to the new currency type.
      Specified by:
      togglePrimaryToSecondary in interface PComponentAttribute
      Parameters:
      pri - The primary Portal currency ID
      sec - The secondary Portal currency ID
      from - the current currency ID used to display the data
      to - the new currency ID to use to display the data
      Throws:
      RemoteException - thrown for errors
      Since:
      Release 6.2
    • revertToPrimary

      public void revertToPrimary(int primary) throws RemoteException
      Causes previously toggled data to be reverted back to the primary currency.
      Specified by:
      revertToPrimary in interface PComponentAttribute
      Parameters:
      primary - The primary currency
      Throws:
      RemoteException
    • isClean

      public boolean isClean()
      Determines if any descendant is marked DIRTY or ERROR.
      Returns:
      True if no descendant is marked DIRTY or ERROR, false otherwise.
    • setClean

      public void setClean()
      A convenience method that marks all PFieldComponent components in this panel as CLEAN. Useful if components have been marked DIRTY because InputTracking is enabled, and the data has been modified.
      Specified by:
      setClean in interface PComponentAttribute
    • setInputTracking

      public void setInputTracking(boolean b)
      A convenience method to toggle the inputTracking property for all descendants of this panel.
      Specified by:
      setInputTracking in interface PComponentAttribute
      Parameters:
      b - a flag indicating whether inputTracking should be supported
    • isInputTracking

      public boolean isInputTracking()
      Serves as a convenience method to toggle the inputTracking property for all descendants of this panel.
      Specified by:
      isInputTracking in interface PComponentAttribute
      Parameters:
      b - a flag that indicates whether inputTracking is supported
      Returns:
      True if input tracking is enabled; false otherwise.
    • clear

      public void clear()
      A convenience method that clears all Portal-aware descendants of this panel.
      Specified by:
      clear in interface PComponentAttribute
    • resetToDefault

      public void resetToDefault()
      A convenience method that resets every field on this panel.
      Specified by:
      resetToDefault in interface PComponentAttribute
    • collectData

      public void collectData(PCollectDataEvent event)
      Overrides PCollectDataListener. Forwarded to all contained GUIComponents that are also PCollectDataListeners.
      Specified by:
      collectData in interface PCollectDataListener
      Parameters:
      event - the PCollectDataEvent event
    • containsError

      public boolean containsError(Object obj)
      This method is not implemented in this class, but provides a mechanism to pass error data to subclasses. If a subclass contains non-PIA components, that subclass might need to set a flag that indicates those components contain errors. This method provides that mechanism.

      Typically the argument to this method is an array of CustomerValErrorData objects, but you can use it for other types as well.

      Parameters:
      obj - a generic parameter used to pass error data to the panel
      Returns:
      False by default.
    • getBundle

      public static ResourceBundle getBundle(String name)
      Used by PIAPanel subclasses set up for use in Borland JBuilder. JBuilder requires use of the ResourceBundle.getBundle() method to statically load resource bundles: however, at runtime the BAS methodology should be used. This method differentiates between design time and run time to ensure the correct methodology is used.
      Parameters:
      name - the name of the ResourceBundle to retrieve
      Returns:
      The appropriate ResourceBundle, if it is design time; otherwise, the resource bundle associated with the current PClientContext.
    • processError

      protected Object processError(PModelHandle err)
      Provides a hook for subclasses to react to errors. A subclass might need to override collectData() to pass along "other" data. If an error occurs, the subclass needs to check if it is the cause of the error and respond to it appropriately.
      Parameters:
      err - the error model handle
      Returns:
      Another hook in case data needs to be returned.