Class PAcctTree

All Implemented Interfaces:
PAppComponent, PAppFieldComponent, PClientComponent, PComponent, PComponentAttribute, PFieldBean, PViewDataChangeListener, ImageObserver, MenuContainer, Serializable, Remote, EventListener, Accessible, TreeSelectionListener, Scrollable

public class PAcctTree extends PIAGroupTree
PAcctTree is
See Also:
  • Constructor Details

    • PAcctTree

      public PAcctTree()
      Creates an Portal aware tree component
    • PAcctTree

      public PAcctTree(PGroupTreeModel m)
      Creates an Portal aware tree component containing data in the given model.
      Parameters:
      m - The default model to use
  • Method Details

    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Retrieves the class name of this component's controller
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIAGroupTree
      Returns:
      the component's controller for most PFieldComponents
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Description copied from class: PIAGroupTree
      Establishes the PModelHandle for this component.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIAGroupTree
      Parameters:
      data - the new PModelHandle from which to extract information
      Throws:
      RemoteException - thrown for errors
    • isCurrencyDisplay

      public boolean isCurrencyDisplay()
      Always returns false - this widget contains String data
      Specified by:
      isCurrencyDisplay in interface PComponentAttribute
      Overrides:
      isCurrencyDisplay in class PIAGroupTree
      Returns:
      true if the widget is displaying currency data; false otherwise
    • setCurrencyDisplay

      public void setCurrencyDisplay(boolean b)
      Used to determine if this component is displaying currency data. Widgets displaying currency data are capable of automatically toggling their data between 2 Portal currency types (primary invalid input: '&' secondary).
      Specified by:
      setCurrencyDisplay in interface PComponentAttribute
      Overrides:
      setCurrencyDisplay in class PIAGroupTree
      Parameters:
      b - If true, indicates the widget is displaying currency data.
    • togglePrimaryToSecondary

      public Object togglePrimaryToSecondary(int from, int to) throws RemoteException
      Does nothing - no-op
      Specified by:
      togglePrimaryToSecondary in interface PComponentAttribute
      Specified by:
      togglePrimaryToSecondary in interface PFieldBean
      Overrides:
      togglePrimaryToSecondary in class PIAGroupTree
      Parameters:
      from - Assumed to be the current currency ID being used to display the data
      to - The new currency ID to use when displaying the data
      Returns:
      null.
      Throws:
      RemoteException
    • revertToPrimary

      public void revertToPrimary(int primary) throws RemoteException
      Description copied from class: PIAGroupTree
      Does nothing.
      Specified by:
      revertToPrimary in interface PComponentAttribute
      Specified by:
      revertToPrimary in interface PFieldBean
      Overrides:
      revertToPrimary in class PIAGroupTree
      Parameters:
      primary - the primary currency ID
      Throws:
      RemoteException
    • getTopNode

      public PModelHandle getTopNode()
      returns the PModelHandle of the top node
      Returns:
      the top node's PModelHandle
    • getSelectedAccount

      public PModelHandle getSelectedAccount()
      returns the PModelHandle of the currently selected node
      Returns:
      the currently selected node's PModelHandle
    • getSelectedAccountParent

      public PModelHandle getSelectedAccountParent()
      returns the PModelHandle of the currently selected node's Parent
      Returns:
      the currently selected node's Parent's PModelHandle
    • refreshCurrentNodeLabel

      public void refreshCurrentNodeLabel()
      refreshes the label of the currently selected node by forcing a call to GrpModelNode.toString()
    • moveNode

      public void moveNode(PModelHandle acct, PModelHandle parent)
      Moves an existing node under another existing node, along with all its children
      Parameters:
      acct - The PModelHandle of the account to be moved
      parent - The PModelHandle of the new parent
    • initTree

      protected void initTree()
    • getParentHierarchy

      public void getParentHierarchy(PIAGroupTree.GrpModelNode tn) throws RemoteException, EBufException
      Gets all the nodes in a hierarchy with parent-child and stores it in a data structure.
      Parameters:
      tn - GrpModelNode
      Throws:
      RemoteException
      EBufException
    • expandSelectedNode

      protected void expandSelectedNode()
    • collapseSelectedNode

      protected void collapseSelectedNode()
    • showAllParents

      protected void showAllParents()
    • showCompleteTree

      protected void showCompleteTree()
      Shows complete hierarchy of the current account including all parents and childrens.
    • sort

      protected void sort(PIAGroupTree.GrpModelNode rNode, Comparator nodeComparator)
      Sorts an selected node along with all its children * Sorts according to 0-9 A-Z a-z order
      Parameters:
      rNode - The GrpModelNode to be sorted along with the child node