Rev 2050 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.del.client.vues.identiplante.resultats.observations;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
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.HTML;
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 implements ObservationPresenteur.Vue {
// Gestion d'UiBinder
interface Binder extends UiBinder<Widget, ObservationVue> {
}
private static Binder binder = GWT.create(Binder.class);
@UiField
Button boutonAjoutProposition, boutonAjoutCommentaire, boutonPlusDeDetails;
@UiField
Panel determinationsPanel, imagesPanel, metadonnees;
@UiField Label nomEspece;
@UiField HTML messageEvenements;
public ObservationVue() {
initWidget(binder.createAndBindUi(this));
}
@Override
public HasClickHandlers getBoutonAjoutProposition() {
return boutonAjoutProposition;
}
@Override
public HasClickHandlers getBoutonAjoutCommentaire() {
return boutonAjoutCommentaire;
}
@Override
public HasClickHandlers getBoutonPlusDeDetails() {
return boutonPlusDeDetails;
}
public Panel getDeterminationsPanel() {
return determinationsPanel;
}
public void setDeterminationsPanel(Panel determinationsPanel) {
this.determinationsPanel = determinationsPanel;
}
public Panel getImagesPanel() {
return imagesPanel;
}
public Panel getMetadonneesPanel() {
return metadonnees;
}
@Override
public HasClickHandlers getNomEspece() {
return nomEspece;
}
@Override
public void setNomEspece(String nomEspece) {
this.nomEspece.setText(nomEspece);
}
@Override
public void setNbCommentaires(String nbCommentaires) {
boutonPlusDeDetails.setText(boutonPlusDeDetails.getText()+" ("+nbCommentaires+")");
}
@Override
public void afficherEvenementsObservation(String evenementsObs) {
messageEvenements.setHTML(evenementsObs);
messageEvenements.setVisible(true);
}
public void cacherEvenementsObservation() {
messageEvenements.setVisible(false);
}
@Override
public void mettreEnValeurEvenementsObs() {
messageEvenements.addStyleName("evenementsNouveaux");
}
}