1,19 → 1,23 |
package org.tela_botanica.del.client.vues.rechercheobservations; |
|
import java.util.ArrayList; |
import java.util.Iterator; |
import java.util.List; |
|
import org.tela_botanica.del.client.modeles.Observation; |
|
import com.google.gwt.core.client.GWT; |
import com.google.gwt.uibinder.client.UiBinder; |
import com.google.gwt.uibinder.client.UiField; |
import com.google.gwt.user.client.ui.Button; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.FlexTable; |
import com.google.gwt.user.client.ui.FlowPanel; |
import com.google.gwt.user.client.ui.HTML; |
import com.google.gwt.user.client.ui.HasHorizontalAlignment; |
import com.google.gwt.user.client.ui.HorizontalPanel; |
import com.google.gwt.user.client.ui.Panel; |
import com.google.gwt.user.client.ui.TextBox; |
import com.google.gwt.user.client.ui.VerticalPanel; |
import com.google.gwt.user.client.ui.Widget; |
|
public class ObservationRechercheVue extends Composite { |
|
20,8 → 24,6 |
private final VerticalPanel mainPanel = new VerticalPanel(); |
private final Panel panneauChargement = new FlowPanel(); |
private final Panel taxaPanel = new FlowPanel(); |
private final FlexTable imageTable = new FlexTable(); |
private final Panel panneauPagination = new HorizontalPanel(); |
private final List<Panel> panneauxImages = new ArrayList<Panel>(); |
private final HTML labelChargement = new HTML("<img src='img/wait.gif' />Contact du serveur du CEL..."); |
private final HTML labelChercher = new HTML("<img src='img/search_icon.gif' />Search taxon:"); |
30,36 → 32,30 |
private int numImage = 0; |
private final TextBox textBox = new TextBox(); |
|
// Constructeur |
protected ObservationRechercheVue() { |
// Annotation can be used to change the name of the associated xml file |
// @UiTemplate("ObservationRechercheVue.ui.xml") |
interface MyUiBinder extends UiBinder<Widget, ObservationRechercheVue> { |
} |
|
textBox.setText("apifera"); |
textBox.setFocus(true); |
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); |
|
mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); |
mainPanel.setSize("100%", "100%"); |
@UiField |
TextBox nomEspece; |
|
Panel textBoxPanel = new HorizontalPanel(); |
textBoxPanel.add(labelChercher); |
textBoxPanel.add(textBox); |
@UiField |
Panel panneauPagination; |
|
Panel searchPanel = new VerticalPanel(); |
searchPanel.add(new HTML("Rechercher une image")); |
searchPanel.add(textBoxPanel); |
searchPanel.add(new HTML("Entrez un nom de genre ou d'espèce, un nom de commune, un numéro de departement, l'email d'un utilisateur ou un mot-clef")); |
@UiField |
Button boutonChercher; |
|
panneauChargement.add(labelChargement); |
panneauChargement.setVisible(false); |
@UiField |
FlexTable imageTable; |
|
mainPanel.add(panneauChargement); |
// Constructeur |
protected ObservationRechercheVue() { |
|
taxaPanel.add(imageTable); |
|
mainPanel.add(searchPanel); |
mainPanel.add(panneauPagination); |
mainPanel.add(taxaPanel); |
|
initWidget(mainPanel); |
initWidget(uiBinder.createAndBindUi(this)); |
nomEspece.setFocus(true); |
} |
|
/** |
134,7 → 130,7 |
} |
|
public TextBox getTextBox() { |
return textBox; |
return nomEspece; |
} |
|
public Panel getPanel() { |
144,5 → 140,8 |
public List<Panel> getPanneauxImages() { |
return panneauxImages; |
} |
|
|
public Button getBoutonChercher() { |
return boutonChercher; |
} |
} |