Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 benjamin 1
package org.tela_botanica.del.client.vues.rechercheobservations;
9 benjamin 2
 
3
import java.util.List;
4
 
5
import org.tela_botanica.del.client.modeles.Observation;
14 benjamin 6
import org.tela_botanica.del.client.modeles.ObservationValidation;
9 benjamin 7
 
32 gduche 8
import com.google.gwt.core.client.GWT;
9
import com.google.gwt.uibinder.client.UiBinder;
10
import com.google.gwt.uibinder.client.UiField;
9 benjamin 11
import com.google.gwt.user.client.ui.Composite;
32 gduche 12
import com.google.gwt.user.client.ui.FlowPanel;
9 benjamin 13
import com.google.gwt.user.client.ui.HTML;
14
import com.google.gwt.user.client.ui.Image;
32 gduche 15
import com.google.gwt.user.client.ui.Label;
9 benjamin 16
import com.google.gwt.user.client.ui.Panel;
32 gduche 17
import com.google.gwt.user.client.ui.Widget;
9 benjamin 18
 
14 benjamin 19
public class ObservationVue extends Composite {
9 benjamin 20
 
32 gduche 21
	// Annotation can be used to change the name of the associated xml file
22
	// @UiTemplate("ObservationVue.ui.xml")
23
	interface MyUiBinder extends UiBinder<Widget, ObservationVue> {
24
	}
9 benjamin 25
 
32 gduche 26
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
9 benjamin 27
 
32 gduche 28
	@UiField
29
	Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
9 benjamin 30
 
32 gduche 31
	@UiField
32
	Image imagePrincipale;
9 benjamin 33
 
32 gduche 34
	public ObservationVue() {
35
		// sets listBox
36
		initWidget(uiBinder.createAndBindUi(this));
9 benjamin 37
	}
38
 
39
	protected void loadImage(Observation observation) {
40
 
32 gduche 41
		nomEspece.setText(observation.getSpecies());
42
		nomAuteur.setText(observation.getAuteur());
43
		imagePrincipale.setUrl(observation.getUrl());
44
		nomObservateur.setText(observation.getAuteur());
45
		nomRetenu.setText(observation.getNomRetenu());
46
		dateObservation.setText(observation.getDate());
47
		famille.setText(observation.getFamille());
48
		localite.setText(observation.getLocalite());
49
 
50
		/*
51
		 * flowPanel.clear(); flowPanel.add(new HTML(observation.getSpecies()));
52
		 * flowPanel.add(new HTML(observation.getAuteur())); flowPanel.add(new
53
		 * HTML("<a href='http://www.tela-botanica.org/eflore/BDNFF/4.02/nn/" +
54
		 * observation.getNumNomenclatural() + "' target='_blank'><img src='" +
55
		 * observation.getUrl() + "' /img></a>"));
56
		 * flowPanel.add(moreDetailsHtml); flowPanel.add(detailsPanel);
57
		 * flowPanel.add(ratePanel);
58
		 */
9 benjamin 59
	}
60
 
32 gduche 61
	protected void showValidationData(List<ObservationValidation> validationDatas) {
62
		/*
63
		 * if (validationDatas == null || validationDatas.size() == 0) {
64
		 * flowPanel.add(noValidationDataHtml); }
65
		 * flowPanel.add(proposeValidationDataHtml);
66
		 */
9 benjamin 67
 
68
	}
69
 
70
	protected void clearDetails() {
32 gduche 71
		/*
72
		 * detailsPanel.clear();
73
		 * moreDetailsHtml.setHTML("<img src='img/icon_plus.gif' >");
74
		 */
9 benjamin 75
	}
76
 
77
	public Panel getFlowPanel() {
32 gduche 78
		// return flowPanel;
79
		return new FlowPanel();
9 benjamin 80
	}
81
 
82
	public Panel getDetailsPanel() {
32 gduche 83
		// return detailsPanel;
84
		return new FlowPanel();
9 benjamin 85
	}
86
 
87
	public HTML getMoreDetailsHtml() {
32 gduche 88
		// return moreDetailsHtml;
89
		return new HTML();
9 benjamin 90
	}
91
 
92
	public HTML getNoValidationDataHtml() {
32 gduche 93
		// return noValidationDataHtml;
94
		return new HTML();
9 benjamin 95
	}
96
 
97
	public HTML getProposeValidationDataHtml() {
32 gduche 98
		// return proposeValidationDataHtml;
99
		return new HTML();
9 benjamin 100
	}
101
 
102
	public Panel getRatePanel() {
32 gduche 103
		// return ratePanel;
104
		return new FlowPanel();
9 benjamin 105
	}
106
}