Subversion Repositories eFlore/Applications.del

Rev

Rev 360 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
148 benjamin 1
package org.tela_botanica.del.client.vues.rechercheimages;
9 benjamin 2
 
364 gduche 3
import org.tela_botanica.del.client.i18n.I18n;
4
 
124 gduche 5
import com.google.gwt.core.client.GWT;
277 gduche 6
import com.google.gwt.event.dom.client.HasChangeHandlers;
124 gduche 7
import com.google.gwt.uibinder.client.UiBinder;
8
import com.google.gwt.uibinder.client.UiField;
9 benjamin 9
import com.google.gwt.user.client.ui.Composite;
10
import com.google.gwt.user.client.ui.FlowPanel;
323 gduche 11
import com.google.gwt.user.client.ui.HasWidgets;
178 benjamin 12
import com.google.gwt.user.client.ui.Label;
13
import com.google.gwt.user.client.ui.ListBox;
9 benjamin 14
import com.google.gwt.user.client.ui.Panel;
124 gduche 15
import com.google.gwt.user.client.ui.Widget;
9 benjamin 16
 
323 gduche 17
public class MoteurRechercheImageVue extends Composite implements MoteurRechercheImagePresenteur.Vue {
9 benjamin 18
 
26 gduche 19
	private final Panel panneauChargement = new FlowPanel();
9 benjamin 20
 
360 benjamin 21
	interface MyUiBinder extends UiBinder<Widget, MoteurRechercheImageVue> {
22
	}
9 benjamin 23
 
124 gduche 24
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
9 benjamin 25
 
360 benjamin 26
	@UiField
27
	Panel panneauResultats, zoneRecherche;
364 gduche 28
 
29
 
360 benjamin 30
	@UiField
31
	ListBox listeProtocoles;
32
 
124 gduche 33
	// Constructeur
311 gduche 34
	public MoteurRechercheImageVue() {
124 gduche 35
		initWidget(uiBinder.createAndBindUi(this));
364 gduche 36
		this.ajouterProtocole(I18n.getVocabulary().choisirProtocole());
26 gduche 37
	}
38
 
178 benjamin 39
	public Panel getPanneauChargement() {
40
		return panneauChargement;
9 benjamin 41
	}
42
 
178 benjamin 43
	public void setListeProtocoles(ListBox listeProtocoles) {
44
		this.listeProtocoles = listeProtocoles;
9 benjamin 45
	}
46
 
208 gduche 47
	// Cette méthode est public car appelé dans GestionnaireHistorique
278 gduche 48
	public Panel getZoneResultats() {
178 benjamin 49
		return panneauResultats;
9 benjamin 50
	}
51
 
178 benjamin 52
	public void setPanneauResultats(Panel panneauResultats) {
53
		this.panneauResultats = panneauResultats;
9 benjamin 54
	}
277 gduche 55
 
56
	public HasChangeHandlers getListeProtocoles() {
57
		return listeProtocoles;
58
	}
360 benjamin 59
 
277 gduche 60
	public void ajouterProtocole(String protocole) {
61
		listeProtocoles.addItem(protocole);
62
	}
360 benjamin 63
 
277 gduche 64
	public void selectionnerProtocole(int index) {
65
		listeProtocoles.setSelectedIndex(index);
360 benjamin 66
 
277 gduche 67
	}
311 gduche 68
 
323 gduche 69
	public HasWidgets getZoneRecherche() {
70
		return zoneRecherche;
311 gduche 71
	}
360 benjamin 72
 
73
	@Override
74
	public String getNomProtocolSelectionne() {
75
		return listeProtocoles.getValue(listeProtocoles.getSelectedIndex());
76
	}
9 benjamin 77
}