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.FlowPanel;
|
|
|
8 |
import com.google.gwt.user.client.ui.HTML;
|
|
|
9 |
import com.google.gwt.user.client.ui.HorizontalPanel;
|
|
|
10 |
import com.google.gwt.user.client.ui.Image;
|
|
|
11 |
import com.google.gwt.user.client.ui.Label;
|
|
|
12 |
import com.google.gwt.user.client.ui.Panel;
|
|
|
13 |
import com.google.gwt.user.client.ui.VerticalPanel;
|
|
|
14 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
15 |
|
|
|
16 |
public class ImageVue extends Composite {
|
|
|
17 |
|
|
|
18 |
// Annotation can be used to change the name of the associated xml file
|
|
|
19 |
// @UiTemplate("ObservationVue.ui.xml")
|
|
|
20 |
interface MyUiBinder extends UiBinder<Widget, ImageVue> {
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
|
|
|
24 |
|
|
|
25 |
@UiField
|
|
|
26 |
protected Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
|
|
|
27 |
|
|
|
28 |
@UiField
|
|
|
29 |
protected HorizontalPanel voter;
|
|
|
30 |
|
|
|
31 |
@UiField
|
|
|
32 |
protected VerticalPanel zoneCache;
|
|
|
33 |
|
|
|
34 |
@UiField
|
|
|
35 |
Image imagePrincipale;
|
|
|
36 |
|
|
|
37 |
@UiField
|
|
|
38 |
Label enSavoirPlus, ajoutValidation;
|
|
|
39 |
|
|
|
40 |
public ImageVue() {
|
|
|
41 |
// sets listBox
|
|
|
42 |
initWidget(uiBinder.createAndBindUi(this));
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
protected void loadImage(org.tela_botanica.del.client.modeles.Image image) {
|
|
|
46 |
enSavoirPlus.setStyleName("boutonPlus");
|
|
|
47 |
zoneCache.setVisible(false);
|
|
|
48 |
nomEspece.setText(image.getObservation().getSpecies());
|
|
|
49 |
nomAuteur.setText(image.getObservation().getAuteur());
|
|
|
50 |
imagePrincipale.setUrl(image.getUrl());
|
|
|
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 |
protected void clearDetails() {
|
|
|
60 |
/*
|
|
|
61 |
* detailsPanel.clear();
|
|
|
62 |
* moreDetailsHtml.setHTML("<img src='img/icon_plus.gif' >");
|
|
|
63 |
*/
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
public Panel getFlowPanel() {
|
|
|
67 |
// return flowPanel;
|
|
|
68 |
return new FlowPanel();
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public Panel getDetailsPanel() {
|
|
|
72 |
// return detailsPanel;
|
|
|
73 |
return new FlowPanel();
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
public HTML getMoreDetailsHtml() {
|
|
|
77 |
// return moreDetailsHtml;
|
|
|
78 |
return new HTML();
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
public HTML getNoValidationDataHtml() {
|
|
|
82 |
// return noValidationDataHtml;
|
|
|
83 |
return new HTML();
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public HTML getProposeValidationDataHtml() {
|
|
|
87 |
// return proposeValidationDataHtml;
|
|
|
88 |
return new HTML();
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
public HorizontalPanel getVoter() {
|
|
|
92 |
return voter;
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
public VerticalPanel getZoneCache() {
|
|
|
96 |
return zoneCache;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public Label getEnSavoirPlus() {
|
|
|
100 |
return enSavoirPlus;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public Image getImagePrincipale() {
|
|
|
104 |
return imagePrincipale;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public Label getAjoutValidation() {
|
|
|
108 |
return ajoutValidation;
|
|
|
109 |
}
|
|
|
110 |
}
|