Class ResultsTablePanel

All Implemented Interfaces:
PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ResultsDisplay, SearchInfoListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
EventResultsTablePanel

public class ResultsTablePanel extends PIACustomizablePanel implements ResultsDisplay
A bean that is used for displaying result information for BrowseWin. Search results are displayed in a table. Double clicking on a table item that is of type DataTemplate will display detailed information about that node in a dialog that contains the BrowserBean.
Version:
%version: 49 % %date_modified: Mon Nov 26 14:34:03 2001 %
Author:
Monica Gaines
See Also:
  • Field Details

  • Constructor Details

    • ResultsTablePanel

      public ResultsTablePanel() throws RemoteException
      Creates a panel that uses a table to display results for EventBrowser. It displays event and object details by displaying the BrowserBean in a separate dialog.
      Throws:
      RemoteException
    • ResultsTablePanel

      public ResultsTablePanel(ResourceBundle res) throws RemoteException
      Creates a panel that uses a table to display results for EventBrowser. It displays event and object details by displaying the BrowserBean in a separate dialog.
      Parameters:
      res - the resource bundle to use for strings
      ctx - the portal context to use for the display
      Throws:
      RemoteException
  • Method Details

    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Gets the class name for this class's controller.
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIACustomizablePanel
      Returns:
      a String with the component's controller's classname
      Throws:
      RemoteException - thrown for errors
    • setResources

      public void setResources(ResourceBundle res)
      Set the resource bundle for the panel.
      Parameters:
      res - the resource bundle for the panel.
    • clearContents

      public void clearContents()
      Clears the window of all search results.
      Specified by:
      clearContents in interface ResultsDisplay
    • clearMarkedData

      public void clearMarkedData()
      Clears the window of all search results.
    • clearMarkedRows

      public void clearMarkedRows()
      Clears the selected event rows of search results.
    • closeContext

      public void closeContext()
      Closes any open portal contexts(connections)
      Specified by:
      closeContext in interface ResultsDisplay
    • initializeSecConnection

      public void initializeSecConnection()
      Initializes the second connection for search purposes.
    • markItem

      public void markItem()
      Mark the selected event.
      Specified by:
      markItem in interface ResultsDisplay
    • unmarkItem

      public void unmarkItem()
      Unmark the selected event(s).
      Specified by:
      unmarkItem in interface ResultsDisplay
    • markAllItems

      public void markAllItems()
      Marks all the rows in the table.
      Specified by:
      markAllItems in interface ResultsDisplay
    • unmarkAllItems

      public void unmarkAllItems()
      Unmarks all the rows in the table.
      Specified by:
      unmarkAllItems in interface ResultsDisplay
    • initSearchResults

      public void initSearchResults()
      Initializes the controller with information needed from the search.
      Specified by:
      initSearchResults in interface ResultsDisplay
    • selectFirstItem

      public void selectFirstItem(int i)
      Update the results panel. If the given value is 1, then the contents of the display are cleared. If the given value is -1, it indicates that the table needs to be sorted.
      Specified by:
      selectFirstItem in interface ResultsDisplay
      Parameters:
      i - indicates what type of action needs to be performed on the panel
    • showMarkedItems

      public boolean showMarkedItems()
      This will change the view of the table to show the marked item list as opposed to the search results list. If there are no items marked, then the view does not change.
      Specified by:
      showMarkedItems in interface ResultsDisplay
      Returns:
      returns true if there are marked items to show, otherwise false
    • showAllItems

      public void showAllItems()
      Displays all items in the table.
      Specified by:
      showAllItems in interface ResultsDisplay
    • setMaskFields

      public void setMaskFields(String[] flds)
      Sets the fields that need to be masked in the browser bean.
      Specified by:
      setMaskFields in interface ResultsDisplay
      Parameters:
      flds - the fields to be masked
    • substituteData

      public void substituteData(Hashtable data)
      Substitue the given data in the browser bean.
      Specified by:
      substituteData in interface ResultsDisplay
      Parameters:
      data - the data to substitue
    • itemCount

      public int itemCount()
      Return the number of items displayed in the table.
      Specified by:
      itemCount in interface ResultsDisplay
      Returns:
      the number of items displayed in the table
    • getSelectedItems

      public HistoryItem[] getSelectedItems()
      Returns an array of history items that contains poid and account information about the selected rows in the table.
      Specified by:
      getSelectedItems in interface ResultsDisplay
      Returns:
      an array of history items
    • getMarkedEvents

      public Hashtable getMarkedEvents()
      Returns the list of marked events.
      Specified by:
      getMarkedEvents in interface ResultsDisplay
      Returns:
      a hashtable containing information about marked events
    • setResultData

      public void setResultData(ResultData[] data, int index, boolean b)
      Sets the information used for displaying the results. The labels from the ResultsData are used for the table column headers. The sort index defines which column to sort the table on.
      Specified by:
      setResultData in interface ResultsDisplay
      Parameters:
      data - the data defining the results to display
      index - the index used for sorting
    • displayDetails

      public void displayDetails(int type)
      Display the detail information of the selected object.
      Specified by:
      displayDetails in interface ResultsDisplay
      Parameters:
      type - type of object to display, either EVENT_TYPE or OBJECT_TYPE
    • getRemoteListener

      public Object getRemoteListener()
      Returns the remote listener, i.e. the one defined in the controller, for search results.
      Specified by:
      getRemoteListener in interface SearchInfoListener
      Returns:
      the remote listener
    • releaseRemoteListener

      public void releaseRemoteListener()
      Removes a remote listener, i.e. the one defined in the controller, for the search results.
      Specified by:
      releaseRemoteListener in interface SearchInfoListener
    • progress

      public void progress(SearchEvent evt)
      progress: With the new BAS API the panel has to fetch the results from the controller The panel no more gets the event notification from the controller(via firedatachangeevent) The search "start" and "end" events are handled by the BrowseWin. The "only"(?) other type of event is handled here. This other event is the datachangeevent
      Specified by:
      progress in interface SearchInfoListener
      Parameters:
      evt - contains information about the progress of the search.
    • searchStarted

      public void searchStarted(SearchEvent evt)
      Description copied from interface: SearchInfoListener
      This method is called at the start of the search to allow the listener to initialize the GUI for the search. The type of results to be returned from the search are passed in the event.
      Specified by:
      searchStarted in interface SearchInfoListener
      Parameters:
      evt - contains useful information about the search
    • showDialog

      protected void showDialog(int type)
      Displays the BrowserBean in a dialog. The dialog will be created if necessary.
    • loadBrowserDisplay

      protected void loadBrowserDisplay(DataTemplate dt, String title, boolean recurse)