| 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 |
|
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 5 |
Complexity Density: 0.29 |
|
| 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 |
|
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
|
| 20 |
0
|
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() { |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 33 |
0
|
@Override... |
| 34 |
|
public void onClick(ClickEvent event) { |
| 35 |
0
|
hide(); |
| 36 |
|
} |
| 37 |
|
}); |
| 38 |
|
|
| 39 |
0
|
lightbox.setWidget(contents); |
| 40 |
|
} |
| 41 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 42 |
0
|
public void setSize(int width, int height) {... |
| 43 |
0
|
lightbox.setSize(width, height); |
| 44 |
|
} |
| 45 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 46 |
0
|
public void show() {... |
| 47 |
0
|
searchResultsTable.performSearch(searchRequest, lookupMetadata.getResults(), lookupMetadata.getResultReturnKey()); |
| 48 |
0
|
lightbox.show(); |
| 49 |
|
} |
| 50 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 51 |
0
|
public void hide() {... |
| 52 |
0
|
lightbox.hide(); |
| 53 |
|
} |
| 54 |
|
} |