Rev 14 | Blame | Last modification | View Log | RSS feed
package org.tela_botanica.del.client.vues.rechercheobservations;
import java.util.List;
import org.tela_botanica.del.client.modeles.Observation;
import org.tela_botanica.del.client.modeles.ObservationValidation;
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.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;
public class ObservationVue extends Composite {
// Annotation can be used to change the name of the associated xml file
// @UiTemplate("ObservationVue.ui.xml")
interface MyUiBinder extends UiBinder<Widget, ObservationVue> {
}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
@UiField
Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
@UiField
Image imagePrincipale;
public ObservationVue() {
// sets listBox
initWidget(uiBinder.createAndBindUi(this));
}
protected void loadImage(Observation observation) {
nomEspece.setText(observation.getSpecies());
nomAuteur.setText(observation.getAuteur());
imagePrincipale.setUrl(observation.getUrl());
nomObservateur.setText(observation.getAuteur());
nomRetenu.setText(observation.getNomRetenu());
dateObservation.setText(observation.getDate());
famille.setText(observation.getFamille());
localite.setText(observation.getLocalite());
/*
* flowPanel.clear(); flowPanel.add(new HTML(observation.getSpecies()));
* flowPanel.add(new HTML(observation.getAuteur())); flowPanel.add(new
* HTML("<a href='http://www.tela-botanica.org/eflore/BDNFF/4.02/nn/" +
* observation.getNumNomenclatural() + "' target='_blank'><img src='" +
* observation.getUrl() + "' /img></a>"));
* flowPanel.add(moreDetailsHtml); flowPanel.add(detailsPanel);
* flowPanel.add(ratePanel);
*/
}
protected void showValidationData(List<ObservationValidation> validationDatas) {
/*
* if (validationDatas == null || validationDatas.size() == 0) {
* flowPanel.add(noValidationDataHtml); }
* flowPanel.add(proposeValidationDataHtml);
*/
}
protected void clearDetails() {
/*
* detailsPanel.clear();
* moreDetailsHtml.setHTML("<img src='img/icon_plus.gif' >");
*/
}
public Panel getFlowPanel() {
// return flowPanel;
return new FlowPanel();
}
public Panel getDetailsPanel() {
// return detailsPanel;
return new FlowPanel();
}
public HTML getMoreDetailsHtml() {
// return moreDetailsHtml;
return new HTML();
}
public HTML getNoValidationDataHtml() {
// return noValidationDataHtml;
return new HTML();
}
public HTML getProposeValidationDataHtml() {
// return proposeValidationDataHtml;
return new HTML();
}
public Panel getRatePanel() {
// return ratePanel;
return new FlowPanel();
}
}