|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
GWTApplication.client.FaultDBForm
GWTApplication.client.SearchForm
public class SearchForm
This class will be used to build a form which may subsequently be used to search through the fault management system. There are two searches associated with this form. The first is a simple search which allows the user to enter and a start and end date. The second is an advanced search which allows the user much finer control over the search parameters. The results of the search will be displayed in the search view.
Nested Class Summary | |
---|---|
(package private) class |
SearchForm.InputField
This is an inner class which is used to represent a field within the search form |
Field Summary | |
---|---|
private static java.lang.String |
ADVANCED
A constant used to index the SearchFormatters hash map |
(package private) java.util.HashMap |
AdvancedSearchFieldsHash
This is a hashtable which will be used to index the fields in the advanced search |
(package private) SearchForm.InputField[] |
AdvancedSearchInputFieldData
The generation of the search form is data-driven and this is done through the use of the following array |
static java.lang.String |
ASSIGNEDTO
A constant which will be used to index the search data structure and will be used across the client and the server |
(package private) static int |
BUTTON
A static which is used to indicate that a widget is a button |
(package private) static int |
CHECKBOX
A static which is used to indicate that a widget is a checkbox |
static java.lang.String |
CHECKED
Used for indicating the state of chcek boxes which are included in the interface |
static java.lang.String |
DATEOCCURED
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
DEFECTNUMBER
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
DUTYENGINEER
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
ENDDATE
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
FAULTNUMBER
The fault number of the fault |
static java.lang.String |
FAULTTYPE
A constant which will be used to index the search data structure and will be used across the client and the server |
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. |
(package private) static int |
FULLWIDTH
A static to indicate that the widget should occupy the full width of the table into which it is positioned. |
static java.lang.String |
INSTRUMENT
A constant which will be used to index the search data structure and will be used across the client and the server |
(package private) InternationalizationConstants |
internationalizationConstants
This class will be used for internationalization so that we can flick between the locales of English and Spanish. |
static java.lang.String |
KEYWORDS
A constant which will be used to index the search data structure and will be used across the client and the server |
(package private) static int |
LISTBOX
A static which is used to indicate that a widget is a list box |
private com.google.gwt.user.client.ui.TabPanel |
MainTabPanel
This is the main tab panel for the application |
private ModifyFormPanel |
ModifyFormPage
This is the object which will be used to allow the user to modify faults should he be entitled to |
static java.lang.String |
NOTCHECKED
Used for indicating the state of chcek boxes which are included in the interface |
static java.lang.String |
OBSERVER
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
ORIGINATOR
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
PRIORITY
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
RESET
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
SA
A constant which will be used to index the search data structure and will be used across the client and the server |
private java.util.HashMap |
SearchFormatters
This hash map will contain the formatters which will be used for creating the search result table. |
(package private) com.google.gwt.user.client.ui.TabPanel |
SearchTabPanel
This is the tabbed panel which contains two panels. |
static java.lang.String |
SEVERITY
A constant which will be used to index the search data structure and will be used across the client and the server |
private static java.lang.String |
SIMPLE
A constant used to index the SearchFormatters hash map |
(package private) java.util.HashMap |
SimpleSearchFieldsHash
This is a hashtable which will be used to index the fields in the simple search |
(package private) SearchForm.InputField[] |
SimpleSearchInputFieldData
|
static java.lang.String |
SITE
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
STARTDATE
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
STATUSTYPE
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
SUBMIT
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
SYSTEM
A constant which will be used to index the search data structure and will be used across the client and the server |
(package private) static int |
TEXTBOX
A static which is used to indicate that a widget is a text box |
static java.lang.String |
TIMELOST
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
TO
A constant which will be used to index the search data structure and will be used across the client and the server |
static java.lang.String |
USEAND
This is used by the user to indicate that he wants an boolean and applied to the terms in the search query for the advanced search |
static java.lang.String |
USEOR
Used to indicate that we should use OR as the conjungating operator in the advanced search query |
static java.lang.String |
USEORKEYWORDS
Used to indicate that we should use OR as the conjungating operator in the keywords of the search |
Fields inherited from class GWTApplication.client.FaultDBForm |
---|
busyIndicator, NOLENGTHCHECK, PrinterList, svc, UserAuthentication |
Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener |
---|
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_META, MODIFIER_SHIFT |
Constructor Summary | |
---|---|
SearchForm(com.google.gwt.user.client.ui.TabPanel MainTabPanel,
FaultServiceAsync svc,
AuthenticationDetails UserAuthentication,
ModifyFormPanel ModifyFormPage,
FaultUpdateMonitor faultUpdateMonitor)
This is used to create the form which will be used to enter the details of a search. |
Method Summary | |
---|---|
(package private) void |
createSearchTabPanel(java.lang.String SearchType,
java.lang.String TabText,
SearchForm.InputField[] SearchTabPanelData,
int TableWidth,
boolean IncludeVisibilityCheckBoxes)
This method will create a search panel within the parent tab panel. |
void |
onClick(com.google.gwt.user.client.ui.Widget sender)
This implements part of the ClickListener interface and is called when the user clicks on the button to activate the search |
void |
onKeyDown(com.google.gwt.user.client.ui.Widget sender,
char keyCode,
int modifiers)
An obligation to the KeyboardListener interface. |
void |
onKeyPress(com.google.gwt.user.client.ui.Widget sender,
char keyCode,
int modifiers)
Called when the user presses the return key on the search panel interface. |
void |
onKeyUp(com.google.gwt.user.client.ui.Widget sender,
char keyCode,
int modifiers)
An obligation to the KeyboardListener interface. |
private void |
processAdvancedSearch()
Method called to invoke the advanced search on the servlet in tomcat container. |
private void |
processSimpleSearch()
Perform the basic search. |
private void |
resetFields(SearchForm.InputField[] FormFields)
This will be used to reset the fields in the search form which is provided. |
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 |
---|
private FaultUpdateMonitor faultUpdateMonitor
public static final java.lang.String CHECKED
public static final java.lang.String NOTCHECKED
public static final java.lang.String KEYWORDS
public static final java.lang.String DATEOCCURED
public static final java.lang.String TIMELOST
public static final java.lang.String OBSERVER
public static final java.lang.String DEFECTNUMBER
public static final java.lang.String SEVERITY
public static final java.lang.String INSTRUMENT
public static final java.lang.String SITE
public static final java.lang.String SYSTEM
public static final java.lang.String ORIGINATOR
public static final java.lang.String FAULTNUMBER
public static final java.lang.String TO
public static final java.lang.String DUTYENGINEER
public static final java.lang.String SA
public static final java.lang.String PRIORITY
public static final java.lang.String ASSIGNEDTO
public static final java.lang.String FAULTTYPE
public static final java.lang.String STATUSTYPE
public static final java.lang.String SUBMIT
public static final java.lang.String STARTDATE
public static final java.lang.String ENDDATE
public static final java.lang.String RESET
public static final java.lang.String USEAND
public static final java.lang.String USEOR
public static final java.lang.String USEORKEYWORDS
private final com.google.gwt.user.client.ui.TabPanel MainTabPanel
private static final java.lang.String ADVANCED
private static final java.lang.String SIMPLE
private final ModifyFormPanel ModifyFormPage
private final java.util.HashMap SearchFormatters
InternationalizationConstants internationalizationConstants
static final int TEXTBOX
static final int LISTBOX
static final int BUTTON
static final int CHECKBOX
static final int FULLWIDTH
final com.google.gwt.user.client.ui.TabPanel SearchTabPanel
final java.util.HashMap SimpleSearchFieldsHash
final java.util.HashMap AdvancedSearchFieldsHash
final SearchForm.InputField[] AdvancedSearchInputFieldData
final SearchForm.InputField[] SimpleSearchInputFieldData
Constructor Detail |
---|
SearchForm(com.google.gwt.user.client.ui.TabPanel MainTabPanel, FaultServiceAsync svc, AuthenticationDetails UserAuthentication, ModifyFormPanel ModifyFormPage, FaultUpdateMonitor faultUpdateMonitor)
MainTabPanel
- This is the tabbed panel into which we
should build the search panels.svc
- This is used to communicate with the servlet in the
Tomcat container.UserAuthentication
- Contains the details of the users
authentication.ModifyFormPage
- The tab which is used for updating the
faults in the database. This is so that we can link from the
search page to the update form panel.faultUpdateMonitor
- This will be used to track updates of
faults in the system.Method Detail |
---|
public void onKeyDown(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
onKeyDown
in interface com.google.gwt.user.client.ui.KeyboardListener
public void onKeyPress(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
onKeyPress
in interface com.google.gwt.user.client.ui.KeyboardListener
public void onKeyUp(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
onKeyUp
in interface com.google.gwt.user.client.ui.KeyboardListener
public void onClick(com.google.gwt.user.client.ui.Widget sender)
onClick
in interface com.google.gwt.user.client.ui.ClickListener
sender
- This is the widget which was the source of the
click event.private void processSimpleSearch()
SearchResultFormatter
private void processAdvancedSearch()
private void resetFields(SearchForm.InputField[] FormFields)
FormFields
- This is an array of all of the fields in the
form which is to be resetvoid createSearchTabPanel(java.lang.String SearchType, java.lang.String TabText, SearchForm.InputField[] SearchTabPanelData, int TableWidth, boolean IncludeVisibilityCheckBoxes)
SearchType
- This the type of the search which can be
ADVANCED
or SIMPLE
.TabText
- This is the text which should be associated with
the tab. Should be either simple or advancedSearchTabPanelData
- this variable contains the data which
will be used to generate the form from.TableWidth
- This is the expected widths in columns of the
table into which we will generate the search formIncludeVisibilityCheckBoxes
- This indicates whether or
not we should add checkboxes associated with each of the input
fields. The semantic of the checkbox is to include the selected
fields in the search results.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |