Class ItemChargesTreeTable

All Implemented Interfaces:
PComponentAttribute, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable
Direct Known Subclasses:
PendingItemChargesTreeTable

public class ItemChargesTreeTable extends JTreeTable implements PComponentAttribute
Shows item charges for a bill The PComponentAttribute is implemented to take care multiple currencies.
See Also:
  • Constructor Details

    • ItemChargesTreeTable

      public ItemChargesTreeTable(TreeTableModel model)
      Parameters:
      TreeTableModel - model
  • Method Details

    • clear

      public void clear()
      Clears existing data from the component, and resets the value to zero.
      Specified by:
      clear in interface PComponentAttribute
    • isRequired

      public boolean isRequired()
      Determines if this component is a required field in its current context. This provides a visual indicator only; there is no mechanism to enforce that required fields be filled in.
      Specified by:
      isRequired in interface PComponentAttribute
      Returns:
      True if this field is marked REQUIRED; false otherwise.
    • setRequired

      public void setRequired(boolean b)
      Marks this component as required in its current context. This is currently a visual indicator only; there is no mechanism to enforce that required fields be filled in.
      Specified by:
      setRequired in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in REQUIRED state
    • isError

      public boolean isError()
      Determines if this component is currently in an ERROR state.
      Specified by:
      isError in interface PComponentAttribute
      Returns:
      True if this component is in an ERROR state; false otherwise.
    • setError

      public void setError(boolean b)
      Marks this component as containing erroneous data in the current context, or unmarks the ERROR state, depending on the parameter.
      Specified by:
      setError in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in ERROR state; if false, removes the ERROR state
    • setInputTracking

      public void setInputTracking(boolean b)
      If the inputTracking property is enabled, any changes made by the user to the component are tracked and the component is marked DIRTY. If the user modifies the data and returns it to its default or original state, the component is marked CLEAN or not DIRTY.
      Specified by:
      setInputTracking in interface PComponentAttribute
      Parameters:
      b - the state of the inputTracking property
    • isInputTracking

      public boolean isInputTracking()
      Determines if inputTracking is enabled.
      Specified by:
      isInputTracking in interface PComponentAttribute
      Returns:
      True if inputTracking is enabled; false otherwise.
    • setClean

      public void setClean()
      Resets the component to the CLEAN state. If the component was in a DIRTY or ERROR state, this method removes those attributes. A required component is still marked REQUIRED after a call to this method.
      Specified by:
      setClean in interface PComponentAttribute
    • isDirty

      public boolean isDirty()
      Determines if this component is currently in a DIRTY state.
      Specified by:
      isDirty in interface PComponentAttribute
      Returns:
      True if the user has modified the data represented by this component, false otherwise. It also returns false if inputTracking is not enabled.
    • setDefault

      public void setDefault()
      Establishes the current value (or element count, depending on the given component) as the default value. Any modifications made after this method is called will result in a DIRTY component.
      Specified by:
      setDefault in interface PComponentAttribute
    • isCurrencyDisplay

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

      public void setCurrencyDisplay(boolean b)
      Determines whether 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.
      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 primary, int secondary) throws RemoteException
      Causes the component to use the BEIDManager to convert its data.
      Specified by:
      togglePrimaryToSecondary in interface PComponentAttribute
      Parameters:
      primary - the current currency ID used to display the data
      secondary - 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 the widget to display its data in the primary currency
      Specified by:
      revertToPrimary in interface PComponentAttribute
      Parameters:
      primary - The primary currency ID for an account
      Throws:
      RemoteException
    • resetToDefault

      public void resetToDefault()
      Resets the component value to the original value (that which was established by a call to setDefault()). If no default value exists, the component data is cleared.
      Specified by:
      resetToDefault in interface PComponentAttribute
    • setTreeTableProperties

      public void setTreeTableProperties()
    • makeTestTree

      public ItemChargeNode makeTestTree(ItemChargeNode root)
    • makeTree

      public ItemChargeNode makeTree(PModelHandle pmhAllItemCharges, ItemChargeNode root) throws EBufException
      Parameters:
      pmhAllItemCharges -
      root -
      Returns:
      Throws:
      EBufException
    • add

      public static BigDecimal add(BigDecimal f1, BigDecimal f2)
      Parameters:
      f1 -
      f2 -
      Returns:
    • addNode

      public void addNode(ItemChargeObj ico, ItemChargeNode root)
    • export

      public void export(BufferedWriter bw, String caption) throws IOException, UnsupportedEncodingException
      Parameters:
      bw -
      caption -
      Throws:
      IOException
      UnsupportedEncodingException
    • main

      public static void main(String[] args)
      Parameters:
      args - []