1175 |
aurelien |
1 |
package org.tela_botanica.del.client.composants.preferences;
|
|
|
2 |
|
|
|
3 |
import com.google.gwt.core.client.GWT;
|
|
|
4 |
import com.google.gwt.event.dom.client.HasClickHandlers;
|
|
|
5 |
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
6 |
import com.google.gwt.uibinder.client.UiField;
|
|
|
7 |
import com.google.gwt.user.client.ui.Button;
|
|
|
8 |
import com.google.gwt.user.client.ui.CheckBox;
|
|
|
9 |
import com.google.gwt.user.client.ui.Composite;
|
|
|
10 |
import com.google.gwt.user.client.ui.Panel;
|
|
|
11 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
12 |
|
|
|
13 |
public class PreferencesVue extends Composite implements PreferencesPresenteur.Vue {
|
|
|
14 |
|
|
|
15 |
@UiField
|
|
|
16 |
Panel panneauChargement, conteneurChamps;
|
|
|
17 |
|
|
|
18 |
@UiField
|
|
|
19 |
public CheckBox recevoirMailsMesObs;
|
|
|
20 |
|
|
|
21 |
@UiField
|
|
|
22 |
public CheckBox recevoirMailsToutesObs;
|
|
|
23 |
|
|
|
24 |
@UiField
|
|
|
25 |
public Button boutonSauvegarderPreferences;
|
|
|
26 |
|
|
|
27 |
interface PreferencesVueUIiBinder extends UiBinder<Widget, PreferencesVue> {
|
|
|
28 |
};
|
|
|
29 |
|
|
|
30 |
PreferencesVueUIiBinder uiBinder = GWT.create(PreferencesVueUIiBinder.class);
|
|
|
31 |
|
|
|
32 |
public PreferencesVue() {
|
|
|
33 |
initWidget(uiBinder.createAndBindUi(this));
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
@Override
|
|
|
37 |
public void afficherMessageChargement() {
|
|
|
38 |
panneauChargement.setHeight(this.getOffsetHeight()+"px");
|
|
|
39 |
panneauChargement.setVisible(true);
|
|
|
40 |
conteneurChamps.setVisible(false);
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
@Override
|
|
|
44 |
public void cacherMessageChargement() {
|
|
|
45 |
panneauChargement.setVisible(false);
|
|
|
46 |
conteneurChamps.setVisible(true);
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
@Override
|
|
|
50 |
public void setValeurRecevoirMailsMesObs(boolean valeur) {
|
|
|
51 |
recevoirMailsMesObs.setValue(valeur);
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
@Override
|
|
|
55 |
public void setValeurRecevoirMailsToutesObs(boolean valeur) {
|
|
|
56 |
recevoirMailsToutesObs.setValue(valeur);
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
@Override
|
|
|
60 |
public String getValeurRecevoirMailsMesObs() {
|
|
|
61 |
return (recevoirMailsMesObs.getValue()) ? "1" : "0";
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
@Override
|
|
|
65 |
public String getValeurRecevoirMailsToutesObs() {
|
|
|
66 |
return (recevoirMailsToutesObs.getValue()) ? "1" : "0";
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
@Override
|
|
|
70 |
public HasClickHandlers getBoutonSauvegarder() {
|
|
|
71 |
return boutonSauvegarderPreferences;
|
|
|
72 |
}
|
|
|
73 |
}
|