Subversion Repositories eFlore/Applications.cel

Rev

Rev 2 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line 30... Line 30...
30
import com.google.gwt.user.client.ui.PasswordTextBox;
30
import com.google.gwt.user.client.ui.PasswordTextBox;
31
import com.google.gwt.user.client.ui.TextBox;
31
import com.google.gwt.user.client.ui.TextBox;
32
import com.google.gwt.user.client.ui.VerticalPanel;
32
import com.google.gwt.user.client.ui.VerticalPanel;
33
import com.google.gwt.user.client.ui.Widget;
33
import com.google.gwt.user.client.ui.Widget;
Line 34... Line 34...
34
 
34
 
Line -... Line 35...
-
 
35
public class FormulaireDeConnexionVue extends DialogBox {
-
 
36
 
-
 
37
	private ObservationMediateur observationMediateur = null;
-
 
38
	private TextBox login = new TextBox();
Line 35... Line -...
35
public class FormulaireDeConnexionVue extends DialogBox  {
-
 
36
 
-
 
37
 
-
 
38
  private ObservationMediateur observationMediateur=null;
39
	private PasswordTextBox password = new PasswordTextBox();
39
  private TextBox login = new TextBox();
-
 
40
  private PasswordTextBox  password = new PasswordTextBox();
40
	private Grid inner = new Grid(4, 2);
41
  private Grid inner = new Grid(4,2);
-
 
42
	
-
 
Line 43... Line 41...
43
  public FormulaireDeConnexionVue(final ObservationMediateur carnetEnLigneMediateur) {
41
 
Line 44... Line 42...
44
	  
42
	public FormulaireDeConnexionVue(
Line -... Line 43...
-
 
43
			final ObservationMediateur carnetEnLigneMediateur) {
-
 
44
 
45
    setText("Connexion");
45
		setText("Connexion");
46
 
-
 
47
    this.observationMediateur=carnetEnLigneMediateur;
46
 
48
 
-
 
49
    VerticalPanel outer = new VerticalPanel();
47
		this.observationMediateur = carnetEnLigneMediateur;
50
 
48
 
51
/*
49
		VerticalPanel outer = new VerticalPanel();
-
 
50
 
-
 
51
		/*
-
 
52
		 * E-Mail : Zone_saisie_email Mot-de-passe : Zone_saisie_mot_de_passe
-
 
53
		 * Message d'information Bouton_Ok Bouton_Annuler
-
 
54
		 */
-
 
55
 
-
 
56
		// Validation bouton
-
 
57
		HTML okButton = new HTML("Ok");
52
 *  E-Mail : Zone_saisie_email 
58
		okButton.setStyleName("html_button");
53
 *  Mot-de-passe : Zone_saisie_mot_de_passe
59
		okButton.addClickListener(new ClickListener() {
54
 *  Message d'information
60
			public void onClick(Widget sender) {
55
 *  Bouton_Ok   Bouton_Annuler
61
				connecteUtilisateur();
56
 */ 
62
			}
57
    
63
		});
58
    
64
 
-
 
65
		// Annulation
-
 
66
 
-
 
67
		HTML cancelButton = new HTML("Annuler");
-
 
68
		cancelButton.setStyleName("html_button");
-
 
69
		cancelButton.addClickListener(new ClickListener() {
-
 
70
			public void onClick(Widget sender) {
-
 
71
				hide();
-
 
72
			}
-
 
73
		});
-
 
74
 
-
 
75
		// Validation utilisateur sans utilisation des boutons :
-
 
76
 
-
 
77
		login.addKeyboardListener(new KeyboardListener() {
-
 
78
 
59
// Validation bouton
79
			public void onKeyDown(Widget arg0, char arg1, int arg2) {
-
 
80
				if (arg1 == KEY_ENTER) {
-
 
81
					connecteUtilisateur();
-
 
82
				}
-
 
83
			}
-
 
84
 
-
 
85
			public void onKeyUp(Widget arg0, char arg1, int arg2) {
-
 
86
			}
-
 
87
 
-
 
88
			public void onKeyPress(Widget arg0, char arg1, int arg2) {
-
 
89
			}
-
 
90
 
-
 
91
		});
-
 
92
 
-
 
93
		// Validation utilisateur sans utilisation des boutons :
60
    
94
 
61
	HTML okButton=new HTML("Ok");
95
		password.addKeyboardListener(new KeyboardListener() {
62
	okButton.setStyleName("html_button");
-
 
63
	okButton.addClickListener(
-
 
64
	    	new ClickListener() {
-
 
65
	    		public void onClick(Widget sender) {
-
 
66
					connecteUtilisateur();
-
 
67
	    		}
-
 
68
	     	}
-
 
69
	);		
-
 
70
 
-
 
71
	
-
 
72
// Annulation
-
 
73
	
-
 
74
	HTML cancelButton=new HTML("Annuler");
96
 
75
	cancelButton.setStyleName("html_button");
-
 
76
	cancelButton.addClickListener(
-
 
77
	    	new ClickListener() {
-
 
78
	    		public void onClick(Widget sender) {
-
 
79
					        hide();
-
 
80
	    		}
-
 
81
	     	}
-
 
82
	);		
97
			public void onKeyDown(Widget arg0, char arg1, int arg2) {
83
 
98
 
84
//Validation utilisateur sans utilisation des boutons : 
-
 
85
 
-
 
86
	
-
 
87
  login.addKeyboardListener( new KeyboardListener() {
-
 
88
 
99
				if (arg1 == KEY_ENTER) {
89
		  public void onKeyDown(Widget arg0, char arg1, int arg2) {
100
					connecteUtilisateur();
90
			  if(arg1 == KEY_ENTER)
-
 
91
			    {
101
				}
92
				  connecteUtilisateur();
-
 
93
			    }
102
			}
94
		  }
-
 
95
		  
-
 
96
		  public void onKeyUp(Widget arg0, char arg1, int arg2) { }
103
 
97
		  public void onKeyPress(Widget arg0, char arg1, int arg2) { }
-
 
98
		  
104
			public void onKeyUp(Widget arg0, char arg1, int arg2) {
99
		  }
-
 
100
  );
105
			}
101
	
106
 
102
 
-
 
103
// Validation utilisateur sans utilisation des boutons : 
107
			public void onKeyPress(Widget arg0, char arg1, int arg2) {
104
  
108
			}
105
  password.addKeyboardListener( new KeyboardListener() {
109
 
106
 
110
		});
107
		  public void onKeyDown(Widget arg0, char arg1, int arg2) {
111
 
108
			  
-
 
109
			  if(arg1 == KEY_ENTER)
-
 
110
			    {
-
 
111
				  connecteUtilisateur();
-
 
112
			    }
-
 
113
		  }
-
 
114
		  
-
 
115
		  public void onKeyUp(Widget arg0, char arg1, int arg2) { }
-
 
116
		  public void onKeyPress(Widget arg0, char arg1, int arg2) { }
-
 
117
		  
-
 
118
		  }
112
		inner.setHTML(0, 0, "E-mail:");
119
  );
113
		inner.setWidget(0, 1, login);
120
 
114
		inner
121
	  
115
				.setHTML(
122
     inner.setHTML(0,0,"E-mail:");
116
						1,
123
	 inner.setWidget(0,1,login);
117
						0,
124
	 inner.setHTML(1,0,"Mot de passe:           ");
118
						"Mot de passe:           ");
125
	 inner.setWidget(1,1,password);
119
		inner.setWidget(1, 1, password);
126
	 inner.setWidget(3,0,okButton);
120
		inner.setWidget(3, 0, okButton);
127
	 inner.setWidget(3,1,cancelButton);
121
		inner.setWidget(3, 1, cancelButton);
128
	 
-
 
129
	 inner.setCellPadding(10);
-
 
130
     outer.add(inner);
122
 
131
	 setWidget(outer);
123
		inner.setCellPadding(10);
132
	    
124
		outer.add(inner);
-
 
125
		setWidget(outer);
133
  }
126
 
-
 
127
	}
134
  
128
 
-
 
129
	/**
135
  
130
	 * Appel du service d'identification et positionnement de l'etat de
136
 
131
	 * connection en fonction du resultat.
137
  /**
132
	 * 
138
   * Appel du service d'identification et positionnement de l'etat de connection en fonction du resultat.
133
	 * @param login :
139
   * 
134
	 *            identifiant saisi
140
   * @param login : identifiant saisi
-
 
141
   * @param password : mot de passe saisi
-
 
142
   * 
-
 
Line 143... Line 135...
143
   */
135
	 * @param password :
144
  
-
 
-
 
136
	 *            mot de passe saisi
Line -... Line 137...
-
 
137
	 * 
-
 
138
	 */
-
 
139
 
-
 
140
	private void connecteUtilisateur() {
-
 
141
 
-
 
142
		final String login = this.login.getText();
-
 
143
		String password = this.password.getText();
-
 
144
 
-
 
145
		observationMediateur.connecterUtilisateur(login, password);
-
 
146
 
-
 
147
	}
-
 
148
 
-
 
149
	public boolean onKeyDownPreview(char key, int modifiers) {
-
 
150
		// Use the popup's key preview hooks to close the dialog when either
-
 
151
		// escape is pressed.
-
 
152
		switch (key) {
-
 
153
		case KeyboardListener.KEY_ESCAPE:
-
 
154
			hide();
145
	private void connecteUtilisateur() {
155
			break;
146
		
-
 
147
		final String login=this.login.getText();
-
 
148
		String password=this.password.getText();
-
 
149
 
-
 
150
		observationMediateur.connecterUtilisateur(login,password);
-
 
151
		
-
 
152
 
-
 
153
	}
-
 
154
  
-
 
155
  
-
 
156
	  
-
 
157
	
-
 
158
	
-
 
159
  
-
 
160
public boolean onKeyDownPreview(char key, int modifiers) {
-
 
161
	    // Use the popup's key preview hooks to close the dialog when either
-
 
162
	    //  escape is pressed.
-
 
163
	    switch (key) {
-
 
164
	      case KeyboardListener.KEY_ESCAPE:
-
 
165
	        hide();
-
 
166
	        break;
-
 
167
	    }
-
 
Line 168... Line 156...
168
 
156
		}
Line -... Line 157...
-
 
157
 
-
 
158
		return true;
169
	    return true;
159
	}
170
  }
160
 
171
 
161
	public void afficherMessageAlerte() {
172
  public void afficherMessageAlerte() {
162
		inner.setHTML(2, 0, "Identification incorrecte !");
-
 
163
	}
173
		inner.setHTML(2,0,"Identification incorrecte !");
164
 
174
  }
165
}
175
  
-
 
176
 
166
 
177
}
167
/*
178
 
-
 
179
/* +--Fin du code ---------------------------------------------------------------------------------------+
168
 * +--Fin du code
180
* $Log: not supported by cvs2svn $
169
 * ---------------------------------------------------------------------------------------+
-
 
170
 * $Log: not supported by cvs2svn $ Revision 1.1 2008-09-19 10:27:18
181
* Revision 1.1  2008-06-09 14:19:37  ddelon
171
 * aperonnet Carnet en ligne, utilisant gwt 1.5 et la nouvelle version de
182
* Initialisation observation
172
 * gwt-ext (plus de bugs au demarrage dans firefox, plus rapide et annotations
183
*
173
 * java)
184
* Revision 1.10  2007-09-17 19:25:34  ddelon
-
 
185
* Documentation
174
 * 
186
*
175
 * Revision 1.1 2008-06-09 14:19:37 ddelon Initialisation observation
187
* Revision 1.9  2007-05-21 21:03:44  ddelon
-
 
188
* nettoyage de code
176
 * 
189
*
177
 * Revision 1.10 2007-09-17 19:25:34 ddelon Documentation
190
* Revision 1.8  2007-05-21 18:14:06  ddelon
-
 
191
* Gestion importation releve locaux
178
 * 
192
*
179
 * Revision 1.9 2007-05-21 21:03:44 ddelon nettoyage de code
193
* Revision 1.7  2007-05-21 11:47:30  ddelon
-
 
194
* meta cvs
180
 * 
195
*
181
 * Revision 1.8 2007-05-21 18:14:06 ddelon Gestion importation releve locaux
196
* Revision 1.6  2007-05-21 11:39:48  ddelon
-
 
197
* meta cvs
182
 * 
198
*
183
 * Revision 1.7 2007-05-21 11:47:30 ddelon meta cvs