Subversion Repositories eFlore/Applications.del

Rev

Rev 1038 | Rev 1079 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1038 Rev 1078
Line 14... Line 14...
14
 
14
 
15
import com.google.gwt.event.dom.client.ClickEvent;
15
import com.google.gwt.event.dom.client.ClickEvent;
16
import com.google.gwt.event.dom.client.ClickHandler;
16
import com.google.gwt.event.dom.client.ClickHandler;
17
import com.google.gwt.event.dom.client.HasClickHandlers;
17
import com.google.gwt.event.dom.client.HasClickHandlers;
-
 
18
import com.google.gwt.i18n.client.DateTimeFormat;
18
import com.google.gwt.i18n.client.DateTimeFormat;
19
import com.google.gwt.user.client.History;
19
import com.google.gwt.user.client.Window;
20
import com.google.gwt.user.client.Window;
20
import com.google.gwt.user.client.ui.HasText;
21
import com.google.gwt.user.client.ui.HasText;
21
import com.google.gwt.user.client.ui.HasWidgets;
22
import com.google.gwt.user.client.ui.HasWidgets;
Line 71... Line 72...
71
		public HasClickHandlers getLienCommentaire();
72
		public HasClickHandlers getLienCommentaire();
Line 72... Line 73...
72
		
73
		
Line 73... Line 74...
73
		public void setStation(String station) ;
74
		public void setStation(String station) ;
-
 
75
		
-
 
76
		public void masquerChampsVides();
74
		
77
		
Line 75... Line 78...
75
		public void masquerChampsVides();
78
		public void activerLiens();
76
	}
79
	}
77
 
80
 
-
 
81
	private Vue vue;
78
	private Vue vue;
82
	private Observation observation;
79
	private Observation observation;
83
	private ModeRecherche modeRecherche;
80
	private ModeRecherche modeRecherche;
84
	private boolean avecLiens;
81
 
85
	
82
	public MetadonneesPresenteur(Vue vue, Observation observation, ModeRecherche modeRecherche) {
86
	public MetadonneesPresenteur(Vue vue, Observation observation, ModeRecherche modeRecherche, boolean avecLiens) {
-
 
87
		this.vue = vue;
83
		this.vue = vue;
88
		this.modeRecherche = modeRecherche;
Line 84... Line 89...
84
		this.modeRecherche = modeRecherche;
89
		setObservation(observation);
85
		setObservation(observation);
90
		this.avecLiens = avecLiens;
86
	}
91
	}
Line 121... Line 126...
121
	
126
	
122
	@Override
127
	@Override
123
	public void go(HasWidgets composite) {
128
	public void go(HasWidgets composite) {
124
		composite.add(vue.asWidget());
129
		composite.add(vue.asWidget());
-
 
130
		chargerMetaDonnees();
125
		chargerMetaDonnees();
131
		//if (this.avecLiens) {
-
 
132
			gererEvenements();
126
		gererEvenements();
133
		//}
Line 127... Line 134...
127
	}
134
	}
128
 
135
 
129
	@Override
-
 
Line -... Line 136...
-
 
136
	@Override
-
 
137
	protected void gererEvenements() {
-
 
138
		
-
 
139
		if (this.avecLiens) {
-
 
140
		vue.getLienAuteur().addClickHandler(new ClickHandler() {
-
 
141
 
-
 
142
			@Override
-
 
143
			public void onClick(ClickEvent arg0) {
-
 
144
				
-
 
145
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
146
				informationsRecherche.setAuteur(vue.getAuteur().getText());
-
 
147
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
148
				History.fireCurrentHistoryState();
-
 
149
			}
-
 
150
		});
-
 
151
		
-
 
152
		vue.getLienDateReleve().addClickHandler(new ClickHandler() {
-
 
153
 
-
 
154
			@Override
-
 
155
			public void onClick(ClickEvent arg0) {
-
 
156
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
157
				informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
158
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
159
				History.fireCurrentHistoryState();
-
 
160
			}
-
 
161
		});
-
 
162
 
-
 
163
		vue.getLienDateTransmission().addClickHandler(new ClickHandler() {
-
 
164
 
-
 
165
			@Override
-
 
166
			public void onClick(ClickEvent arg0) {
-
 
167
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
168
				informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
169
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
170
				History.fireCurrentHistoryState();
-
 
171
			}
-
 
172
		});
-
 
173
 
-
 
174
		vue.getLienFamille().addClickHandler(new ClickHandler() {
-
 
175
 
-
 
176
			@Override
-
 
177
			public void onClick(ClickEvent arg0) {
-
 
178
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
179
				informationsRecherche.setFamille(vue.getFamille().getText());
-
 
180
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
181
				History.fireCurrentHistoryState();
-
 
182
			}
-
 
183
		});
-
 
184
 
-
 
185
		vue.getLienLocalite().addClickHandler(new ClickHandler() {
-
 
186
 
-
 
187
			@Override
-
 
188
			public void onClick(ClickEvent arg0) {
-
 
189
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
190
				informationsRecherche.setCommune(vue.getLocalite().getText());
-
 
191
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
192
				History.fireCurrentHistoryState();
-
 
193
			}
-
 
194
		});
-
 
195
 
-
 
196
		vue.getLienMotsClefs().addClickHandler(new ClickHandler() {
-
 
197
 
-
 
198
			@Override
-
 
199
			public void onClick(ClickEvent arg0) {
-
 
200
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
201
				informationsRecherche.setMotClef(vue.getMotsClefs().getText());
-
 
202
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
203
				History.fireCurrentHistoryState();
-
 
204
			}
-
 
205
		});
-
 
206
 
-
 
207
		vue.getLienNomCommun().addClickHandler(new ClickHandler() {
-
 
208
 
-
 
209
			@Override
-
 
210
			public void onClick(ClickEvent arg0) {
-
 
211
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
212
				informationsRecherche.setRechercheLibre(vue.getNomCommun().getText());
-
 
213
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
214
				History.fireCurrentHistoryState();
-
 
215
			}
-
 
216
		});
-
 
217
 
-
 
218
		vue.getLienNomRetenu().addClickHandler(new ClickHandler() {
-
 
219
 
-
 
220
			@Override
-
 
221
			public void onClick(ClickEvent arg0) {
-
 
222
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
223
				informationsRecherche.setRechercheLibre(vue.getNomRetenu().getText());
-
 
224
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
225
				History.fireCurrentHistoryState();
-
 
226
			}
-
 
227
		});
-
 
228
 
-
 
229
		vue.getLienMilieu().addClickHandler(new ClickHandler() {
-
 
230
 
-
 
231
			@Override
-
 
232
			public void onClick(ClickEvent arg0) {
-
 
233
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
234
				informationsRecherche.setRechercheLibre(vue.getMilieu().getText());
-
 
235
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
236
				History.fireCurrentHistoryState();
-
 
237
			}
-
 
238
		});
-
 
239
 
-
 
240
		vue.getLienCommentaire().addClickHandler(new ClickHandler() {
-
 
241
 
-
 
242
			@Override
-
 
243
			public void onClick(ClickEvent arg0) {
-
 
244
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
245
				informationsRecherche.setRechercheLibre(vue.getCommentaire().getText());
-
 
246
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
Line -... Line 247...
-
 
247
				History.fireCurrentHistoryState();
-
 
248
			}
130
	protected void gererEvenements() {
249
		});
Line 131... Line 250...
131
 
250
 
Line 132... Line 251...
132
		
251
		vue.activerLiens();