Subversion Repositories eFlore/Applications.del

Rev

Rev 1222 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1206 gduche 1
package org.tela_botanica.del.client.vues.entete.chapeaux;
2
 
3
import org.tela_botanica.del.client.cache.CacheClient;
4
import org.tela_botanica.del.client.gestionhistorique.ConstantesNavigation;
5
 
6
import com.google.gwt.core.client.GWT;
7
import com.google.gwt.uibinder.client.UiBinder;
8
import com.google.gwt.uibinder.client.UiField;
9
import com.google.gwt.user.client.ui.Composite;
10
import com.google.gwt.user.client.ui.Panel;
11
import com.google.gwt.user.client.ui.Widget;
12
 
13
public class ChapeauVue extends Composite implements ChapeauPresenteur.Vue {
14
 
15
	// Gestion d'UiBinder
16
	interface Binder extends UiBinder<Widget, ChapeauVue> {
17
	}
18
 
19
	private static Binder binder = GWT.create(Binder.class);
20
 
21
	@UiField
22
	Panel chapeauIdentiplante, chapeauPictoflora;
23
 
24
	public ChapeauVue() {
25
		initWidget(binder.createAndBindUi(this));
26
		gererAffichageEnFonctionDeLaNavigation();
27
	}
28
 
29
	public void gererAffichageEnFonctionDeLaNavigation() {
30
		CacheClient cache = CacheClient.getInstance();
31
		String pageCourante = cache.getPageCourante();
1222 gduche 32
		if (pageCourante.startsWith(ConstantesNavigation.PICTOFLORA) || pageCourante.startsWith(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)
33
				|| pageCourante.startsWith(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
1206 gduche 34
			chapeauIdentiplante.setVisible(false);
35
			chapeauPictoflora.setVisible(true);
36
		} else {
37
			chapeauIdentiplante.setVisible(true);
38
			chapeauPictoflora.setVisible(false);
39
		}
40
	}
41
}