Class PPromotionArrayTable

All Implemented Interfaces:
PAppComponent, PAppFieldComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PFieldBean, PViewDataChangeListener, ActionListener, MouseListener, ImageObserver, MenuContainer, Serializable, Remote, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class PPromotionArrayTable extends PIASpecSpreadSheet
A PPromotionArrayTable that handles arrays in a slightly different manner. The base PIASpecSpreadSheet is not capable of handling row deletion. This class handles row deletion by rewriting all the array elements each time collectData is called. The mechanism is dependent on the assumption that the array indices are all sequential single increments starting from zero (ie 0, 1, 2 , ...). The new array will be stored in a like manner. Also the PPromotionArrayTable is customized to handle the "Null" status of the date widget that is to be displayed in the table cell.
Author:
Prameet C. Savla
See Also:
  • Constructor Details

    • PPromotionArrayTable

      public PPromotionArrayTable()
  • Method Details

    • collectData

      public void collectData(PCollectDataEvent event)
      CollectDataListener override. Causes control to save changes back to data model. Done prior to commiting changes to Portal.
      All the array elements from the original array will be overwritten. All the array elements from the current array will be written, regardless of whether they are dirty.
      Specified by:
      collectData in interface PCollectDataListener
      Overrides:
      collectData in class PIASpecSpreadSheet
      Parameters:
      event - The collect data event
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Description copied from class: PIASpreadSheet
      Establishes the PModelHandle for this component
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIASpreadSheet
      Parameters:
      data - The new PModelHandle from which information will be extracted.
      Throws:
      RemoteException
    • setRowDeletionSupported

      public void setRowDeletionSupported(boolean b)
    • getRowDeletionSupported

      public boolean getRowDeletionSupported()
      Returns the collectData(0) policy
    • setField

      public void setField(Object field) throws RemoteException
      Description copied from interface: PFieldBean
      Sets the value of the field referred to in the modelFieldDescription.
      Specified by:
      setField in interface PFieldBean
      Overrides:
      setField in class PIASpreadSheet
      Parameters:
      field - the field's value
      Throws:
      RemoteException - thrown for errors
    • editingStopped

      public void editingStopped(ChangeEvent evt)
      Invoked when editing is finished. The changes are saved, the editor object is discarded, and the cell is rendered once again. Overridden to support marking of the table and/or cells.
      Specified by:
      editingStopped in interface CellEditorListener
      Overrides:
      editingStopped in class PIASpreadSheet
      Parameters:
      evt - The change event
      See Also: