Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1036 Rev 1086
Line 214... Line 214...
214
		
214
		
215
		// Création des champs
215
		// Création des champs
216
		FormLayout formLayout = new FormLayout();
216
		FormLayout formLayout = new FormLayout();
Line -... Line 217...
-
 
217
		formLayout.setLabelAlign(LabelAlign.LEFT);
-
 
218
		
217
		formLayout.setLabelAlign(LabelAlign.LEFT);
219
		//+------------------------------------------------------------------------------------------------------------+
218
		
220
		// Fieldset PROJET
219
		FieldSet fsProjet = new FieldSet();
221
		FieldSet fsProjet = new FieldSet();
Line 220... Line 222...
220
		fsProjet.setHeading(i18nC.menuProjet());
222
		fsProjet.setHeading(i18nC.menuProjet());
Line 230... Line 232...
230
		cbProjets.setTriggerAction(TriggerAction.ALL);
232
		cbProjets.setTriggerAction(TriggerAction.ALL);
231
		cbProjets.setStore(storeProjets);
233
		cbProjets.setStore(storeProjets);
232
		cbProjets.setAllowBlank(false);
234
		cbProjets.setAllowBlank(false);
233
		cbProjets.addStyleName(ComposantClass.OBLIGATOIRE);
235
		cbProjets.addStyleName(ComposantClass.OBLIGATOIRE);
234
		cbProjets.addListener(Events.Valid, creerEcouteurChampObligatoire());
236
		cbProjets.addListener(Events.Valid, creerEcouteurChampObligatoire());
235
		fsProjet.add(cbProjets);
237
		fsProjet.add(cbProjets, new FormData(450, 0));
Line 236... Line 238...
236
		
238
		
Line 237... Line 239...
237
		hmIdentite.put("cbProjets", cbProjets);
239
		hmIdentite.put("cbProjets", cbProjets);
Line 238... Line 240...
238
		
240
		
239
		mediateur.selectionnerProjet(this, null);
241
		mediateur.selectionnerProjet(this, null);
-
 
242
				
-
 
243
		left.add(fsProjet);
240
				
244
			
241
		left.add(fsProjet);
245
		//+------------------------------------------------------------------------------------------------------------+
242
					
246
		// Fieldset NOM
Line 243... Line 247...
243
		FieldSet fsNoms = new FieldSet();
247
		FieldSet fsNoms = new FieldSet();
Line 268... Line 272...
268
		//Prénom
272
		//Prénom
269
		TextField<String> tfPrenom = new TextField<String>();
273
		TextField<String> tfPrenom = new TextField<String>();
270
		tfPrenom.setFieldLabel("Prénom");
274
		tfPrenom.setFieldLabel("Prénom");
271
		tfPrenom.setName("prenom");
275
		tfPrenom.setName("prenom");
Line 272... Line 276...
272
 
276
 
273
		fsNoms.add(tfPrenom);
277
		fsNoms.add(tfPrenom, new FormData(300, 0));
Line 274... Line 278...
274
		hmIdentite.put("tfPrenom", tfPrenom);
278
		hmIdentite.put("tfPrenom", tfPrenom);
275
 
279
 
276
		//Nom
280
		//Nom
277
		TextField<String> tfNom = new TextField<String>();
281
		TextField<String> tfNom = new TextField<String>();
278
		tfNom.setFieldLabel("Nom");
282
		tfNom.setFieldLabel("Nom");
279
		tfNom.setAllowBlank(false);
283
		tfNom.setAllowBlank(false);
280
		tfNom.setName("nom");
284
		tfNom.setName("nom");
Line 281... Line 285...
281
		tfNom.addStyleName(ComposantClass.OBLIGATOIRE);
285
		tfNom.addStyleName(ComposantClass.OBLIGATOIRE);
282
		tfNom.addListener(Events.Valid, creerEcouteurChampObligatoire());
286
		tfNom.addListener(Events.Valid, creerEcouteurChampObligatoire());
Line 283... Line 287...
283
		
287
		
284
		fsNoms.add(tfNom);
288
		fsNoms.add(tfNom, new FormData(300, 0));
285
		hmIdentite.put("tfNom", tfNom);
289
		hmIdentite.put("tfNom", tfNom);
Line 316... Line 320...
316
		autresNoms.add(abreviationAutre, new TableData("200px", "15px"));
320
		autresNoms.add(abreviationAutre, new TableData("200px", "15px"));
317
		fsNoms.add(autresNoms);
321
		fsNoms.add(autresNoms);
Line 318... Line 322...
318
										
322
										
Line -... Line 323...
-
 
323
		left.add(fsNoms);
-
 
324
		
319
		left.add(fsNoms);
325
		//+------------------------------------------------------------------------------------------------------------+
320
		
326
		// Fieldset NAISSANCE ET DÉCÈS
321
		FieldSet fsNaissanceEtDeces = new FieldSet();
327
		FieldSet fsNaissanceEtDeces = new FieldSet();
Line 322... Line 328...
322
		fsNaissanceEtDeces.setHeading("Naissance et Décès");
328
		fsNaissanceEtDeces.setHeading("Naissance et Décès");
Line 405... Line 411...
405
		
411
		
Line 406... Line 412...
406
		containerDeces.add(rbgDeces);
412
		containerDeces.add(rbgDeces);
407
		
413
		
408
		fsNaissanceEtDeces.add(containerDeces, new ColumnData(.5));
414
		fsNaissanceEtDeces.add(containerDeces, new ColumnData(.5));
-
 
415
		tiIdentite.add(main);
-
 
416
		
409
		tiIdentite.add(main);
417
		//+------------------------------------------------------------------------------------------------------------+
410
			
418
		// Fieldset CONTACT
411
		FieldSet fsContact = new FieldSet();
419
		FieldSet fsContact = new FieldSet();
Line 412... Line -...
412
		fsContact.setHeading("Contact");
-
 
413
		fsContact.setLayout(new RowLayout());
-
 
414
		
420
		fsContact.setHeading("Contact");
415
		LayoutContainer containerTelEtEmail = new LayoutContainer(new ColumnLayout());
-
 
416
		
421
		fsContact.setLayout(new RowLayout());
417
		ChampMultiValeursMultiTypes telephones = new ChampMultiValeursMultiTypes("Téléphones", 180, 100);
422
		
-
 
423
		ChampMultiValeursMultiTypes telephones = new ChampMultiValeursMultiTypes("Téléphones", 180, 100);
Line 418... Line 424...
418
		hmIdentite.put("telephones", telephones);
424
		telephones.initialiserType("tel");
419
		telephones.initialiserType("tel");
425
		fsContact.add(telephones, new FormData(450, 0));
420
		containerTelEtEmail.add(telephones, new ColumnData(.5));
426
		hmIdentite.put("telephones", telephones);
421
		
-
 
422
		ChampMultiValeurs courriels = new ChampMultiValeurs("Courriels", 280);
-
 
423
		courriels.setValidation(Pattern.email, "moi@domaine.fr");
427
		
Line 424... Line 428...
424
		containerTelEtEmail.add(courriels, new ColumnData(.5));
428
		ChampMultiValeurs courriels = new ChampMultiValeurs("Courriels", 280);
425
		fsContact.add(containerTelEtEmail);
429
		courriels.setValidation(Pattern.email, "moi@domaine.fr");
426
		right.add(fsContact);
430
		fsContact.add(courriels, new FormData(450, 0));
Line 435... Line 439...
435
		ChampMultiValeurs sites = new ChampMultiValeurs("Sites web");
439
		ChampMultiValeurs sites = new ChampMultiValeurs("Sites web");
436
		sites.setValeurParDefaut("http://");
440
		sites.setValeurParDefaut("http://");
437
		sites.setValidation(Pattern.url, "http://www.monsite.com");
441
		sites.setValidation(Pattern.url, "http://www.monsite.com");
438
		fsContact.add(sites);
442
		fsContact.add(sites);
439
		hmIdentite.put("sites", sites);
443
		hmIdentite.put("sites", sites);
440
			
444
		
-
 
445
		right.add(fsContact);
-
 
446
		
-
 
447
		//+------------------------------------------------------------------------------------------------------------+
-
 
448
		// Fieldset AUTRES INFOS
441
		FieldSet fsAutresInfos = new FieldSet();
449
		FieldSet fsAutresInfos = new FieldSet();
442
		fsAutresInfos.setHeading("Autres informations");
450
		fsAutresInfos.setHeading("Autres informations");
Line 443... Line 451...
443
	
451
	
444
		formLayout = new FormLayout();
452
		formLayout = new FormLayout();
Line 447... Line 455...
447
			
455
			
448
				
456
				
449
		formLayout = new FormLayout();
457
		formLayout = new FormLayout();
450
		formLayout.setLabelAlign(LabelAlign.TOP);
458
		formLayout.setLabelAlign(LabelAlign.TOP);
451
		LayoutContainer lcAutreInformations1 = new LayoutContainer(formLayout);
-
 
452
							
459
		LayoutContainer lcAutreInformations1 = new LayoutContainer(formLayout);
453
		//Civilité				
460
				
454
		ListStore<Valeur> storeSexe = new ListStore<Valeur>();
461
		ListStore<Valeur> storeSexe = new ListStore<Valeur>();
455
		ComboBox<Valeur> cbSexe = new ComboBox<Valeur>();
462
		ComboBox<Valeur> cbSexe = new ComboBox<Valeur>();
456
		cbSexe.setStore(storeSexe);
463
		cbSexe.setStore(storeSexe);
Line 470... Line 477...
470
		taDescription.setEmptyText("Saisissez une description");
477
		taDescription.setEmptyText("Saisissez une description");
471
		taDescription.setFieldLabel("Description");
478
		taDescription.setFieldLabel("Description");
472
		taDescription.setWidth("100%");
479
		taDescription.setWidth("100%");
473
		taDescription.setName("description");
480
		taDescription.setName("description");
Line 474... Line 481...
474
		
481
		
475
		lcAutreInformations1.add(taDescription, fd100);
482
		lcAutreInformations1.add(taDescription, new FormData(500, 200));
Line 476... Line 483...
476
		hmIdentite.put("taDescription", taDescription);
483
		hmIdentite.put("taDescription", taDescription);
Line 477... Line 484...
477
		
484
		
Line 495... Line 502...
495
		LayoutContainer lcAutreInformations2 = new LayoutContainer(new ColumnLayout());
502
		LayoutContainer lcAutreInformations2 = new LayoutContainer(new ColumnLayout());
496
		hmIdentite.put("lcAutreInformations2", lcAutreInformations2);
503
		hmIdentite.put("lcAutreInformations2", lcAutreInformations2);
497
		fsAutresInfos.add(lcAutreInformations2);
504
		fsAutresInfos.add(lcAutreInformations2);
Line 498... Line 505...
498
			
505
			
499
		right.add(fsAutresInfos);
506
		right.add(fsAutresInfos);
-
 
507
		
500
			
508
		//+------------------------------------------------------------------------------------------------------------+
501
		// Ajout des évènements saisi
509
		// Ajout des évènements saisi
502
		KeyListener klNoms = new KeyListener()	{
510
		KeyListener klNoms = new KeyListener()	{
503
			public void componentKeyUp(ComponentEvent ev)	{
511
			public void componentKeyUp(ComponentEvent ev)	{
504
				rafraichir(null);	
512
				rafraichir(null);	
Line 624... Line 632...
624
		
632
		
625
		TextArea taBiographie = new TextArea();
633
		TextArea taBiographie = new TextArea();
626
		taBiographie.setFieldLabel("Vie et renommée de l'auteur");
634
		taBiographie.setFieldLabel("Vie et renommée de l'auteur");
627
		taBiographie.setWidth("400");
635
		taBiographie.setWidth("400");
628
		taBiographie.setName("biographie");
636
		taBiographie.setName("biographie");
Line 629... Line 637...
629
		fsInfosNat.add(taBiographie);
637
		fsInfosNat.add(taBiographie, new FormData(800, 200));
630
		
638
		
631
		ChampMultiValeurs specialite = new ChampMultiValeurs(i18nC.personneSpecialite());
639
		ChampMultiValeurs specialite = new ChampMultiValeurs(i18nC.personneSpecialite());