Subversion Repositories eFlore/Applications.del

Rev

Rev 32 | Go to most recent revision | Details | Compare with Previous | 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;
52 gduche 17
import com.google.gwt.user.client.ui.VerticalPanel;
32 gduche 18
import com.google.gwt.user.client.ui.Widget;
9 benjamin 19
 
14 benjamin 20
public class ObservationVue extends Composite {
9 benjamin 21
 
32 gduche 22
	// Annotation can be used to change the name of the associated xml file
23
	// @UiTemplate("ObservationVue.ui.xml")
24
	interface MyUiBinder extends UiBinder<Widget, ObservationVue> {
25
	}
9 benjamin 26
 
32 gduche 27
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
28
	@UiField
29
	Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
9 benjamin 30
 
32 gduche 31
	@UiField
52 gduche 32
	protected VerticalPanel zoneCache;
33
 
34
	@UiField
32 gduche 35
	Image imagePrincipale;
9 benjamin 36
 
52 gduche 37
	@UiField
38
	Label enSavoirPlus;
39
 
32 gduche 40
	public ObservationVue() {
41
		// sets listBox
42
		initWidget(uiBinder.createAndBindUi(this));
9 benjamin 43
	}
44
 
45
	protected void loadImage(Observation observation) {
52 gduche 46
		enSavoirPlus.setStyleName("boutonPlus");
47
		zoneCache.setVisible(false);
32 gduche 48
		nomEspece.setText(observation.getSpecies());
49
		nomAuteur.setText(observation.getAuteur());
50
		imagePrincipale.setUrl(observation.getUrl());
51
		nomObservateur.setText(observation.getAuteur());
52
		nomRetenu.setText(observation.getNomRetenu());
53
		dateObservation.setText(observation.getDate());
54
		famille.setText(observation.getFamille());
55
		localite.setText(observation.getLocalite());
56
 
9 benjamin 57
	}
58
 
32 gduche 59
	protected void showValidationData(List<ObservationValidation> validationDatas) {
60
		/*
61
		 * if (validationDatas == null || validationDatas.size() == 0) {
62
		 * flowPanel.add(noValidationDataHtml); }
63
		 * flowPanel.add(proposeValidationDataHtml);
64
		 */
9 benjamin 65
 
66
	}
67
 
68
	protected void clearDetails() {
32 gduche 69
		/*
70
		 * detailsPanel.clear();
71
		 * moreDetailsHtml.setHTML("<img src='img/icon_plus.gif' >");
72
		 */
9 benjamin 73
	}
74
 
75
	public Panel getFlowPanel() {
32 gduche 76
		// return flowPanel;
77
		return new FlowPanel();
9 benjamin 78
	}
79
 
80
	public Panel getDetailsPanel() {
32 gduche 81
		// return detailsPanel;
82
		return new FlowPanel();
9 benjamin 83
	}
84
 
85
	public HTML getMoreDetailsHtml() {
32 gduche 86
		// return moreDetailsHtml;
87
		return new HTML();
9 benjamin 88
	}
89
 
90
	public HTML getNoValidationDataHtml() {
32 gduche 91
		// return noValidationDataHtml;
92
		return new HTML();
9 benjamin 93
	}
94
 
95
	public HTML getProposeValidationDataHtml() {
32 gduche 96
		// return proposeValidationDataHtml;
97
		return new HTML();
9 benjamin 98
	}
99
 
100
	public Panel getRatePanel() {
32 gduche 101
		// return ratePanel;
102
		return new FlowPanel();
9 benjamin 103
	}
52 gduche 104
 
105
	public VerticalPanel getZoneCache() {
106
		return zoneCache;
107
	}
108
 
109
	public Label getEnSavoirPlus() {
110
		return enSavoirPlus;
111
	}
9 benjamin 112
}