Subversion Repositories eFlore/Applications.del

Rev

Rev 86 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 124
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.rechercheobservations;
1
package org.tela_botanica.del.client.vues.rechercheobservations;
Line 2... Line 2...
2
 
2
 
-
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.Iterator;
Line 4... Line 5...
4
import java.util.List;
5
import java.util.List;
Line -... Line 6...
-
 
6
 
-
 
7
import org.tela_botanica.del.client.modeles.Observation;
-
 
8
 
-
 
9
import com.google.gwt.core.client.GWT;
5
 
10
import com.google.gwt.uibinder.client.UiBinder;
6
import org.tela_botanica.del.client.modeles.Observation;
11
import com.google.gwt.uibinder.client.UiField;
7
 
12
import com.google.gwt.user.client.ui.Button;
8
import com.google.gwt.user.client.ui.Composite;
13
import com.google.gwt.user.client.ui.Composite;
9
import com.google.gwt.user.client.ui.FlexTable;
-
 
10
import com.google.gwt.user.client.ui.FlowPanel;
-
 
11
import com.google.gwt.user.client.ui.HTML;
14
import com.google.gwt.user.client.ui.FlexTable;
12
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
15
import com.google.gwt.user.client.ui.FlowPanel;
13
import com.google.gwt.user.client.ui.HorizontalPanel;
16
import com.google.gwt.user.client.ui.HTML;
-
 
17
import com.google.gwt.user.client.ui.Panel;
Line 14... Line 18...
14
import com.google.gwt.user.client.ui.Panel;
18
import com.google.gwt.user.client.ui.TextBox;
Line 15... Line 19...
15
import com.google.gwt.user.client.ui.TextBox;
19
import com.google.gwt.user.client.ui.VerticalPanel;
16
import com.google.gwt.user.client.ui.VerticalPanel;
20
import com.google.gwt.user.client.ui.Widget;
17
 
21
 
18
public class ObservationRechercheVue extends Composite {
-
 
19
 
-
 
20
	private final VerticalPanel mainPanel = new VerticalPanel();
22
public class ObservationRechercheVue extends Composite {
21
	private final Panel panneauChargement = new FlowPanel();
23
 
22
	private final Panel taxaPanel = new FlowPanel();
24
	private final VerticalPanel mainPanel = new VerticalPanel();
23
	private final FlexTable imageTable = new FlexTable();
25
	private final Panel panneauChargement = new FlowPanel();
24
	private final Panel panneauPagination = new HorizontalPanel();
26
	private final Panel taxaPanel = new FlowPanel();
25
	private final List<Panel> panneauxImages = new ArrayList<Panel>();
27
	private final List<Panel> panneauxImages = new ArrayList<Panel>();
26
	private final HTML labelChargement = new HTML("<img src='img/wait.gif' />Contact du serveur du CEL...");
28
	private final HTML labelChargement = new HTML("<img src='img/wait.gif' />Contact du serveur du CEL...");
Line 27... Line 29...
27
	private final HTML labelChercher = new HTML("<img src='img/search_icon.gif' />Search &nbsp;&nbsp;      taxon:");
29
	private final HTML labelChercher = new HTML("<img src='img/search_icon.gif' />Search &nbsp;&nbsp;      taxon:");
28
	private int nbCol = 5;
30
	private int nbCol = 5;
-
 
31
	private final int nbImagesPerPage = 10;
29
	private final int nbImagesPerPage = 10;
32
	private int numImage = 0;
30
	private int numImage = 0;
-
 
31
	private final TextBox textBox = new TextBox();
-
 
Line 32... Line 33...
32
 
33
	private final TextBox textBox = new TextBox();
33
	// Constructeur
-
 
Line 34... Line -...
34
	protected ObservationRechercheVue() {
-
 
35
 
34
 
36
		textBox.setText("apifera");
35
	// Annotation can be used to change the name of the associated xml file
37
		textBox.setFocus(true);
-
 
38
 
-
 
39
		mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
-
 
40
		mainPanel.setSize("100%", "100%");
-
 
41
 
-
 
Line 42... Line 36...
42
		Panel textBoxPanel = new HorizontalPanel();
36
	// @UiTemplate("ObservationRechercheVue.ui.xml")
43
		textBoxPanel.add(labelChercher);
37
	interface MyUiBinder extends UiBinder<Widget, ObservationRechercheVue> {
Line -... Line 38...
-
 
38
	}
44
		textBoxPanel.add(textBox);
39
 
Line -... Line 40...
-
 
40
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
45
 
41
 
Line 46... Line 42...
46
		Panel searchPanel = new VerticalPanel();
42
	@UiField
47
		searchPanel.add(new HTML("Rechercher une image"));
43
	TextBox nomEspece;
48
		searchPanel.add(textBoxPanel);
-
 
Line 49... Line 44...
49
		searchPanel.add(new HTML("Entrez un nom de genre ou d'esp&egrave;ce, un nom de commune, un num&eacute;ro de departement, l'email d'un utilisateur ou un mot-clef"));
44
 
-
 
45
	@UiField
50
 
46
	Panel panneauPagination;
Line 51... Line 47...
51
		panneauChargement.add(labelChargement);
47
 
52
		panneauChargement.setVisible(false);
48
	@UiField
53
 
49
	Button boutonChercher;
Line 132... Line 128...
132
	public int getNbImagesPerPage() {
128
	public int getNbImagesPerPage() {
133
		return nbImagesPerPage;
129
		return nbImagesPerPage;
134
	}
130
	}
Line 135... Line 131...
135
 
131
 
136
	public TextBox getTextBox() {
132
	public TextBox getTextBox() {
137
		return textBox;
133
		return nomEspece;
Line 138... Line 134...
138
	}
134
	}
139
 
135
 
140
	public Panel getPanel() {
136
	public Panel getPanel() {
Line 141... Line 137...
141
		return mainPanel;
137
		return mainPanel;
142
	}
138
	}
143
 
139
 
144
	public List<Panel> getPanneauxImages() {
140
	public List<Panel> getPanneauxImages() {
-
 
141
		return panneauxImages;
-
 
142
	}
-
 
143
	
145
		return panneauxImages;
144
	public Button getBoutonChercher() {