Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
200 gduche 1
package org.tela_botanica.del.client.vues.rechercheobservations;
2
 
3
import com.google.gwt.core.client.GWT;
4
import com.google.gwt.uibinder.client.UiBinder;
5
import com.google.gwt.uibinder.client.UiField;
6
import com.google.gwt.user.client.ui.Composite;
7
import com.google.gwt.user.client.ui.Image;
316 aurelien 8
import com.google.gwt.user.client.ui.IsWidget;
200 gduche 9
import com.google.gwt.user.client.ui.Label;
10
import com.google.gwt.user.client.ui.Widget;
11
 
308 gduche 12
public class DetailImageVue extends Composite implements DetailImagePresenteur.Vue {
200 gduche 13
 
14
	// Gestion d'UiBinder
15
	interface Binder extends UiBinder<Widget, DetailImageVue> {
16
	}
17
 
18
	private static Binder binder = GWT.create(Binder.class);
19
 
20
	@UiField
21
	protected Image photoPrincipale;
22
 
23
	@UiField
24
	protected Label texteAlternatif;
25
 
308 gduche 26
	public DetailImageVue() {
200 gduche 27
		initWidget(binder.createAndBindUi(this));
28
	}
308 gduche 29
 
30
	@Override
31
	public void setUrlImage(String urlImage) {
32
		photoPrincipale.setUrl(urlImage);
33
	}
34
 
35
	@Override
36
	public void setTexteAlternatif(String texteAlternatif) {
37
		this.texteAlternatif.setText(texteAlternatif);
38
	}
316 aurelien 39
 
40
	@Override
41
	public void chargerImage(IsWidget image) {
42
		Image photo = (Image)image;
43
		setTexteAlternatif(photo.getAltText());
44
		setUrlImage(photo.getUrl());
45
	}
200 gduche 46
}