Class PIAPhoneTable

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 PIAPhoneTable extends PIASpecSpreadSheet
A table that displays phone number information from the Nameinfo array
Version:
%version: 18 % %date_modified: Sat Oct 13 17:03:33 2001 %
Author:
kapono
See Also:
  • Field Details

    • trackDeletion

      protected boolean trackDeletion
    • removedIndexes

      protected ArrayList<Integer> removedIndexes
    • phoneTypePicker

      protected JComboBox phoneTypePicker
    • modifyDlg

      protected JDialog modifyDlg
    • phoneNumberTF

      protected JTextField phoneNumberTF
    • okBtn

      protected JButton okBtn
    • canBtn

      protected JButton canBtn
    • addBtn

      protected JButton addBtn
  • Constructor Details

    • PIAPhoneTable

      public PIAPhoneTable()
      Constructs a 2 column table displaying phone numbers and phone number descriptions (i.e. home, work, etc.)
  • Method Details

    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Retreives the class name of the controller for this component
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIASpecSpreadSheet
      Returns:
      the name of the controller for this component
      Throws:
      RemoteException
    • viewDataChange

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

      public void setTrackDeletion(boolean b)
      Determines if deletions in the phone table are tracked. This is required if you're dealing with pre-existing phone data and you need to delete one of the entries.
      The default is false.
      Parameters:
      b - The state of the trackDeletion property
    • isTrackDeletion

      public boolean isTrackDeletion()
      Returns the state of the trackDeletion property
      Returns:
      the state of the property
    • removeRow

      public void removeRow(int row)
      Overridden to track the type of phone number that is being deleted
      Overrides:
      removeRow in class PIASpreadSheet
      Parameters:
      row - The row to remove
    • addItem

      public void addItem()
      Adds a new phone type entry. The entry added is based on the display field format - the first entry in the format that is not already present in the table is added. Duplicate entries are not allowed.
    • deleteItem

      public void deleteItem()
      Deletes all selected items
    • modifySelectedItem

      public void modifySelectedItem()
      Called to modify the data in the selected row. If no row is selected this method returns immediately.
    • canAddItem

      public boolean canAddItem()
      Useful if you want to enable/disable the controls that allow the user to add/delete rows.
      Returns:
      true if you can add an additional row, false otherwise
    • canDeleteItem

      public boolean canDeleteItem()
      Useful if you want to enable/disable the controls that allow the user to add/delete rows.
      Returns:
      true if items exist for deletion, false otherwise
    • swapFieldDescriptionIndex

      public void swapFieldDescriptionIndex(int index)
      Establishes the nameinfo array index this phone table editor is being used for. Values less than one are ignored.
      Parameters:
      index - The PIN_FLD_NAMEINFO array index this data should be stored in.
    • setModelHandle

      public void setModelHandle(PModelHandle pm) throws RemoteException
      set data to the table
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIASpreadSheet
      Parameters:
      pm - The new PModelHandle from which information will be extracted.
      Throws:
      RemoteException
    • collectData

      public void collectData(PCollectDataEvent event)
      CollectDataListener override. Causes control to save chanes back to data model. Done prior to commiting changes to Portal
      Specified by:
      collectData in interface PCollectDataListener
      Overrides:
      collectData in class PIASpecSpreadSheet
      Parameters:
      event - The collect data event
    • getPhoneList

      public ArrayList getPhoneList()
    • selectRowWithError

      public void selectRowWithError(com.portal.app.util.CustomerValErrorData[] err)
      Highlights the exact row with error (This will select only the first matching row if there are multiple rows with error)
      Parameters:
      err - Error data
    • resetToDefault

      public void resetToDefault()
      This method resets the modifyDlg to null and clears the contents from the table.
      Specified by:
      resetToDefault in interface PComponentAttribute
      Overrides:
      resetToDefault in class PIASpreadSheet