/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImageVue.java |
---|
1,14 → 1,20 |
package org.tela_botanica.del.client.vues.rechercheimages.resultats.images; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.event.dom.client.ClickHandler; |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.event.shared.HandlerRegistration; |
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.HasWidgets; |
import com.google.gwt.user.client.ui.HorizontalPanel; |
import com.google.gwt.user.client.ui.Hyperlink; |
import com.google.gwt.user.client.ui.Image; |
import com.google.gwt.user.client.ui.IsWidget; |
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; |
28,13 → 34,13 |
protected HorizontalPanel voter; |
@UiField |
protected VerticalPanel zoneCache; |
protected Panel zoneCache; |
@UiField |
Image imagePrincipale; |
@UiField |
Label enSavoirPlus, ajoutValidation; |
Label enSavoirPlus, zoom; |
public ImageVue() { |
// sets listBox |
75,13 → 81,18 |
} |
@Override |
public IsWidget getImagePrincipaleWidget() { |
return imagePrincipale; |
} |
@Override |
public HasClickHandlers getEnSavoirPlus() { |
return enSavoirPlus; |
} |
@Override |
public HasClickHandlers getAjoutValidation() { |
return ajoutValidation; |
public HasClickHandlers getZoom() { |
return zoom; |
} |
@Override |
114,4 → 125,14 |
return imagePrincipale.getAltText(); |
} |
@Override |
public HasClickHandlers getNomAuteur() { |
return nomAuteur; |
} |
@Override |
public HasClickHandlers getNomEspece() { |
return nomEspece; |
} |
} |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/image.css |
---|
1,11 → 1,11 |
.observations {width:250px; height:250px; margin-bottom:50px;} |
.observations img {width:250px; padding:35px 0 0 0;} |
.zoneCache {position:absolute; padding:15px; border:solid 1px #CCC; background:#333; opacity:0.9; color:white; width:250px; z-index:1000; } |
.ajoutValidation {position:absolute; background:url(./img/ajouter.png) no-repeat; width:30px; height:30px; cursor:pointer; margin-top:-30px; margin-left:32px;} |
.zoneCache {position:absolute; padding:15px; border:solid 1px #CCC; background:#333; opacity:0.9; color:white; width:250px; z-index:1000; margin-top:67px } |
.enSavoirPlus {position:absolute; background:url(./img/ajouter.png) no-repeat; width:30px; height:30px; cursor:pointer; margin-top:35px; } |
.zoom {background:url(./img/loupe.png); width:30px; height:30px; cursor:pointer; margin-top:35px; position:absolute;margin-left:220px;} |
.espece {font-size:12px; font-weight:bold; color:white; width:240px; height:41px} |
.zoneDetail {position:absolute; } |
.boutonDetail {background:url(./img/loupe.png); width:30px; height:30px;} |
.zonePlus {position:absolute; background:#333; padding:5px; margin-top:-70px; opacity:0.9; color:white; } |
.zonePlus {position:absolute; background:#333; padding:5px; margin-top:-80px; opacity:0.9; color:white; text-align:left; cursor:pointer} |
.zoneImage {cursor:pointer;height:300px} |
.zoneVoter {background:#333; opacity:0.9; width:184px; position:absolute; margin-left:66px; height:27px; -moz-border-radius:3px; padding-top:5px } |
.zoneVoter {background:#333; opacity:0.9; width:250px; position:absolute; height:27px; -moz-border-radius:3px; padding-top:5px } |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImageVue.ui.xml |
---|
8,8 → 8,8 |
<g:HTMLPanel styleName="{style.observations}"> |
<g:HTMLPanel styleName="{style.zoneDetail}"> |
<g:HTMLPanel styleName="{style.zoneVoter}"><g:HorizontalPanel ui:field="voter"/></g:HTMLPanel> |
<g:Label ui:field="enSavoirPlus" text=" " styleName="{style.boutonDetail}"/> |
<g:Label ui:field="ajoutValidation" styleName="{style.ajoutValidation}"></g:Label> |
<g:Label ui:field="enSavoirPlus" text=" " styleName="{style.enSavoirPlus}"/> |
<g:Label ui:field="zoom" styleName="{style.zoom}"></g:Label> |
<g:VerticalPanel styleName="{style.zoneCache}" ui:field="zoneCache"> |
<g:VerticalPanel> |
37,10 → 37,10 |
</g:VerticalPanel> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.zoneImage}"><g:Image ui:field="imagePrincipale" resource='{res.logo}'/></g:HTMLPanel> |
<g:VerticalPanel styleName="{style.zonePlus}"> |
<g:Label ui:field="nomAuteur" styleName="petit">Auteur</g:Label> |
<g:Label ui:field="nomEspece" styleName="{style.espece}">Nom</g:Label> |
</g:VerticalPanel> |
<g:HTMLPanel styleName="{style.zonePlus}" ui:field="zonePlus"> |
<g:Label ui:field="nomAuteur" styleName="petit">Auteur</g:Label> |
<g:Label ui:field="nomEspece" styleName="{style.espece}">Nom</g:Label> |
</g:HTMLPanel> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/images/ImagePresenteur.java |
---|
32,7 → 32,9 |
public abstract void loadImage(Image image); |
public abstract HasClickHandlers getImagePrincipale(); |
public IsWidget getImagePrincipaleWidget(); |
public void setUrlImagePrincipale(String url); |
public void setTitreImagePrincipale(String titre); |
47,7 → 49,7 |
public abstract HasClickHandlers getEnSavoirPlus(); |
public abstract HasClickHandlers getAjoutValidation(); |
public abstract HasClickHandlers getZoom(); |
public abstract void cacherZoneCache(); |
55,6 → 57,8 |
public abstract HasWidgets getZoneVoter(); |
public HasClickHandlers getNomAuteur(); |
public HasClickHandlers getNomEspece(); |
} |
private Vue vue; |
84,16 → 88,32 |
new MoyenneVotePresenteur(observationValidationDatas).go(vue.getZoneVoter()); |
} |
private void lancerEvenementValidation() { |
CacheClient.getInstance().setImageCourante(image); |
Observation obs = image.getObservation(); |
BusEvenementiel.getInstance().fireEvent(new EvenementValidation(obs)); |
} |
protected void gererEvenements() { |
vue.getImagePrincipale().addClickHandler(new ClickHandler() { |
public void onClick(ClickEvent event) { |
lancerEvenementValidation(); |
} |
}); |
@Override |
vue.getNomAuteur().addClickHandler(new ClickHandler() { |
public void onClick(ClickEvent event) { |
IsWidget photo = (IsWidget) event.getSource(); |
ouvrirFenetreModale(new DetailImagePresenteur(photo, new DetailImageVue())); |
lancerEvenementValidation(); |
} |
}); |
vue.getNomEspece().addClickHandler(new ClickHandler() { |
public void onClick(ClickEvent event) { |
lancerEvenementValidation(); |
} |
}); |
vue.getEnSavoirPlus().addClickHandler(new ClickHandler() { |
@Override |
102,13 → 122,12 |
} |
}); |
vue.getAjoutValidation().addClickHandler(new ClickHandler() { |
vue.getZoom().addClickHandler(new ClickHandler() { |
@Override |
public void onClick(ClickEvent event) { |
CacheClient.getInstance().setImageCourante(image); |
Observation obs = image.getObservation(); |
BusEvenementiel.getInstance().fireEvent(new EvenementValidation(obs)); |
IsWidget photo = vue.getImagePrincipaleWidget(); |
ouvrirFenetreModale(new DetailImagePresenteur(photo, new DetailImageVue())); |
} |
}); |