Rev 73 | 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.HorizontalPanel;
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.VerticalPanel;
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
protected Label nomEspece, nomAuteur, nomObservateur, nomRetenu, dateObservation, famille, localite;
@UiField
protected HorizontalPanel voter;
@UiField
protected VerticalPanel zoneCache;
@UiField
Image imagePrincipale;
@UiField
Label enSavoirPlus, ajoutValidation;
public ObservationVue() {
// sets listBox
initWidget(uiBinder.createAndBindUi(this));
}
protected void loadImage(Observation observation) {
enSavoirPlus.setStyleName("boutonPlus");
zoneCache.setVisible(false);
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());
}
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 HorizontalPanel getVoter() {
return voter;
}
public VerticalPanel getZoneCache() {
return zoneCache;
}
public Label getEnSavoirPlus() {
return enSavoirPlus;
}
public Image getImagePrincipale() {
return imagePrincipale;
}
public Label getAjoutValidation() {
return ajoutValidation;
}
}