Subversion Repositories eFlore/Applications.del

Rev

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