New file |
0,0 → 1,41 |
package org.tela_botanica.del.client.composants.rss; |
|
import org.tela_botanica.del.client.composants.rss.RssPresenteur.Vue; |
|
import com.google.gwt.core.client.GWT; |
import com.google.gwt.uibinder.client.UiBinder; |
import com.google.gwt.uibinder.client.UiField; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.HTML; |
import com.google.gwt.user.client.ui.Widget; |
|
public class RssVue extends Composite implements Vue { |
|
// Composants |
@UiField |
HTML lien; |
|
// Variables |
String label = ""; |
|
// Interface pour l'association au XML |
interface Binder extends UiBinder<Widget, RssVue> { |
} |
|
private static Binder uiBinder = GWT.create(Binder.class); |
|
// Constructeur de la vue |
public RssVue() { |
initWidget(uiBinder.createAndBindUi(this)); |
} |
|
public void setLien(String lien) { |
String lienHtml = "<a href=\"" + lien + "\" target=\"_blank\">" + label + "</a>"; |
this.lien.setHTML(lienHtml); |
} |
|
public void setLabelLien(String label) { |
this.label = label; |
} |
|
} |