Clover Coverage Report - KS LUM 1.2-M6-SNAPSHOT (Aggregated)
Coverage timestamp: Sun Sep 11 2011 07:02:50 EDT
../../../../../../../img/srcFileCovDistChart0.png 47% of files have more coverage
17   54   5   3.4
0   45   0.29   5
5     1  
1    
 
  SearchResultsLightBox       Line # 13 17 0% 5 22 0% 0.0
 
No Tests
 
1    package org.kuali.student.lum.common.client.widgets;
2   
3    import org.kuali.student.common.assembly.data.LookupMetadata;
4    import org.kuali.student.common.search.dto.SearchRequest;
5    import org.kuali.student.common.ui.client.widgets.KSButton;
6    import org.kuali.student.common.ui.client.widgets.KSLightBox;
7    import org.kuali.student.common.ui.client.widgets.search.SearchResultsTable;
8   
9    import com.google.gwt.event.dom.client.ClickEvent;
10    import com.google.gwt.event.dom.client.ClickHandler;
11    import com.google.gwt.user.client.ui.VerticalPanel;
12   
 
13    public class SearchResultsLightBox {
14    private KSLightBox lightbox;
15    private SearchResultsTable searchResultsTable;
16    private KSButton closeButton;
17    private SearchRequest searchRequest;
18    private LookupMetadata lookupMetadata;
19   
 
20  0 toggle public SearchResultsLightBox(String title, SearchRequest searchRequest, LookupMetadata lookupMetadata) {
21  0 VerticalPanel contents = new VerticalPanel();
22  0 lightbox = new KSLightBox(title);
23  0 searchResultsTable = new SearchResultsTable();
24  0 searchResultsTable.addStyleName("KS-Advanced-Search-Results-Table");
25  0 searchResultsTable.setWithMslable(false);
26  0 closeButton = new KSButton("Close");
27  0 this.searchRequest = searchRequest;
28  0 this.lookupMetadata = lookupMetadata;
29  0 contents.add(searchResultsTable);
30  0 contents.add(closeButton);
31   
32  0 closeButton.addClickHandler(new ClickHandler() {
 
33  0 toggle @Override
34    public void onClick(ClickEvent event) {
35  0 hide();
36    }
37    });
38   
39  0 lightbox.setWidget(contents);
40    }
41   
 
42  0 toggle public void setSize(int width, int height) {
43  0 lightbox.setSize(width, height);
44    }
45   
 
46  0 toggle public void show() {
47  0 searchResultsTable.performSearch(searchRequest, lookupMetadata.getResults(), lookupMetadata.getResultReturnKey());
48  0 lightbox.show();
49    }
50   
 
51  0 toggle public void hide() {
52  0 lightbox.hide();
53    }
54    }