Subversion Repositories eFlore/Applications.del

Rev

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