Class PARAllocatePanel

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

public class PARAllocatePanel extends PIACustomizablePanel implements FocusListener
UI panel that supports bill level allocation for unapplied payment or adjustment Controller classses referenced:
  • PARAllocateBean
See Also:
  • Field Details

  • Constructor Details

    • PARAllocatePanel

      public PARAllocatePanel()
  • Method Details

    • initData

      protected PModelHandle initData()
    • setAllocatePayment

      public void setAllocatePayment(boolean isAllocPymt)
      To set the boolean flag isAllocaPymt to true is Allocation dialog is allocating Un-allocated payments
      Parameters:
      isAllocPymt -
    • setModelHandle

      public void setModelHandle(PModelHandle mh)
      Set the modelHandle with the bills array.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      mh - The modelHandle of the payment/adjustment item to be allocated
    • init

      public void init(BigDecimal bdAmount)
      Initialize the total amount to be allocate and automatically fill in the amounts for allocation to open bills
      Parameters:
      bdAmounr - The total amount for allocatation, should be positive value
    • setItemModel

      public void setItemModel(PModelHandle hItem)
      set the ModelHandle for the item to be allocated from
    • focusGained

      public void focusGained(FocusEvent e)
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      Specified by:
      focusLost in interface FocusListener
    • setNegative

      public void setNegative(boolean neg)
      neg will be set to true if the allocate panel is excluding negative bills.
      Parameters:
      neg -
    • performAllocate

      public int performAllocate() throws Exception
      Gather up the amounts to allocate to each bill and pass it along as an arrayList return -1 if failed validation
      Throws:
      Exception
    • performClear

      public void performClear()
      Clear (zero out) the allocate amount column
    • 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:
      A null String.
      Throws:
      RemoteException - thrown for errors
    • hasPositiveBills

      public boolean hasPositiveBills()
      Returns true if positive bills are present in the account
      Returns:
      hasPositiveBills
    • setHasPositiveBills

      public void setHasPositiveBills(boolean hasPositiveBills)
      Sets the boolean value for
      Parameters:
      hasPositiveBills - hasPositiveBills