1 |
36115
|
stefania.m
|
package eu.dnetlib.client.user;
|
2 |
|
|
|
3 |
36153
|
stefania.m
|
import com.github.gwtbootstrap.client.ui.Tab;
|
4 |
|
|
import com.github.gwtbootstrap.client.ui.TabPanel;
|
5 |
36115
|
stefania.m
|
import com.google.gwt.user.client.ui.FlowPanel;
|
6 |
|
|
import com.google.gwt.user.client.ui.IsWidget;
|
7 |
|
|
import com.google.gwt.user.client.ui.Widget;
|
8 |
|
|
import eu.dnetlib.shared.EligiblePresentAndFutureProjects;
|
9 |
|
|
|
10 |
|
|
/**
|
11 |
|
|
* Created by stefania on 4/6/15.
|
12 |
|
|
*/
|
13 |
|
|
public class EligibleProjectsInfoWidget implements IsWidget {
|
14 |
|
|
|
15 |
|
|
private FlowPanel eligibleProjectsInfoPanel = new FlowPanel();
|
16 |
|
|
|
17 |
36153
|
stefania.m
|
private TabPanel eligibleProjectsTabPanel = new TabPanel();
|
18 |
|
|
private Tab currentEligibleProjectsTab = new Tab();
|
19 |
|
|
private Tab futureEligibleProjectsTab = new Tab();
|
20 |
36115
|
stefania.m
|
|
21 |
36153
|
stefania.m
|
private CurrentEligibleProjectsInfoElement currentEligibleProjectsInfoElement;
|
22 |
|
|
private FutureEligibleProjectsInfoElement futureEligibleProjectsInfoElement;
|
23 |
36115
|
stefania.m
|
|
24 |
|
|
public EligibleProjectsInfoWidget(EligiblePresentAndFutureProjects eligiblePresentAndFutureProjects) {
|
25 |
|
|
|
26 |
36153
|
stefania.m
|
currentEligibleProjectsInfoElement = new CurrentEligibleProjectsInfoElement(eligiblePresentAndFutureProjects.getPresentEligibleProjects());
|
27 |
|
|
currentEligibleProjectsInfoElement.addStyleName("tabInner");
|
28 |
36115
|
stefania.m
|
|
29 |
36153
|
stefania.m
|
futureEligibleProjectsInfoElement = new FutureEligibleProjectsInfoElement(eligiblePresentAndFutureProjects.getFutureEligibleProjects());
|
30 |
|
|
futureEligibleProjectsInfoElement.addStyleName("tabInner");
|
31 |
36115
|
stefania.m
|
|
32 |
36153
|
stefania.m
|
eligibleProjectsTabPanel.add(currentEligibleProjectsTab);
|
33 |
|
|
eligibleProjectsTabPanel.add(futureEligibleProjectsTab);
|
34 |
36115
|
stefania.m
|
|
35 |
36153
|
stefania.m
|
eligibleProjectsTabPanel.setTabPosition("above");
|
36 |
|
|
eligibleProjectsTabPanel.addStyleName("tabPanel");
|
37 |
36115
|
stefania.m
|
|
38 |
36153
|
stefania.m
|
currentEligibleProjectsTab.setActive(true);
|
39 |
|
|
currentEligibleProjectsTab.setHeading("CURRENT ELIGIBLE PROJECTS");
|
40 |
|
|
currentEligibleProjectsTab.add(currentEligibleProjectsInfoElement.asWidget());
|
41 |
36115
|
stefania.m
|
|
42 |
36153
|
stefania.m
|
futureEligibleProjectsTab.setHeading("FUTURE ELIGIBLE PROJECTS");
|
43 |
|
|
futureEligibleProjectsTab.add(futureEligibleProjectsInfoElement.asWidget());
|
44 |
36115
|
stefania.m
|
|
45 |
36153
|
stefania.m
|
eligibleProjectsInfoPanel.add(eligibleProjectsTabPanel);
|
46 |
36115
|
stefania.m
|
}
|
47 |
|
|
|
48 |
|
|
@Override
|
49 |
|
|
public Widget asWidget() {
|
50 |
|
|
return eligibleProjectsInfoPanel;
|
51 |
|
|
}
|
52 |
|
|
}
|