Subversion Repositories eFlore/Applications.del

Rev

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