Class PIASpecSpreadSheet

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
Direct Known Subclasses:
BalanceGroupSearchResultsTable, PAREventResults, PArrayTable, PBillsResults, PIAIndexedArrayTable, PIAPhoneTable, PIASearchResultsPanel, PPromotionArrayTable, PServicesDealsProductsTable, ServiceSearchResultsTable

public class PIASpecSpreadSheet extends PIASpreadSheet implements PCollectDataListener
Swing compatible, Portal aware spreadsheet display class.
This table allows you to set field descriptions per column, making it very easy to display Portal data in table-form. Multiple fields can also be displayed in a column if you take full advantage of the model invalid input: '&' display field descriptions and the display field format API.
Version:
%revision%
See Also:
  • Constructor Details

    • PIASpecSpreadSheet

      public PIASpecSpreadSheet()
      Creates a new Portal-aware spread sheet component. Selection of individual cells is allowed.
  • Method Details

    • setCollectChangedCellsOnly

      public void setCollectChangedCellsOnly(boolean b)
      Policy that determines how collectData() works for this component. Either only modified cells are returned, or an entire row containing a dirty cell is returned. By default, only modified cells are returned.
      Parameters:
      b - the policy determining how collectData() works.
    • getCollectChangedCellsOnly

      public boolean getCollectChangedCellsOnly()
      Returns the collectData(0) policy
    • setIdxModelFieldDescription

      public void setIdxModelFieldDescription(String[] fieldDesc) throws RemoteException
      Sets the description of the field in the data model that is most important for the given column.
      Parameters:
      fieldDesc - String array describing the fields used by the columns
      Throws:
      RemoteException
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from class: PIASpreadSheet
      Retrieves the class name of this component's controller
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIASpreadSheet
      Returns:
      The name of the controller for this component
      Throws:
      RemoteException
    • setIdxModelFieldDescription

      public void setIdxModelFieldDescription(int col, String fieldDesc) throws RemoteException
      Sets the description of the field in the data model that is most important for the given column.
      Parameters:
      col - The spreadsheet column for this description
      fieldDesc - A String describing the field used by this column
      Throws:
      RemoteException
    • getIdxModelFieldDescription

      public String[] getIdxModelFieldDescription() throws RemoteException
      Returns:
      The model field descriptions for the columns in this table
      Throws:
      RemoteException
    • getIdxModelFieldDescription

      public String getIdxModelFieldDescription(int col) throws RemoteException
      Parameters:
      col - The table column
      Returns:
      The model field descriptions for the given column in this table
      Throws:
      RemoteException
    • setIdxDisplayFieldDescription

      public void setIdxDisplayFieldDescription(String[] fieldDisp) throws RemoteException
      Sets the description of the field(s) in the data model that should be displayed in a given column
      Parameters:
      fieldDesc - A String describing the field(s) displayed in the column
      Throws:
      RemoteException
    • setIdxDisplayFieldDescription

      public void setIdxDisplayFieldDescription(int col, String fieldDisp) throws RemoteException
      Sets the description of the field(s) in the data model that should be displayed in a given column
      Parameters:
      col - The spreadsheet column the field(s) should be displayed in
      fieldDesc - A String describing the field(s) displayed in the column
      Throws:
      RemoteException
    • getIdxDisplayFieldDescription

      public String[] getIdxDisplayFieldDescription() throws RemoteException
      Returns:
      The display field descriptions for the columns in this table
      Throws:
      RemoteException
    • getIdxDisplayFieldDescription

      public String getIdxDisplayFieldDescription(int col) throws RemoteException
      Retrieves the display field description for the given column
      Parameters:
      col - The spreadsheet column
      Returns:
      The display field description for the given column in this table
      Throws:
      RemoteException
    • setIdxCurrencyDisplay

      public void setIdxCurrencyDisplay(boolean[] b) throws RemoteException
      Used to express which table columns are displaying currency data
      Parameters:
      b - An array of boolean vals. True indicates the column is displaying currency data; false some other type of data
      Throws:
      RemoteException
    • setIdxCurrencyDisplay

      public void setIdxCurrencyDisplay(int col, boolean b) throws RemoteException
      Used to the given table column is displaying currency data
      Parameters:
      col - The spreadsheet column to mark as displaying currency
      b -
      Throws:
      RemoteException
    • getIdxCurrencyDisplay

      public boolean[] getIdxCurrencyDisplay() throws RemoteException
      Returns:
      The currency display status for the columns in this table
      Throws:
      RemoteException
    • getIdxCurrencyDisplay

      public boolean getIdxCurrencyDisplay(int col) throws RemoteException
      Retrieves the currency display status for the given column
      Parameters:
      col - The spreadsheet column
      Returns:
      The currency display status for the given column in this table
      Throws:
      RemoteException
    • setData

      public void setData(Vector v)
      Overridden to possibly convert the data to secondary currency if required.
      Overrides:
      setData in class PIASpreadSheet
      Parameters:
      v - The incoming data for the table
    • togglePrimaryToSecondary

      public Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
      Converts all data (in currency columns) from the first currency type to the second currency type.
      Specified by:
      togglePrimaryToSecondary in interface PComponentAttribute
      Specified by:
      togglePrimaryToSecondary in interface PFieldBean
      Overrides:
      togglePrimaryToSecondary in class PIASpreadSheet
      Parameters:
      primary -
      secondary -
      Returns:
      The converted value.
      Throws:
      RemoteException
    • 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
      Specified by:
      revertToPrimary in interface PFieldBean
      Overrides:
      revertToPrimary in class PIASpreadSheet
      Parameters:
      primary - The primary currency ID for an account
      Throws:
      RemoteException
    • setUntypedData

      public void setUntypedData(boolean b)
      Use this API to inform the table that the PModelHandle data it will receive from BAS will contain UNTYPED data (hand-generated FLists). This method is only really important if you are taking advantage of the BAS displayFieldDescription/modelFieldDescription stuff.
      This method is necessary because when converting between FLists and PModelHandles, BAS will attempt to read Poid objects and refresh data if the FList contains such entities. However, if you have hand crafted FLists you typically don't want this to happen. You want the FList you created to be turned into a PModelHandle and that exact same FList returned when you ask for it. Call this method if that is the situation you find yourself in.
      Something to consider. If you are getting FLists back from and Portal search opcode and displaying them in a table, you probably don't need to call this API - you will probably already have real Portal storable classes.
      Overrides:
      setUntypedData in class PIASpreadSheet
      Parameters:
      b - If true, informs the table its data should be considered UNTYPED This is false by default
    • isUntypedData

      public boolean isUntypedData()
      Determines if this table supports typed or untyped data
      Overrides:
      isUntypedData in class PIASpreadSheet
      Returns:
      The state of this table's data
    • viewDataChange

      public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
      Implements the PViewDataChangeListener interface
      Specified by:
      viewDataChange in interface PViewDataChangeListener
      Overrides:
      viewDataChange in class PIASpreadSheet
      Parameters:
      event - the data change event
      Throws:
      RemoteException - e
    • collectData

      public void collectData(PCollectDataEvent event)
      CollectDataListener override. Causes control to save chanes back to data model. Done prior to commiting changes to Portal.
      For now, if the number of rows/columns have changed it is the users responsibility to collect the data. There is no time to figure out how to adjust the array indices if rows/columns have been removed. It'll get done later.
      Specified by:
      collectData in interface PCollectDataListener
      Parameters:
      event - The collect data event
    • ignoreRenderingForThisClass

      public void ignoreRenderingForThisClass(Class[] cls, int[] columnNo)
    • resetClassIgnoring

      public void resetClassIgnoring()
    • isIgnoringClassConfigured

      public boolean isIgnoringClassConfigured()
    • getIgnoreClassName

      public String getIgnoreClassName(int column)