GWTApplication.client
Class QuickViewReport

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by GWTApplication.client.FaultDBForm
                  extended by GWTApplication.client.QuickViewReport
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.TabListener

public class QuickViewReport
extends FaultDBForm
implements com.google.gwt.user.client.ui.TabListener

The purpose of this class is to allow the user to very quickly access some of the most populat views upon the data within the fault management system. It will permit the use of for example To access information relating to outstanding faults for the last twenty four hours or forty eight hours.

the user will be presented with a tree structure from which he can quickly select the desired report. this report will subsequently be displayed in an adjacent panel.

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

Nested Class Summary
(package private)  class QuickViewReport.QuickSearchType
          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.
 
Field Summary
static int ASTRONOMY_OUTSTANDING
           
static int COMPUTING_OUTSTANDING
           
private  FaultUpdateMonitor faultUpdateMonitor
          Used to check the database intermittingly and report back to listeners which faults they are displaying have changed so that they may update their view accordingly.
private  com.google.gwt.user.client.ui.TabPanel MainTabPanel
          This is the main tab panel for the application so that we can programatically change the tabs which are selected.
static int ONEMONTH
           
static int ONEMONTHOUTSTANDING
           
static int ONEWEEK
           
static int ONEWEEKOUTSTANDING
           
static int OPERATIONS_OUTSTANDING
           
static int OUTSTANDING
           
private  QuickViewReport.QuickSearchType[] QuickSearchInfo
          This is an array which is used to set up the tabs which the user can select the quick views from.
private  com.google.gwt.user.client.ui.TabPanel QuickViewTabPanel
          This widget is a tab panel which will contain tabs for all of the quick views which the user may accessa
static int SEVENTYTWOHOURS
           
static int SEVENTYTWOHOURSOUTSTANDING
           
static int TI_OUTSTANDING
           
static int TWENTYFOURHOURS
          Constants which are used for determining which of the quick searches were selected by the user in the tree widget.
static int TWENTYFOURHOURSOUTSTANDING
           
 
Fields inherited from class GWTApplication.client.FaultDBForm
busyIndicator, internationalizationConstants, NOLENGTHCHECK, PrinterList, svc, UserAuthentication
 
Constructor Summary
QuickViewReport(com.google.gwt.user.client.ui.TabPanel MainTabPanel, FaultServiceAsync svc, ModifyFormPanel ModifyFormPage, AuthenticationDetails UserAuthentication, FaultUpdateMonitor faultUpdateMonitor)
          This is used to create the panel which is used to generate reports for the user on request.
 
Method Summary
 boolean onBeforeTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender, int tabIndex)
          This is part of the tab listener interface which is not used but needs to be defined.
 void onTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender, int tabIndex)
          This is called when a tab in the quick view panel is selected.
 
Methods inherited from class GWTApplication.client.FaultDBForm
createEmailLink, fillListBoxWithCurrentInstruments, fillListBoxWithDutyTechnicians, fillListBoxWithFaultType, fillListBoxWithInstruments, fillListBoxWithSeverity, fillListBoxWithSites, fillListBoxWithStaffMembers, fillListBoxWithStates, fillListBoxWithSupportAstronomers, fillListBoxWithSystems, fillListBoxWithTelescopeOperators, getCurrentDate, getCurrentTime, getFullUserNameFromEmailAddress, selectDefaultListOption, setSelectedItemInListbox, stringContainsText, verifyDateFormat, verifyDateNotInFuture, verifyText, verifyTimeFormat
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TWENTYFOURHOURS

public static final int TWENTYFOURHOURS
Constants which are used for determining which of the quick searches were selected by the user in the tree widget. Enums would be good but we are stuck with java 1.4 at the moment :-(

See Also:
Constant Field Values

SEVENTYTWOHOURS

public static final int SEVENTYTWOHOURS
See Also:
Constant Field Values

ONEWEEK

public static final int ONEWEEK
See Also:
Constant Field Values

ONEMONTH

public static final int ONEMONTH
See Also:
Constant Field Values

TWENTYFOURHOURSOUTSTANDING

public static final int TWENTYFOURHOURSOUTSTANDING
See Also:
Constant Field Values

SEVENTYTWOHOURSOUTSTANDING

public static final int SEVENTYTWOHOURSOUTSTANDING
See Also:
Constant Field Values

ONEWEEKOUTSTANDING

public static final int ONEWEEKOUTSTANDING
See Also:
Constant Field Values

ONEMONTHOUTSTANDING

public static final int ONEMONTHOUTSTANDING
See Also:
Constant Field Values

OUTSTANDING

public static final int OUTSTANDING
See Also:
Constant Field Values

TI_OUTSTANDING

public static final int TI_OUTSTANDING
See Also:
Constant Field Values

COMPUTING_OUTSTANDING

public static final int COMPUTING_OUTSTANDING
See Also:
Constant Field Values

OPERATIONS_OUTSTANDING

public static final int OPERATIONS_OUTSTANDING
See Also:
Constant Field Values

ASTRONOMY_OUTSTANDING

public static final int ASTRONOMY_OUTSTANDING
See Also:
Constant Field Values

faultUpdateMonitor

private FaultUpdateMonitor faultUpdateMonitor
Used to check the database intermittingly and report back to listeners which faults they are displaying have changed so that they may update their view accordingly.


QuickSearchInfo

private final QuickViewReport.QuickSearchType[] QuickSearchInfo
This is an array which is used to set up the tabs which the user can select the quick views from.


QuickViewTabPanel

private com.google.gwt.user.client.ui.TabPanel QuickViewTabPanel
This widget is a tab panel which will contain tabs for all of the quick views which the user may accessa


MainTabPanel

private com.google.gwt.user.client.ui.TabPanel MainTabPanel
This is the main tab panel for the application so that we can programatically change the tabs which are selected. This is done for instance when the user selects the update link in the and we need to then select the update tab to show the form which contains the fault to be edited.

Constructor Detail

QuickViewReport

QuickViewReport(com.google.gwt.user.client.ui.TabPanel MainTabPanel,
                FaultServiceAsync svc,
                ModifyFormPanel ModifyFormPage,
                AuthenticationDetails UserAuthentication,
                FaultUpdateMonitor faultUpdateMonitor)
This is used to create the panel which is used to generate reports for the user on request.

Parameters:
MainTabPanel - This is the main tab panel into which we will drop the quick view panel.
svc - This is a remote servelt object which will be running in the tomcat servlet container
ModifyFormPage - This is the tab panel which can be used to modify the details of faults which have been entered into the database
faultUpdateMonitor - This is will be used for keeping track of changes to faults in the database
Method Detail

onBeforeTabSelected

public boolean onBeforeTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender,
                                   int tabIndex)
This is part of the tab listener interface which is not used but needs to be defined.

Specified by:
onBeforeTabSelected in interface com.google.gwt.user.client.ui.TabListener
Parameters:
sender - This is the widget which is responsible for sending this event.
tabIndex - This is the tab which has been selected.

onTabSelected

public void onTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender,
                          int tabIndex)
This is called when a tab in the quick view panel is selected. If the tab has already been selected previously then there is nothing to do otherwise it builds up the contents of the quick view tab from the database dynamically.

Specified by:
onTabSelected in interface com.google.gwt.user.client.ui.TabListener
Parameters:
sender - This is the widget which is responsible for sending this event.
tabIndex - This is the index of the tab which caused the event to be raised.