Class PBillingCycleAndTaxSetupPage

All Implemented Interfaces:
PAccountViewPage, PCCPage, PResettable, PSpreadSheetListener, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ActionListener, ContainerListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class PBillingCycleAndTaxSetupPage extends PMaintenancePage implements ItemListener, PResettable, PSpreadSheetListener, ActionListener
Panel for viewing/modifying Billing and Tax setup information during account maintenence.

Subclasses can add custom fields/panel to this panel along the following lines:
 public class MyPanel extends PBillingCycleAndTaxSetupPage {
                public MyPanel() {
                        PIACustomizablePanel p = new PIACustomizablePanel();
                        p.setLayout(new GridBagLayout());
                        p.add(new JLabel("One"), new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                                ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                                new Insets(10, 5, 0, 0), 0, 0));
                        p.add(new JLabel("Two"), new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
                                ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                                new Insets(10, 5, 0, 0), 0, 0));
                        p.add(new JTextField(10), new GridBagConstraints(1, 0, 1,1, 0.0, 0.0
                                ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                                new Insets(10, 5, 0, 0), 0, 0));
                        p.add(new JTextField(10), new GridBagConstraints(1, 1, 1,1, 0.0, 0.0
                                ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                                new Insets(10, 5, 0, 0), 0, 0));
                        setCustomData(p);
                }
 }
 
See Also:
  • Constructor Details

    • PBillingCycleAndTaxSetupPage

      public PBillingCycleAndTaxSetupPage()
  • Method Details

    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Retrieves the class name of this component's controller, in this case, null.
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIACustomizablePanel
      Returns:
      Throws:
      RemoteException
    • addNotify

      public void addNotify()
      Overridden to apply style to some of the fonts
      Overrides:
      addNotify in class JComponent
    • enteringPage

      public void enteringPage()
      Description copied from class: PMaintenancePage
      This method will be called right after a page is made visible via a drilldown. The default implementation inspects the currency being used to display data for the client at large and compares it to the currency used by the panel. If they differ primaryToSecondary() is called.
      This implementation also looks at the internal refresh flag to determine if a subclass has indicated the page is out of date. If it is, this method invokes the setModelHandle() method with the current PModelHandle.

      Subclasses that override this method should call super.enteringPage()
      Specified by:
      enteringPage in interface PCCPage
      Overrides:
      enteringPage in class PMaintenancePage
    • refresh

      public void refresh()
      Description copied from class: PMaintenancePage
      Called when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.
      Specified by:
      refresh in interface PAccountViewPage
      Overrides:
      refresh in class PMaintenancePage
    • save

      public void save() throws PSaveException
      Commit changes to Portal
      Specified by:
      save in interface PAccountViewPage
      Overrides:
      save in class PMaintenancePage
      Throws:
      PSaveException
    • setModelHandle

      public void setModelHandle(PModelHandle accMH) throws RemoteException
      Updates the page with new data
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      accMH - the new PModelHandle from which to extract information
      pm - the model handle
      Throws:
      RemoteException - thrown for errors
    • collectData

      public void collectData(PCollectDataEvent event)
      Retrieves modified data from the panel
      Specified by:
      collectData in interface PCollectDataListener
      Overrides:
      collectData in class PIACustomizablePanel
      Parameters:
      event - the PCollectDataEvent event
    • resetToDefault

      public void resetToDefault()
      Description copied from class: PIACustomizablePanel
      A convenience method that resets every field on this panel.
      Specified by:
      resetToDefault in interface PComponentAttribute
      Overrides:
      resetToDefault in class PIACustomizablePanel
    • setClean

      public void setClean()
      Resets the dirty/error state of this panel. Any fields marked as changed or in error are reset graphically.
      Specified by:
      setClean in interface PComponentAttribute
      Overrides:
      setClean in class PIACustomizablePanel
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Determines the payment type from the account object represented in the model handle, and explicitely calls setModelHandle() on the panel for that payment type. This avoids exceptions in every panel that does not represent that payment type.
      Specified by:
      itemStateChanged in interface ItemListener
      Parameters:
      pm - the model handle
    • getPaymentType

      public int getPaymentType()
      Returns the currently selected payment type
    • isPaymentTypeChanged

      public boolean isPaymentTypeChanged()
      Returns:
    • isBillingDataChanged

      public boolean isBillingDataChanged()
      Returns:
    • setSupportSubordinate

      public void setSupportSubordinate(boolean supported)
      Parameters:
      supported -
    • setCustomData

      protected void setCustomData(PIACustomizablePanel p)
      The custom panel is set to the main panel, from the subclass.
      Parameters:
      p - Panel to be displayed
    • preCommit

      protected void preCommit(PModelHandle pm) throws PSaveException
      Parameters:
      pm -
      Throws:
      PSaveException
    • postCommit

      protected void postCommit()
    • selectionChanged

      public void selectionChanged(PSpreadSheetEvent pe)
      Description copied from interface: PSpreadSheetListener
      Called when the user performs some type of gesture in the spreadsheet, for example, a mouse click or pressing the Enter or Return key.
      Specified by:
      selectionChanged in interface PSpreadSheetListener
      Parameters:
      pe -
    • setCustomDomFld

      public void setCustomDomFld(PIASpinnerField sf)
      Add custom Spinner field in place of existing DOM field
    • setCustomDomComponent

      public void setCustomDomComponent(Component cComp)
      Add custom Component in place of existing DOM field
    • showNextBillingCycle

      protected void showNextBillingCycle(boolean flag)
      This method can be used in the extended payment page, if the Next Billing Cycle RO field need to be visible off/on.
    • setTaxSetupEnabled

      protected void setTaxSetupEnabled(boolean flag)
      This method can be used to disable the Tax Setup panel completely.
    • constructFormatString

      public String constructFormatString(String sFormatString, int[] iDiallowedList)
      Constructs a format string that excludes exemption types that are present in the exemption table.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      e -