Subversion Repositories eFlore/Applications.del

Rev

Rev 454 | 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;
455 benjamin 7
import com.google.gwt.user.client.ui.Button;
9 benjamin 8
import com.google.gwt.user.client.ui.Composite;
9
import com.google.gwt.user.client.ui.FlowPanel;
323 gduche 10
import com.google.gwt.user.client.ui.HasWidgets;
178 benjamin 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;
455 benjamin 26
 
360 benjamin 27
	@UiField
28
	ListBox listeProtocoles;
29
 
455 benjamin 30
	@UiField
31
	Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant;
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
	}
455 benjamin 76
 
405 gduche 77
	@Override
454 aurelien 78
	public int getIdProtocoleSelectionne() {
405 gduche 79
		return listeProtocoles.getSelectedIndex();
80
	}
454 aurelien 81
 
82
	@Override
83
	public void ajouterVue(HasWidgets composite) {
84
		composite.add(this.asWidget());
85
	}
455 benjamin 86
 
87
	public Button getTriParNbVotesAscendant() {
88
		return triParNbVotesAscendant;
89
	}
90
 
91
	public Button getTriParNbVotesDescendant() {
92
		return triParNbVotesDescendant;
93
	}
94
 
95
	public Button getTriParDateAscendant() {
96
		return triParDateAscendant;
97
	}
98
 
99
	public Button getTriParDateDescendant() {
100
		return triParDateDescendant;
101
	}
9 benjamin 102
}