Class PCAConsumerPaymentBillPanel

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

public class PCAConsumerPaymentBillPanel extends PIACustomizablePanel implements ActionListener, PropertyChangeListener
Account creation wizard panel used for specifying the method of payment. Subclasses can add custom fields to this panel along the following lines:
 public class MyBillPanel extends PCAConsumerPaymentBillPanel {
                public MyBillPanel() {
                        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

    • PCAConsumerPaymentBillPanel

      public PCAConsumerPaymentBillPanel()
      Creates a new method of payment panel.
  • Method Details

    • setCustomData

      protected void setCustomData(PIACustomizablePanel p)
      Affords the subclass the opportunity to add a custom panel to the right of the payment setup panel.
      Parameters:
      p - The custom panel to display
    • setSelectedPaymentType

      protected void setSelectedPaymentType(int type)
    • isPaymentSelectorEnabled

      protected boolean isPaymentSelectorEnabled()
    • setPaymentSelectorEnabled

      protected void setPaymentSelectorEnabled(boolean b)
    • addNotify

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

      public void propertyChange(PropertyChangeEvent event)
      Listens for an AccountCreationSharedData.HIERARCHY property change event and forces this panel's method of payment widget to display "subordinate" if a subordinate account is being created. If a non-subordinate account is being created, the normal choices are displayed.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      event - Property change event.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Reports a "methodOfPayment" property change to any registered property change listeners
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - The action event
      Throws:
      RemoteException