Subversion Repositories eFlore/Applications.del

Rev

Rev 52 | 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;
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
43
	Label enSavoirPlus;
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
 
64 gduche 62
 
9 benjamin 63
	}
64
 
32 gduche 65
	protected void showValidationData(List<ObservationValidation> validationDatas) {
66
		/*
67
		 * if (validationDatas == null || validationDatas.size() == 0) {
68
		 * flowPanel.add(noValidationDataHtml); }
69
		 * flowPanel.add(proposeValidationDataHtml);
70
		 */
9 benjamin 71
 
72
	}
73
 
74
	protected void clearDetails() {
32 gduche 75
		/*
76
		 * detailsPanel.clear();
77
		 * moreDetailsHtml.setHTML("<img src='img/icon_plus.gif' >");
78
		 */
9 benjamin 79
	}
80
 
81
	public Panel getFlowPanel() {
32 gduche 82
		// return flowPanel;
83
		return new FlowPanel();
9 benjamin 84
	}
85
 
86
	public Panel getDetailsPanel() {
32 gduche 87
		// return detailsPanel;
88
		return new FlowPanel();
9 benjamin 89
	}
90
 
91
	public HTML getMoreDetailsHtml() {
32 gduche 92
		// return moreDetailsHtml;
93
		return new HTML();
9 benjamin 94
	}
95
 
96
	public HTML getNoValidationDataHtml() {
32 gduche 97
		// return noValidationDataHtml;
98
		return new HTML();
9 benjamin 99
	}
100
 
101
	public HTML getProposeValidationDataHtml() {
32 gduche 102
		// return proposeValidationDataHtml;
103
		return new HTML();
9 benjamin 104
	}
105
 
64 gduche 106
	public HorizontalPanel getVoter() {
107
		return voter;
9 benjamin 108
	}
52 gduche 109
 
110
	public VerticalPanel getZoneCache() {
111
		return zoneCache;
112
	}
113
 
114
	public Label getEnSavoirPlus() {
115
		return enSavoirPlus;
116
	}
9 benjamin 117
}