Line 1... |
Line 1... |
1 |
package org.tela_botanica.del.client.composants.images;
|
1 |
package org.tela_botanica.del.client.composants.images;
|
Line 2... |
Line 2... |
2 |
|
2 |
|
- |
|
3 |
import org.tela_botanica.del.client.i18n.I18n;
|
3 |
import org.tela_botanica.del.client.i18n.I18n;
|
4 |
|
- |
|
5 |
import com.google.gwt.core.client.GWT;
|
- |
|
6 |
import com.google.gwt.dom.client.DivElement;
|
- |
|
7 |
import com.google.gwt.event.dom.client.ClickEvent;
|
4 |
import com.google.gwt.core.client.GWT;
|
8 |
import com.google.gwt.event.dom.client.ClickHandler;
|
5 |
import com.google.gwt.event.dom.client.LoadEvent;
|
9 |
import com.google.gwt.event.dom.client.LoadEvent;
|
- |
|
10 |
import com.google.gwt.event.dom.client.LoadHandler;
|
- |
|
11 |
import com.google.gwt.event.dom.client.MouseOutEvent;
|
- |
|
12 |
import com.google.gwt.event.dom.client.MouseOutHandler;
|
- |
|
13 |
import com.google.gwt.event.dom.client.MouseOverEvent;
|
6 |
import com.google.gwt.event.dom.client.LoadHandler;
|
14 |
import com.google.gwt.event.dom.client.MouseOverHandler;
|
7 |
import com.google.gwt.event.logical.shared.ResizeEvent;
|
15 |
import com.google.gwt.event.logical.shared.ResizeEvent;
|
8 |
import com.google.gwt.event.logical.shared.ResizeHandler;
|
16 |
import com.google.gwt.event.logical.shared.ResizeHandler;
|
9 |
import com.google.gwt.uibinder.client.UiBinder;
|
17 |
import com.google.gwt.uibinder.client.UiBinder;
|
10 |
import com.google.gwt.uibinder.client.UiField;
|
18 |
import com.google.gwt.uibinder.client.UiField;
|
Line 25... |
Line 33... |
25 |
|
33 |
|
26 |
@UiField
|
34 |
@UiField
|
Line 27... |
Line 35... |
27 |
protected Image photoPrincipale;
|
35 |
protected Image photoPrincipale;
|
- |
|
36 |
|
- |
|
37 |
@UiField
|
- |
|
38 |
protected HTML superpositionImage;
|
28 |
|
39 |
|
Line 29... |
Line 40... |
29 |
@UiField
|
40 |
@UiField
|
30 |
protected HTML texteAlternatif;
|
41 |
protected HTML texteAlternatif;
|
31 |
|
42 |
|
32 |
public DetailImageVue() {
|
43 |
public DetailImageVue() {
|
33 |
initWidget(binder.createAndBindUi(this));
|
44 |
initWidget(binder.createAndBindUi(this));
|
34 |
photoPrincipale.addLoadHandler(new LoadHandler() {
|
45 |
photoPrincipale.addLoadHandler(new LoadHandler() {
|
35 |
@Override
|
46 |
@Override
|
36 |
public void onLoad(LoadEvent event) {
|
47 |
public void onLoad(LoadEvent event) {
|
37 |
setTailleOptimale();
|
- |
|
38 |
}
|
48 |
setTailleOptimale();
|
Line 39... |
Line 49... |
39 |
});
|
49 |
}
|
40 |
|
50 |
});
|
41 |
Window.addResizeHandler(new ResizeHandler() {
|
51 |
Window.addResizeHandler(new ResizeHandler() {
|
Line 55... |
Line 65... |
55 |
});
|
65 |
});
|
56 |
}
|
66 |
}
|
Line 57... |
Line 67... |
57 |
|
67 |
|
58 |
public void chargerImage(org.tela_botanica.del.client.modeles.Image imageCourante) {
|
68 |
public void chargerImage(org.tela_botanica.del.client.modeles.Image imageCourante) {
|
59 |
setUrlImage(imageCourante.getUrlFormat("L"));
|
69 |
setUrlImage(imageCourante.getUrlFormat("L"));
|
- |
|
70 |
//setTitle(imageCourante.getUrlFormat("L"));
|
60 |
setTitle(imageCourante.getUrlFormat("L"));
|
71 |
setTitle("Cliquer pour ouvrir l'image originale dans un nouvel onglet");
|
61 |
setTexteAlternatif("<strong> "+I18n.getVocabulary().imageNumero()+""+ imageCourante.getIdImage() +" - "+ imageCourante.getObservation().getNomRetenuFormateReferentiel() + " " + I18n.getVocabulary().par() + " " + imageCourante.getObservation().getAuteur() + "</strong><br />"
|
72 |
setTexteAlternatif("<strong> "+I18n.getVocabulary().imageNumero()+""+ imageCourante.getIdImage() +" - "+ imageCourante.getObservation().getNomRetenuFormateReferentiel() + " " + I18n.getVocabulary().par() + " " + imageCourante.getObservation().getAuteur() + "</strong><br />"
|
- |
|
73 |
+ I18n.getVocabulary().publiee() + " "+ imageCourante.getObservation().getDateReleve() + " - " + imageCourante.getObservation().getLocaliteAvecIdFormatee());
|
- |
|
74 |
final String urlImageOriginale = imageCourante.getUrlFormat("O");
|
- |
|
75 |
|
- |
|
76 |
// ouvre l'image originale dans un nouvel onglet, en attendant un futur outil de zoom
|
- |
|
77 |
superpositionImage.addClickHandler(new ClickHandler() {
|
- |
|
78 |
@Override
|
- |
|
79 |
public void onClick(ClickEvent event) {
|
- |
|
80 |
Window.open(urlImageOriginale, "_blank", "");
|
- |
|
81 |
}
|
62 |
+ I18n.getVocabulary().publiee() + " "+ imageCourante.getObservation().getDateReleve() + " - " + imageCourante.getObservation().getLocaliteAvecIdFormatee());
|
82 |
});
|
Line 63... |
Line 83... |
63 |
}
|
83 |
}
|
64 |
|
84 |
|
65 |
public void setUrlImage(String urlImage) {
|
85 |
public void setUrlImage(String urlImage) {
|