1,11 → 1,12 |
package org.tela_botanica.del.client.vues.plateformedetermination.ligneProtocole; |
|
|
import org.tela_botanica.del.client.cache.CacheClient; |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVotePresenteur; |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVoteVue; |
import org.tela_botanica.del.client.modeles.Image; |
import org.tela_botanica.del.client.modeles.Protocole; |
import org.tela_botanica.del.client.services.rest.VoteProtocoleServiceConcret; |
|
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
|
14,6 → 15,7 |
public interface Vue extends IsWidget { |
|
void setNom(String nom); |
|
HasWidgets getZoneVote(); |
} |
|
25,12 → 27,13 |
this.protocole = protocole; |
setNom(protocole.getNom()); |
Image imageCourante = CacheClient.getInstance().getImageCourante(); |
if(imageCourante == null) { |
// on suppose qu'il y a toujours au moins une image associée à l'observation en cours |
if (imageCourante == null) { |
// on suppose qu'il y a toujours au moins une image associée à |
// l'observation en cours |
imageCourante = CacheClient.getInstance().getObservationCourante().getImages().get(0); |
} |
|
MoyenneVotePresenteur votePresenteur = new MoyenneVotePresenteur(imageCourante, protocole, new MoyenneVoteVue()); |
|
MoyenneVotePresenteur votePresenteur = new MoyenneVotePresenteur(imageCourante, protocole, new MoyenneVoteVue(), new VoteProtocoleServiceConcret()); |
votePresenteur.go(vue.getZoneVote()); |
} |
|
37,11 → 40,11 |
public void setNom(String nom) { |
vue.setNom(nom); |
} |
|
|
public Vue getVue() { |
return vue; |
} |
|
|
public void go(HasWidgets composite) { |
composite.add(vue.asWidget()); |
} |