|
||||||||||
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.SearchResultFormatter
class SearchResultFormatter
This class will be used to format the results of a search query and display them in a HTML table. Each of the faults will be displayed as a row in the table and associated with each row will be a panel which expands out to provide the full details of the fault to the user which includes all of the comments, the solution and the workaround which is associated with the fault.
This class is central to the displaying of the results of search
queries throughout the system. It is used by the QuickViewReport
class and the SearchForm
class in order to display the results of the SQL
queries which extract from the database faults pertinent to them
specific views on the fault information.
QuickViewReport
,
SearchForm
Nested Class Summary | |
---|---|
(package private) class |
SearchResultFormatter.CloseFaultClickListener
An inner class which will allow the user to close down a fault. |
private class |
SearchResultFormatter.DisplayFullFault
Inner class which will be used to display the full fault history as the user clicks on a disclosure widget header and opens it for the first time. |
private class |
SearchResultFormatter.DisplaySearchResultsIncrementalCommand
This is an incremental command which is used to display the search results so that the browser does not simply lock up whilst the results are being displayed. |
(package private) class |
SearchResultFormatter.FaultLinkClickListener
An inner class which is called when the user presses the link fault link which will result in a dialog being displayed within which the user can enter the id of a fault to link this fault to. |
(package private) class |
SearchResultFormatter.GetEmailUpdateClickListener
An inner class which is called when the user presses the link which allows him to receive updates when the fault is updated in the database |
(package private) class |
SearchResultFormatter.ModifyFaultClickListener
An inner class which is called when the user presses the modification link and will result in the modification panel being called and being set up with the details of the fault which has been selected being available to be modified. |
(package private) class |
SearchResultFormatter.PrintFaultClickListener
Inner class which is used to allow the user to print out a fault should he wish to |
Field Summary | |
---|---|
private boolean |
displayNewFaults
Whether to add new faults which are entered into the database after this search result displayer has been initialised |
private java.util.HashMap |
faultDisplayers
This is a has of all of the fault displayers which are associated with the disclosure panels |
private java.util.HashMap |
faultTableRowMapping
This is a hashmap which contains for each faults, which row in the table that they reside in. |
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 boolean |
hasAdminPriviledge
Whether the user has the privilege to perform admin type functions |
(package private) static int |
HEADOFTABLE
Indicates the first row in the search result table |
private int |
HighestDefectNoInTable
This is the fault id with the highest defect number which is displayed in the table |
(package private) InternationalizationConstants |
internationalizationConstants
This class will be used for internationalization so that we can flick between the locales of English and Spanish. |
private com.google.gwt.user.client.ui.TabPanel |
MainTabPanel
This is the main tab panel for the application. |
private ModifyFormPanel |
ModifyFormPage
This panel will be used to allow the user to modify the details of a fault |
private com.google.gwt.user.client.ui.FlexTable |
ResultsTable
This is the widget into which the search results will be displayed. |
private com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter |
resultsTableCellFormatter
This is used to format the main results table |
private com.google.gwt.user.client.ui.HTMLTable.RowFormatter |
resultsTableRowFormatter
This is used to format the main results table |
RefreshSearchResultsListener |
searchResultUpdater
This is an object which can be used to refresh the details of this search view. |
private FaultServiceAsync |
svc
This is the service which will be used to access the servlet which is running in the tomcat container |
private static int |
UNKNOWN
A constant which is used to indicate something is UNKNOWN. |
private AuthenticationDetails |
UserAuthentication
Contains the authentication data which is associated with the current user |
private boolean |
userCanModifyFaults
Whether this user can modify the details of a fault if his priviledge level is high enough. |
Fields inherited from class GWTApplication.client.FaultDBForm |
---|
busyIndicator, NOLENGTHCHECK, PrinterList |
Constructor Summary | |
---|---|
SearchResultFormatter(com.google.gwt.user.client.ui.FlexTable resultsTable,
ModifyFormPanel modifyFormPage,
AuthenticationDetails UserAuthentication,
FaultServiceAsync svc,
InternationalizationConstants internationalizationConstants,
FaultUpdateMonitor faultUpdateMonitor)
Constructor for the class |
Method Summary | |
---|---|
void |
clearResultTable()
This method will be used to clear out any existing results from the search result table |
void |
displaySearchResults(java.util.ArrayList searchResults,
com.google.gwt.user.client.ui.TabPanel MainTabPanel)
Formats the results of the search query and displays them in the table which was passed into the method. |
void |
faultsChanged(java.util.ArrayList faultsChanged)
This is an obligation of the FaultListener interface and is
called whenever one of the faults in the table that we are
displaying is changed in the database and then we update the
fault in the result displayer. |
private void |
putFaultIntoResultsTable(Fault fault,
int rowToModify,
boolean updateExistingRow,
boolean insertAtHeadOfResults)
Used to insert the details of a fault into results table at the row specified. |
void |
setDisclosurePanelState(boolean openAll)
Will be used to set the state of the all of the disclosure panel states in the table to either open or closed. |
void |
setdisplayNewFaults(boolean displayNewFaults)
Allows the caller to specify if whether to update search results when new faults are created. |
void |
setResultsTable(com.google.gwt.user.client.ui.FlexTable ResultsTable)
This will be used to set the table into which the results will be displayed |
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 RefreshSearchResultsListener searchResultUpdater
private static final int UNKNOWN
private int HighestDefectNoInTable
static final int HEADOFTABLE
private boolean displayNewFaults
private final boolean hasAdminPriviledge
private final java.util.HashMap faultDisplayers
private boolean userCanModifyFaults
private com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter resultsTableCellFormatter
private com.google.gwt.user.client.ui.HTMLTable.RowFormatter resultsTableRowFormatter
private java.util.HashMap faultTableRowMapping
private final FaultServiceAsync svc
private AuthenticationDetails UserAuthentication
private com.google.gwt.user.client.ui.TabPanel MainTabPanel
private final ModifyFormPanel ModifyFormPage
private com.google.gwt.user.client.ui.FlexTable ResultsTable
InternationalizationConstants internationalizationConstants
Constructor Detail |
---|
SearchResultFormatter(com.google.gwt.user.client.ui.FlexTable resultsTable, ModifyFormPanel modifyFormPage, AuthenticationDetails UserAuthentication, FaultServiceAsync svc, InternationalizationConstants internationalizationConstants, FaultUpdateMonitor faultUpdateMonitor)
resultsTable
- This is a FlexTable widget into which the
results of the search will be displayed.modifyFormPage
- This is the page which can be used to
modify the details of a fault.UserAuthentication
- Login credentials of the person that
is using the system.svc
- This is object which will be used to execute
operations on the tomcat servlet.Method Detail |
---|
public void displaySearchResults(java.util.ArrayList searchResults, com.google.gwt.user.client.ui.TabPanel MainTabPanel)
searchResults
- This is a collection of the type Fault
which will contain all of the data from the search query.MainTabPanel
- This is the main tab panelprivate void putFaultIntoResultsTable(Fault fault, int rowToModify, boolean updateExistingRow, boolean insertAtHeadOfResults)
fault
- The fault to insert into the table.rowToModify
- The row number in the ttable which are to
modify should updateExistingRow be set to true.updateExistingRow
- True if we are to update an existing
row in the table.insertAtHeadOfResults
- True if to insert the fault at the
head of the table. Used for inserting new faults which are
added after the initial search page is created.public void setResultsTable(com.google.gwt.user.client.ui.FlexTable ResultsTable)
ResultsTable
- The flex table into which to pack the resultspublic void setDisclosurePanelState(boolean openAll)
openAll
- Whether all of the faults should be
openedpublic void faultsChanged(java.util.ArrayList faultsChanged)
FaultListener
interface and is
called whenever one of the faults in the table that we are
displaying is changed in the database and then we update the
fault in the result displayer.
faultsChanged
in interface FaultListener
faultsChanged
- This is an array of type Fault
which
contains the details of the faults which have changed in the
database.FaultListener
,
FaultUpdateMonitor
public void setdisplayNewFaults(boolean displayNewFaults)
displayNewFaults
- True if to add new faults to
the table.public void clearResultTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |