Project

General

Profile

1 35839 stefania.m
package eu.dnetlib.client.fundingrequest.stepinfo;
2
3
import com.google.gwt.user.client.ui.HTML;
4
import com.google.gwt.user.client.ui.IsWidget;
5
import com.google.gwt.user.client.ui.Widget;
6
import eu.dnetlib.goldoa.domain.Publisher;
7
8
/**
9
 * Created by stefania on 3/30/15.
10
 */
11
public class PublisherInlineInfo implements IsWidget {
12
13
    private HTML publisherInlineInfo = new HTML();
14
    private String publisherInfoContents = "";
15
16
    public PublisherInlineInfo(Publisher publisher) {
17
18
        publisherInfoContents = "<div class=\"displayInlineInfo\">";
19
20
        publisherInfoContents += "<dl><dt class=\"chronologySubTitle\">PUBLISHER</dt></dl>";
21
22
        publisherInfoContents += "<dd>";
23
        if(publisher.getName()!=null && !publisher.getName().trim().equals(""))
24
            publisherInfoContents += publisher.getName();
25
26
        publisherInfoContents += "</dd>";
27
        publisherInfoContents += "</div>";
28
        publisherInlineInfo.setHTML(publisherInfoContents);
29
    }
30
31
    @Override
32
    public Widget asWidget() {
33
        return publisherInlineInfo;
34
    }
35
36
    public void addStyleName(String styleName) {
37
        publisherInlineInfo.addStyleName(styleName);
38
    }
39
}