/trunk/war/img/fleurs/fleur0.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur0.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/war/img/fleurs/fleur1.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur1.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/war/img/fleurs/fleur2.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur2.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/war/img/fleurs/fleur3.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur3.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/war/img/fleurs/fleur4.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur4.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/war/img/fleurs/fleur5.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/war/img/fleurs/fleur5.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/src/org/tela_botanica/del/client/composants/votefleur/VoteFleurVue.ui.xml |
---|
New file |
0,0 → 1,16 |
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat' |
ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator" ui:generateLocales="default"> |
<ui:with field='res' type='org.tela_botanica.del.client.resources.Ressources'/> |
<ui:with field="constants" type="org.tela_botanica.del.client.i18n.Vocabulary"/> |
<ui:style src="voteFleur.css" /> |
<g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur0" styleName="{style.fleur} {style.ZeroPetales}"></g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur1" styleName="{style.fleur} {style.UnPetale}"></g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur2" styleName="{style.fleur} {style.DeuxPetales}"></g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur3" styleName="{style.fleur} {style.TroisPetales}"></g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur4" styleName="{style.fleur} {style.QuatrePetales}"></g:HTMLPanel> |
<g:HTMLPanel ui:field="fleur5" styleName="{style.fleur} {style.CinqPetales}"></g:HTMLPanel> |
</g:HTMLPanel> |
</ui:UiBinder> |
/trunk/src/org/tela_botanica/del/client/composants/votefleur/VoteFleurPresenteur.java |
---|
New file |
0,0 → 1,32 |
package org.tela_botanica.del.client.composants.votefleur; |
import org.tela_botanica.del.client.composants.presenteur.Presenteur; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
public class VoteFleurPresenteur extends Presenteur { |
public interface Vue extends IsWidget { |
public void setNote(int note); |
} |
private Vue vue; |
public VoteFleurPresenteur(Vue vue) { |
this.vue = vue; |
} |
public void go(HasWidgets composite) { |
composite.add(vue.asWidget()); |
} |
public void setNote(int note) { |
vue.setNote(note); |
} |
@Override |
protected void gererEvenements() { |
// TODO Auto-generated method stub |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votefleur/VoteFleurVue.java |
---|
New file |
0,0 → 1,56 |
package org.tela_botanica.del.client.composants.votefleur; |
import org.tela_botanica.del.client.composants.votefleur.VoteFleurPresenteur.Vue; |
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.HTMLPanel; |
import com.google.gwt.user.client.ui.Widget; |
public class VoteFleurVue extends Composite implements Vue { |
// Annotation can be used to change the name of the associated xml file |
// @UiTemplate("ObservationVue.ui.xml") |
interface MyUiBinder extends UiBinder<Widget, VoteFleurVue> { |
} |
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); |
@UiField |
protected HTMLPanel fleur0, fleur1, fleur2, fleur3, fleur4, fleur5; |
public VoteFleurVue() { |
// sets listBox |
initWidget(uiBinder.createAndBindUi(this)); |
initialiserVue(); |
} |
public void initialiserVue() { |
this.fleur0.setVisible(false); |
this.fleur1.setVisible(false); |
this.fleur2.setVisible(false); |
this.fleur3.setVisible(false); |
this.fleur4.setVisible(false); |
this.fleur5.setVisible(false); |
} |
public void setNote(int note) { |
switch (note) { |
case 0 : this.fleur0.setVisible(true); |
break; |
case 1 : this.fleur1.setVisible(true); |
break; |
case 2 : this.fleur2.setVisible(true); |
break; |
case 3 : this.fleur3.setVisible(true); |
break; |
case 4 : this.fleur4.setVisible(true); |
break; |
default : this.fleur5.setVisible(true); |
break; |
} |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votefleur/voteFleur.css |
---|
New file |
0,0 → 1,23 |
.fleur { |
width:28px; |
height:27px; |
} |
.ZeroPetales { |
background:url(./img/fleurs/fleur0.png); |
} |
.UnPetale { |
background:url(./img/fleurs/fleur1.png); |
} |
.DeuxPetales { |
background:url(./img/fleurs/fleur2.png); |
} |
.TroisPetales { |
background:url(./img/fleurs/fleur3.png); |
} |
.QuatrePetales { |
background:url(./img/fleurs/fleur4.png); |
} |
.CinqPetales { |
background:url(./img/fleurs/fleur5.png); |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVotePresenteur.java |
---|
3,6 → 3,8 |
import java.util.Iterator; |
import org.tela_botanica.del.client.cache.CacheClient; |
import org.tela_botanica.del.client.composants.votefleur.VoteFleurPresenteur; |
import org.tela_botanica.del.client.composants.votefleur.VoteFleurVue; |
import org.tela_botanica.del.client.modeles.Image; |
import org.tela_botanica.del.client.modeles.Protocole; |
import org.tela_botanica.del.client.modeles.VoteProtocole; |
12,6 → 14,7 |
import com.google.gwt.event.dom.client.ClickEvent; |
import com.google.gwt.event.dom.client.ClickHandler; |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.HasText; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
48,6 → 51,8 |
public void ajouterAuParent(HasWidgets composite); |
public void afficherVotePrisEnCompte(); |
public HasWidgets getZoneFleur(); |
} |
private Vue vue; |
57,6 → 62,7 |
private int valeurVoteDefaut = -1; |
private int valeurVoteUtilisateur = -1; |
private int valeurVoteTotal = 0; |
// TODO: on devrait passer un conteneur qui permet d'accéder à ces services |
private VoteProtocoleService voteProtocoleService; |
149,6 → 155,9 |
private void rafraichirVue() { |
valeurVoteTotal = calculerMoyenneVotes(); |
VoteFleurPresenteur presenteurFleur = new VoteFleurPresenteur(new VoteFleurVue()); |
presenteurFleur.setNote(valeurVoteTotal); |
presenteurFleur.go(vue.getZoneFleur()); |
vue.rafraichir(valeurVoteTotal, image.getVotesProtocoles(protocole.getId()).size()); |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVoteVue.java |
---|
40,7 → 40,7 |
FocusPanel voter; |
@UiField |
Panel votePrisEnCompte; |
Panel votePrisEnCompte, zoneFleur; |
@UiField |
Label nbVotes; |
124,4 → 124,8 |
votePrisEnCompte.setStyleName("votePrisEnCompteOui"); |
animerVotePrisEnCompte.run(2000); |
} |
public HasWidgets getZoneFleur() { |
return zoneFleur; |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVoteVue.ui.xml |
---|
12,6 → 12,7 |
<g:Button ui:field="boutonVoter" text="" styleName="{style.validerVote} boutonOK"></g:Button> |
<g:HTMLPanel ui:field="votePrisEnCompte"><g:Label text="{constants.votePrisEnCompte}"></g:Label></g:HTMLPanel> |
<g:Button ui:field="boutonAnnuler" text=" " styleName="{style.annuler}"></g:Button> |
<g:HTMLPanel ui:field="zoneFleur"></g:HTMLPanel> |
</g:HorizontalPanel> |
</g:HTMLPanel> |
</ui:UiBinder> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImageVue.ui.xml |
---|
20,6 → 20,7 |
<g:HTML ui:field="nomEspece" styleName="{style.espece}"></g:HTML> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.zoneVoter} arrondi-faible" ui:field="zoneVoter"><g:HorizontalPanel ui:field="voter"/></g:HTMLPanel> |
</g:HTMLPanel> |
</ui:UiBinder> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImagePresenteur.java |
---|
10,6 → 10,8 |
import org.tela_botanica.del.client.composants.metadonnees.MetadonneesPresenteur; |
import org.tela_botanica.del.client.composants.metadonnees.MetadonneesVue; |
import org.tela_botanica.del.client.composants.presenteur.Presenteur; |
import org.tela_botanica.del.client.composants.votefleur.VoteFleurPresenteur; |
import org.tela_botanica.del.client.composants.votefleur.VoteFleurVue; |
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; |
28,8 → 30,10 |
import com.google.gwt.event.dom.client.ClickEvent; |
import com.google.gwt.event.dom.client.ClickHandler; |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
import com.google.gwt.user.client.ui.Widget; |
public class ImagePresenteur extends Presenteur { |
84,6 → 88,8 |
composite.add(vue.asWidget()); |
vue.loadImage(image); |
new MetadonneesPresenteur(new MetadonneesVue(), image.getObservation(), ModeRecherche.MODE_IMAGE, true).go(vue.getMetadonnees()); |
chargerDonneesValidation(); |
gererEvenements(); |
} |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImageVue.java |
---|
141,5 → 141,4 |
public HasWidgets getMetadonnees() { |
return metadonnees; |
} |
} |