GWTApplication.client
Class QuickViewReport.QuickSearchType

java.lang.Object
  extended by GWTApplication.client.QuickViewReport.QuickSearchType
All Implemented Interfaces:
com.google.gwt.user.client.ui.ClickListener, RefreshSearchResultsListener, java.util.EventListener
Enclosing class:
QuickViewReport

 class QuickViewReport.QuickSearchType
extends java.lang.Object
implements com.google.gwt.user.client.ui.ClickListener, RefreshSearchResultsListener

This inner class describes a tab in the quick view search which will be used by the user to view a specific view on the database. The page is active in that if a fault is updated in the database behind the scenes, the information in the quick view will be updated.

Version:
$Id: QuickViewReport.java,v 1.12 2008/01/15 11:08:15 cb Exp $
Author:
Craige Bevil

Field Summary
(package private)  com.google.gwt.user.client.ui.Button collapseAllButton
          This button widget will be used to collapse the details of all of the faults
(package private)  com.google.gwt.user.client.ui.Button openAllButton
          This button will be used to open all of the details of the faults.
 int QuickViewType
          This is the type of quick view which is associated with the quick view tab.
(package private)  com.google.gwt.user.client.ui.Button refreshButton
          This is a button widget which will be pressed to instruct the application to refresh the display
private  SearchResultFormatter searchResultFormatter
          This is a search formatter which will be used for formatting the data which is returned by a specific search query.
 com.google.gwt.user.client.ui.DockPanel SearchResultsPanel
          This is the panel into which the search results are dropped.
 com.google.gwt.user.client.ui.FlexTable SearchResultTable
          This is a table into which the results of the search will be displayed.
 int TabIndex
          This is the tab index which is associated with this quick view tab.
 boolean TabInitialised
          If we have initialised the quick view tab or not.
 java.lang.String TabLabel
          This is the label which is to be associated with the quick view tab.
(package private)  boolean UpdateWithNewFaults
          Whether to update the quick view when new faults are entered into the system
 boolean UseOpenAllButton
          Whether or not to include the Open All button in the quick view.
 
Constructor Summary
QuickViewReport.QuickSearchType(java.lang.String TabLabel, int TabIndex, int QuickViewType, boolean UseOpenAllButton, boolean UpdateWithNewFaults)
          Constructor
 
Method Summary
(package private)  void buildQuickViewPage()
          This will be used to build the quick view panel for this particular quick view tab.
private  void fillQuickViewPanel(int tabIndex)
          This is called to update the tab with the view associated with the quick view tab.
 void onClick(com.google.gwt.user.client.ui.Widget sender)
          This is called when the user presses the refresh button on the interface and results in the quick view in the tab panel selected being updated.
 void refreshResults()
          This implements the interface RefreshSearchResultsListener and will result in the quick view for the selected tab being refreshed.
private  void setSearchFormatter(SearchResultFormatter searchResultFormatter)
          Used to set the search formatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UseOpenAllButton

public boolean UseOpenAllButton
Whether or not to include the Open All button in the quick view. Having the Open All button has to be used carefully as it can hammer the servlet and the client. Use carefully on views which do not contain so many entries.


searchResultFormatter

private SearchResultFormatter searchResultFormatter
This is a search formatter which will be used for formatting the data which is returned by a specific search query.


TabLabel

public java.lang.String TabLabel
This is the label which is to be associated with the quick view tab.


TabIndex

public int TabIndex
This is the tab index which is associated with this quick view tab.


QuickViewType

public int QuickViewType
This is the type of quick view which is associated with the quick view tab.


SearchResultTable

public com.google.gwt.user.client.ui.FlexTable SearchResultTable
This is a table into which the results of the search will be displayed.


SearchResultsPanel

public com.google.gwt.user.client.ui.DockPanel SearchResultsPanel
This is the panel into which the search results are dropped.


TabInitialised

public boolean TabInitialised
If we have initialised the quick view tab or not.


refreshButton

com.google.gwt.user.client.ui.Button refreshButton
This is a button widget which will be pressed to instruct the application to refresh the display


collapseAllButton

com.google.gwt.user.client.ui.Button collapseAllButton
This button widget will be used to collapse the details of all of the faults


openAllButton

com.google.gwt.user.client.ui.Button openAllButton
This button will be used to open all of the details of the faults. This button is not present on all quick views and needs to be configured. The presence of the can be determined through the UseOpenAllButton attribute.


UpdateWithNewFaults

boolean UpdateWithNewFaults
Whether to update the quick view when new faults are entered into the system

Constructor Detail

QuickViewReport.QuickSearchType

QuickViewReport.QuickSearchType(java.lang.String TabLabel,
                                int TabIndex,
                                int QuickViewType,
                                boolean UseOpenAllButton,
                                boolean UpdateWithNewFaults)
Constructor

Parameters:
TabLabel - This is the label text which is associated with this tab.
TabIndex - This is the index in the tab panel where to construct this tab.
QuickViewType - This is the type of the quick view.
UseOpenAllButton - Whether we should provide an Open All button which can be used be the user to open all of the faults in the quick panel simultaneously.
Method Detail

setSearchFormatter

private void setSearchFormatter(SearchResultFormatter searchResultFormatter)
Used to set the search formatter

Parameters:
searchResultFormatter - This is the search result formatter.

onClick

public void onClick(com.google.gwt.user.client.ui.Widget sender)
This is called when the user presses the refresh button on the interface and results in the quick view in the tab panel selected being updated.

Specified by:
onClick in interface com.google.gwt.user.client.ui.ClickListener
Parameters:
sender - This is the widget which is responsible for sending this event.

refreshResults

public void refreshResults()
This implements the interface RefreshSearchResultsListener and will result in the quick view for the selected tab being refreshed.

Specified by:
refreshResults in interface RefreshSearchResultsListener

fillQuickViewPanel

private void fillQuickViewPanel(int tabIndex)
This is called to update the tab with the view associated with the quick view tab. It is called when the user clicks on the tab for the first time or presses the refresh button

Parameters:
tabIndex - This is the tab which is to be updated

buildQuickViewPage

void buildQuickViewPage()
This will be used to build the quick view panel for this particular quick view tab.