Subversion Repositories eFlore/Applications.del

Rev

Rev 364 | 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));
26 gduche 36
	}
37
 
178 benjamin 38
	public Panel getPanneauChargement() {
39
		return panneauChargement;
9 benjamin 40
	}
41
 
178 benjamin 42
	public void setListeProtocoles(ListBox listeProtocoles) {
43
		this.listeProtocoles = listeProtocoles;
9 benjamin 44
	}
45
 
208 gduche 46
	// Cette méthode est public car appelé dans GestionnaireHistorique
278 gduche 47
	public Panel getZoneResultats() {
178 benjamin 48
		return panneauResultats;
9 benjamin 49
	}
50
 
178 benjamin 51
	public void setPanneauResultats(Panel panneauResultats) {
52
		this.panneauResultats = panneauResultats;
9 benjamin 53
	}
277 gduche 54
 
55
	public HasChangeHandlers getListeProtocoles() {
56
		return listeProtocoles;
57
	}
360 benjamin 58
 
277 gduche 59
	public void ajouterProtocole(String protocole) {
60
		listeProtocoles.addItem(protocole);
61
	}
360 benjamin 62
 
277 gduche 63
	public void selectionnerProtocole(int index) {
64
		listeProtocoles.setSelectedIndex(index);
360 benjamin 65
 
277 gduche 66
	}
311 gduche 67
 
323 gduche 68
	public HasWidgets getZoneRecherche() {
69
		return zoneRecherche;
311 gduche 70
	}
360 benjamin 71
 
72
	@Override
73
	public String getNomProtocolSelectionne() {
74
		return listeProtocoles.getValue(listeProtocoles.getSelectedIndex());
75
	}
405 gduche 76
 
77
	@Override
78
	public int getIdProtocolSelectionne() {
79
		return listeProtocoles.getSelectedIndex();
80
	}
9 benjamin 81
}