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