GWTApplication.client
Class NewFaultForm

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.NewFaultForm
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.WindowResizeListener

 class NewFaultForm
extends FaultDBForm
implements com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.WindowResizeListener

This class represents a form into which the user can enter the details of a new fault which may subsequently be entered into the system. This class makes extensive use of the google web toolkit.

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

Field Summary
private  com.google.gwt.user.client.ui.TextBox DateOccurred
          This widget will be used to hold the date that the fault occured.
private  com.google.gwt.user.client.ui.ListBox DutyEngineer
          This widget will be used to hold the name of the duty technician who was on duty when the fault occurred
private  com.jpavel.gwt.wysiwyg.client.Editor FaultDescription
          This field will be used to hold a free format text description of the fault
private  com.google.gwt.user.client.ui.ListBox Instrument
          This widget will be used to hold the name of the instrument which is associated with the fault
private  com.google.gwt.user.client.ui.CheckBox InterestedInFaultUpdatesCheckbox
          This is a checkbox which the user will be use to indicate whether or not he wants to be informed when there are modifications to the fault in any way
(package private)  com.google.gwt.user.client.ui.TabPanel mainTabPanel
          This is the main tab panel
private  com.google.gwt.user.client.ui.TextBox Observer
          This widget will be used to hold the name of the observer who was using the system when the fault occurred.
private  com.google.gwt.user.client.ui.ListBox Originator
          This widget will be used to hold the name of the originator of the fault.
(package private)  com.google.gwt.user.client.ui.Button ResetButton
          Button which will be used to reset the form to the default values
private  com.google.gwt.user.client.ui.ListBox Severity
          This widget will be used to hold the level of the severity of the fault
private  com.google.gwt.user.client.ui.ListBox Site
          This widget will be used to hold the name of the site associated with the fault
(package private)  com.google.gwt.user.client.ui.Button SubmitButton
          Button which is used for submitting the fault for insertion
private  com.google.gwt.user.client.ui.ListBox SupportAstronomer
          This widget will be usedto enter the name of the support astronomer
private  com.google.gwt.user.client.ui.ListBox System
          This widget will be used to hold the name of the system which is associated with the fault
private  com.google.gwt.user.client.ui.ListBox TelescopeOperator
          This widget will be used to hold the name of the telescope operator who was on duty when the fault occurred.
private  com.google.gwt.user.client.ui.TextBox TimeLost
          This widget will be used to hold the amount of time which was lost as a result of this fault
private  com.google.gwt.user.client.ui.TextBox TimeOccurred
          This widget will be used to hold the time That the fault occurred
private  com.google.gwt.user.client.ui.TextBox Title
          This field will be used to hold the title of the new fault
 
Fields inherited from class GWTApplication.client.FaultDBForm
busyIndicator, internationalizationConstants, NOLENGTHCHECK, PrinterList, svc, UserAuthentication
 
Constructor Summary
NewFaultForm(com.google.gwt.user.client.ui.TabPanel MainTabPanel, FaultServiceAsync svc, AuthenticationDetails UserAuthentication)
          This is used to create the form which will be used to enter the details of a new fault.
 
Method Summary
 void onClick(com.google.gwt.user.client.ui.Widget sender)
          This is called when the user presses one of the buttons at the foot for the screen
 void onWindowResized(int width, int height)
          Called when the main window is resized and we resize the size of the text field so that it takes advantage of the size of the screen.
(package private)  void resetForm(boolean resetWithoutWarning)
          This method will be used to reset the form to it's initial values.
 
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

mainTabPanel

com.google.gwt.user.client.ui.TabPanel mainTabPanel
This is the main tab panel


SubmitButton

com.google.gwt.user.client.ui.Button SubmitButton
Button which is used for submitting the fault for insertion


ResetButton

com.google.gwt.user.client.ui.Button ResetButton
Button which will be used to reset the form to the default values


InterestedInFaultUpdatesCheckbox

private final com.google.gwt.user.client.ui.CheckBox InterestedInFaultUpdatesCheckbox
This is a checkbox which the user will be use to indicate whether or not he wants to be informed when there are modifications to the fault in any way


Title

private final com.google.gwt.user.client.ui.TextBox Title
This field will be used to hold the title of the new fault


FaultDescription

private final com.jpavel.gwt.wysiwyg.client.Editor FaultDescription
This field will be used to hold a free format text description of the fault


TimeOccurred

private final com.google.gwt.user.client.ui.TextBox TimeOccurred
This widget will be used to hold the time That the fault occurred


DateOccurred

private final com.google.gwt.user.client.ui.TextBox DateOccurred
This widget will be used to hold the date that the fault occured.


TimeLost

private final com.google.gwt.user.client.ui.TextBox TimeLost
This widget will be used to hold the amount of time which was lost as a result of this fault


Observer

private final com.google.gwt.user.client.ui.TextBox Observer
This widget will be used to hold the name of the observer who was using the system when the fault occurred.


Severity

private final com.google.gwt.user.client.ui.ListBox Severity
This widget will be used to hold the level of the severity of the fault


Instrument

private final com.google.gwt.user.client.ui.ListBox Instrument
This widget will be used to hold the name of the instrument which is associated with the fault


Site

private final com.google.gwt.user.client.ui.ListBox Site
This widget will be used to hold the name of the site associated with the fault


System

private final com.google.gwt.user.client.ui.ListBox System
This widget will be used to hold the name of the system which is associated with the fault


Originator

private final com.google.gwt.user.client.ui.ListBox Originator
This widget will be used to hold the name of the originator of the fault.


TelescopeOperator

private final com.google.gwt.user.client.ui.ListBox TelescopeOperator
This widget will be used to hold the name of the telescope operator who was on duty when the fault occurred.


DutyEngineer

private final com.google.gwt.user.client.ui.ListBox DutyEngineer
This widget will be used to hold the name of the duty technician who was on duty when the fault occurred


SupportAstronomer

private final com.google.gwt.user.client.ui.ListBox SupportAstronomer
This widget will be usedto enter the name of the support astronomer

Constructor Detail

NewFaultForm

NewFaultForm(com.google.gwt.user.client.ui.TabPanel MainTabPanel,
             FaultServiceAsync svc,
             AuthenticationDetails UserAuthentication)
This is used to create the form which will be used to enter the details of a new fault.

Parameters:
MainTabPanel - This is the parent tab panel into which we will build the new fault form.
svc - This is a object which can be used to access the servlet
UserAuthentication - The user credentials which were used when the user logged on.
Method Detail

onClick

public void onClick(com.google.gwt.user.client.ui.Widget sender)
This is called when the user presses one of the buttons at the foot for the screen

Specified by:
onClick in interface com.google.gwt.user.client.ui.ClickListener
Parameters:
sender - The widget which caused the event

resetForm

void resetForm(boolean resetWithoutWarning)
This method will be used to reset the form to it's initial values.

Parameters:
resetWithoutWarning - True if we are to ignore the fact that there are changes which may not have been saved in the form

onWindowResized

public void onWindowResized(int width,
                            int height)
Called when the main window is resized and we resize the size of the text field so that it takes advantage of the size of the screen.

Specified by:
onWindowResized in interface com.google.gwt.user.client.WindowResizeListener