178 |
benjamin |
1 |
package org.tela_botanica.del.client.vues.rechercheimages.resultats.images;
|
|
|
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.HorizontalPanel;
|
|
|
8 |
import com.google.gwt.user.client.ui.Image;
|
|
|
9 |
import com.google.gwt.user.client.ui.Label;
|
|
|
10 |
import com.google.gwt.user.client.ui.VerticalPanel;
|
|
|
11 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
12 |
|
|
|
13 |
public class ImageVue extends Composite {
|
|
|
14 |
|
|
|
15 |
// Annotation can be used to change the name of the associated xml file
|
|
|
16 |
// @UiTemplate("ObservationVue.ui.xml")
|
|
|
17 |
interface MyUiBinder extends UiBinder<Widget, ImageVue> {
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
|
|
|
21 |
|
|
|
22 |
@UiField
|
|
|
23 |
protected Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
|
|
|
24 |
|
|
|
25 |
@UiField
|
|
|
26 |
protected HorizontalPanel voter;
|
|
|
27 |
|
|
|
28 |
@UiField
|
|
|
29 |
protected VerticalPanel zoneCache;
|
|
|
30 |
|
|
|
31 |
@UiField
|
|
|
32 |
Image imagePrincipale;
|
|
|
33 |
|
|
|
34 |
@UiField
|
|
|
35 |
Label enSavoirPlus, ajoutValidation;
|
|
|
36 |
|
|
|
37 |
public ImageVue() {
|
|
|
38 |
// sets listBox
|
|
|
39 |
initWidget(uiBinder.createAndBindUi(this));
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
protected void loadImage(org.tela_botanica.del.client.modeles.Image image) {
|
|
|
43 |
zoneCache.setVisible(false);
|
|
|
44 |
nomEspece.setText(image.getObservation().getSpecies());
|
|
|
45 |
nomAuteur.setText(image.getObservation().getAuteur());
|
250 |
gduche |
46 |
|
|
|
47 |
|
178 |
benjamin |
48 |
imagePrincipale.setUrl(image.getUrl());
|
250 |
gduche |
49 |
imagePrincipale.setTitle(image.getUrlFormat("L"));
|
|
|
50 |
imagePrincipale.setAltText(image.getObservation().getAuteur() + " - " + image.getObservation().getSpecies());
|
178 |
benjamin |
51 |
nomObservateur.setText(image.getObservation().getAuteur());
|
|
|
52 |
nomRetenu.setText(image.getObservation().getNomRetenu());
|
|
|
53 |
dateObservation.setText(image.getObservation().getDate());
|
|
|
54 |
famille.setText(image.getObservation().getFamille());
|
|
|
55 |
localite.setText(image.getObservation().getLocalite());
|
|
|
56 |
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
}
|