Subversion Repositories eFlore/Applications.cel

Rev

Rev 83 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12 david 1
package org.tela_botanica.client.vues;
2
 
3
 
4
 
13 david 5
import java.util.Iterator;
6
 
7
import org.tela_botanica.client.interfaces.Rafraichissable;
8
import org.tela_botanica.client.modeles.ListeReferentielCommune;
20 david 9
import org.tela_botanica.client.modeles.ListeReferentielNom;
39 david 10
import org.tela_botanica.client.modeles.Observation;
13 david 11
import org.tela_botanica.client.modeles.ReferentielCommune;
20 david 12
import org.tela_botanica.client.modeles.ReferentielNom;
12 david 13
import org.tela_botanica.client.observation.ObservationMediateur;
14
 
15
 
71 jpm 16
import com.google.gwt.user.client.Window;
13 david 17
import com.gwtext.client.core.EventCallback;
18
import com.gwtext.client.core.EventObject;
19
import com.gwtext.client.core.ListenerConfig;
12 david 20
import com.gwtext.client.core.Position;
71 jpm 21
import com.gwtext.client.core.Template;
13 david 22
import com.gwtext.client.data.ArrayReader;
23
import com.gwtext.client.data.FieldDef;
24
import com.gwtext.client.data.MemoryProxy;
25
import com.gwtext.client.data.RecordDef;
71 jpm 26
import com.gwtext.client.data.SimpleStore;
13 david 27
import com.gwtext.client.data.Store;
28
import com.gwtext.client.data.StringFieldDef;
12 david 29
import com.gwtext.client.widgets.Button;
30
import com.gwtext.client.widgets.Panel;
71 jpm 31
import com.gwtext.client.widgets.Toolbar;
20 david 32
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
13 david 33
import com.gwtext.client.widgets.form.ComboBox;
12 david 34
import com.gwtext.client.widgets.form.DateField;
35
import com.gwtext.client.widgets.form.FormPanel;
74 david 36
import com.gwtext.client.widgets.form.Hidden;
12 david 37
import com.gwtext.client.widgets.form.TextField;
13 david 38
import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
12 david 39
import com.gwtext.client.widgets.layout.ColumnLayout;
40
import com.gwtext.client.widgets.layout.ColumnLayoutData;
41
import com.gwtext.client.widgets.layout.FormLayout;
13 david 42
import com.gwtext.client.data.Record;
12 david 43
 
44
/**
45
 * Panneau contenant les infos, les métadonnées et l'arbre des mots clés, il implémente l'interface rafraichissable
46
 * @author aurelien
47
 *
48
 */
13 david 49
public class FormulaireSaisieObservationVue extends Panel implements Rafraichissable  {
12 david 50
 
51
 
52
	/**
53
	 * Le médiateur associé à la vue
54
	 */
55
	private ObservationMediateur	observationMediateur		= null;
56
 
57
 
20 david 58
 
13 david 59
	private DateField date = null;
12 david 60
	private TextField lieudit = null;
61
	private TextField station = null;
62
	private TextField milieu = null;
63
	private TextField comment = null;
13 david 64
	private ComboBox  commune = null;
39 david 65
	private String departement = null;
20 david 66
	private ComboBox  espece = null;
39 david 67
	private String numeroNom = null;
74 david 68
	private String numeroOrdre = null;
20 david 69
 
74 david 70
 
71 jpm 71
	private Button boutonOK = new Button("Créer");
77 jpm 72
	private Button boutonAnnuler = new Button("Réinitialiser");
20 david 73
 
13 david 74
	private boolean selectionCommune=false;
20 david 75
	private boolean selectionEspece=false;
12 david 76
 
71 jpm 77
	private boolean modification = false ;
78
	private Toolbar bt = null ;
13 david 79
 
20 david 80
	private final int KEY_ALT = 18;
81
	private final int KEY_BACKSPACE = 8;
82
	private final int KEY_CTRL = 17;
83
	private final int KEY_DELETE = 46;
84
	private final int KEY_DOWN = 40;
85
	private final int KEY_END = 35;
86
	private final int KEY_ENTER = 13;
87
	private final int KEY_ESCAPE = 27;
88
	private final int KEY_HOME = 36;
89
	private final int KEY_LEFT = 37;
90
	private final int KEY_PAGEDOWN = 34;
91
	private final int KEY_PAGEUP = 33;
92
	private final int KEY_RIGHT = 39;
93
	private final int KEY_SHIFT = 16;
94
	private final int KEY_TAB = 9;
95
	private final int KEY_UP = 38;
13 david 96
 
71 jpm 97
	/**
98
	 * Combobox permettant de selectionner le mode
99
	 * modification ou bien création
100
	 */
101
	private ComboBox selecteurMode = new ComboBox();
13 david 102
 
71 jpm 103
	Store storeMode = null ;
13 david 104
 
12 david 105
	/**
106
	 * Booleen d'instanciation
107
	 */
108
	boolean estInstancie = false ;
109
 
110
	/**
111
	 * Constructeur sans argument (privé car ne doit pas être utilisé)
112
	 */
71 jpm 113
	@SuppressWarnings("unused")
12 david 114
	private FormulaireSaisieObservationVue()
115
	{
116
		super() ;
117
	}
118
 
119
	/**
120
	 * Constructeur avec argument
121
	 * @param im
122
	 */
123
	public FormulaireSaisieObservationVue(ObservationMediateur obs)
124
	{
125
 
126
 
127
		// on associe le médiateur
128
		observationMediateur = obs ;
129
 
130
 
53 david 131
		setHeader(true);
12 david 132
 
133
		FormPanel panneauFormulaire = new FormPanel(Position.RIGHT);
134
		panneauFormulaire.setBorder(false);
135
 
136
		// Panneau intermediaire qui contient deux colonnes de formulaire
137
 
138
		Panel panneauIntermediaire = new Panel();
139
		panneauIntermediaire.setLayout(new ColumnLayout());
140
		panneauIntermediaire.setBorder(false);
141
 
142
		//create first panel and add fields to it
143
		Panel panneauPremierColonne = new Panel();
144
		panneauPremierColonne.setLayout(new FormLayout());
145
		panneauPremierColonne.setBorder(false);
146
 
147
		//create second panel and add fields to it
148
	    Panel panneauSecondeColonne = new Panel();
149
		panneauSecondeColonne.setLayout(new FormLayout());
150
		panneauSecondeColonne.setBorder(false);
42 jpm 151
 
152
		this.setPaddings(5) ;
12 david 153
 
20 david 154
 
49 david 155
 
13 david 156
		commune=new ComboBox("Commune","commune",275 );
157
 
158
 
20 david 159
		final String resultTplCommune = "<div class=\"search-item-commune\">{commune}</div>";
13 david 160
 
161
 
20 david 162
		commune.setTpl(resultTplCommune);
13 david 163
		commune.setMode(ComboBox.REMOTE);
164
		// commune.setPageSize(10); // Ne fonctionne pas
20 david 165
		commune.setItemSelector("div.search-item-commune");
13 david 166
		commune.setTypeAhead(true);
167
		commune.setLoadingText("Recherche...");
168
 
169
		commune.setHideTrigger(true);
170
 
171
 
20 david 172
 
13 david 173
 
174
 
175
	    panneauPremierColonne.add(commune);
176
 
177
 
178
 
12 david 179
	    station = new TextField("Station", "station", 275);
180
	    station.setAllowBlank(true);
181
	    panneauPremierColonne.add(station);
182
 
183
	    date = new DateField("Date", "date", 100);
184
	    date.setAllowBlank(true);
20 david 185
	    date.setFormat("d/m/Y") ;
12 david 186
	    panneauPremierColonne.add(date);
20 david 187
 
188
 
189
		espece=new ComboBox("Espèce","nom",275 );
12 david 190
 
20 david 191
 
192
		final String resultTplEspece = "<div class=\"search-item-espece\">{nom}</div>";
193
 
194
 
195
		espece.setTpl(resultTplEspece);
196
		espece.setMode(ComboBox.REMOTE);
197
		// commune.setPageSize(10); // Ne fonctionne pas
198
		espece.setItemSelector("div.search-item-espece");
199
		espece.setTypeAhead(true);
200
		espece.setLoadingText("Recherche...");
201
 
202
		espece.setHideTrigger(true);
203
 
204
 
205
 
206
	    panneauPremierColonne.add(espece);
207
 
12 david 208
	    comment = new TextField("Notes", "comment", 275);
209
	    comment.setAllowBlank(true);
210
	    panneauPremierColonne.add(comment);
211
 
212
 
213
	    lieudit = new TextField("Lieu-dit", "lieudit", 275);
214
	    lieudit.setAllowBlank(true);
215
	    panneauSecondeColonne.add(lieudit);
216
 
217
 
218
	    milieu = new TextField("Milieu", "milieu", 275);
219
	    milieu.setAllowBlank(true);
220
	    panneauSecondeColonne.add(milieu);
221
 
13 david 222
 
12 david 223
 
224
		panneauIntermediaire.add(panneauPremierColonne, new ColumnLayoutData(.5));
225
		panneauIntermediaire.add(panneauSecondeColonne, new ColumnLayoutData(.5));
226
 
227
		panneauFormulaire.add(panneauIntermediaire);
228
 
71 jpm 229
		Object[][] mode = {{"création",false} , {"modification", true} };
230
		storeMode = new SimpleStore(new String[] { "nom_mode", "mode" },
231
				mode);
232
		storeMode.load();
233
		selecteurMode.setStore(storeMode);
234
		selecteurMode.setDisplayField("nom_mode") ;
235
		selecteurMode.setLabel("mode ") ;
236
		selecteurMode.setForceSelection(true) ;
237
		selecteurMode.setValue("création") ;
238
		selecteurMode.setEditable(false) ;
239
 
240
		bt = new Toolbar() ;
241
		bt.addSpacer() ;
242
		bt.addText("Mode de saisie ") ;
243
		bt.addField(selecteurMode) ;
244
 
74 david 245
 
246
 
247
 
12 david 248
		panneauFormulaire.addButton(boutonOK);
249
 
250
		panneauFormulaire.addButton(boutonAnnuler);
71 jpm 251
 
252
		selecteurMode.addListener(new ComboBoxListenerAdapter() {
253
 
254
			public void onSelect(ComboBox comboBox, Record record, int index) {
255
 
256
				// et on met la valeur à jour dans la combobox
257
				comboBox.setValue(record.getAsString("nom_mode"));
258
				setModification(record.getAsString("mode")) ;
259
			}
260
 
261
		});
12 david 262
 
263
		this.add(panneauFormulaire) ;
80 jpm 264
		this.setTopToolbar(bt) ;
12 david 265
 
266
 
267
		this.setAutoHeight(true);
268
 
269
 
270
		// on ajoute les listeners
271
		ajouterListeners() ;
272
 
273
 
274
 
275
	}
276
 
277
	private void ajouterListeners()
94 jpm 278
	{
20 david 279
		// Listener completion communne
280
 
281
		   commune.addListener(new ComboBoxListenerAdapter() {
282
	             public void onSelect(ComboBox comboBox, Record record, int index) {
283
	                 commune.setValue(record.getAsString("commune"));
39 david 284
	                 departement=record.getAsString("departement");
20 david 285
	                 selectionCommune=true;
286
	             }
287
	         });
288
 
289
 
290
			ListenerConfig listenerConfigCommune=new ListenerConfig();
291
			listenerConfigCommune.setDelay(10);
292
			listenerConfigCommune.setStopPropagation(false);
293
			listenerConfigCommune.setStopEvent(false);
294
 
295
 
296
 
297
		    commune.addKeyPressListener(new EventCallback()	{
298
 
299
		    	    public void execute(EventObject e) {
300
 
301
 
302
		    	    		  switch(e.getKey()) {
303
 
304
 
305
		    	    		  case KEY_ALT:
306
		    	    	      case KEY_CTRL:
307
		    	    	      case KEY_DOWN:
308
		    	    	      case KEY_END:
309
		    	    	      case KEY_ESCAPE:
310
		    	    	      case KEY_HOME:
311
		    	    	      case KEY_LEFT:
312
		    	    	      case KEY_PAGEDOWN:
313
		    	    	      case KEY_PAGEUP:
314
		    	    	      case KEY_RIGHT:
315
		    	    	      case KEY_SHIFT:
316
		    	    	      case KEY_TAB:
317
		    	    	      case KEY_UP:
318
 
319
		    	    	        break;
320
 
321
		    	    	      case KEY_ENTER:
322
 
323
		    	    	    	 if (selectionCommune) {
324
		    	    	    		 selectionCommune=false;
325
		    	    	    	 }
326
		    	    	    	 else {
327
		    	    	    		// lancer mise a jour
328
		    	    	    	 }
329
 
330
 
331
		    	    	    	  break;
332
 
333
		    	    	      default:
334
 
83 david 335
		    	    	    	  departement="";
20 david 336
		    	    	    	  obtenirListeReferentielCommune();
337
 
338
		    	    	        break;
339
		    	    	    }
340
 
341
 
342
 
343
		     		}
344
 
345
		    		},    listenerConfigCommune
346
 
347
			);
348
 
349
			// Listener completion espece
350
 
351
 
352
			espece.addListener(new ComboBoxListenerAdapter() {
353
	             public void onSelect(ComboBox comboBox, Record record, int index) {
354
	            	 espece.setValue(record.getAsString("nom"));
39 david 355
	            	 numeroNom=record.getAsString("numeroNom");
20 david 356
	                 selectionEspece=true;
357
	             }
358
	         });
359
 
360
 
361
			ListenerConfig listenerConfigEspece=new ListenerConfig();
362
			listenerConfigEspece.setDelay(10);
363
			listenerConfigEspece.setStopPropagation(false);
364
			listenerConfigEspece.setStopEvent(false);
365
 
366
 
367
			espece.addKeyPressListener(new EventCallback()	{
368
 
369
		    	    public void execute(EventObject e) {
370
 
371
 
372
		    	    		  switch(e.getKey()) {
373
 
374
 
375
		    	    		  case KEY_ALT:
376
		    	    	      case KEY_CTRL:
377
		    	    	      case KEY_DOWN:
378
		    	    	      case KEY_END:
379
		    	    	      case KEY_ESCAPE:
380
		    	    	      case KEY_HOME:
381
		    	    	      case KEY_LEFT:
382
		    	    	      case KEY_PAGEDOWN:
383
		    	    	      case KEY_PAGEUP:
384
		    	    	      case KEY_RIGHT:
385
		    	    	      case KEY_SHIFT:
386
		    	    	      case KEY_TAB:
387
		    	    	      case KEY_UP:
388
 
389
		    	    	        break;
390
 
391
		    	    	      case KEY_ENTER:
392
 
393
		    	    	    	 if (selectionEspece) {
394
		    	    	    		 selectionEspece=false;
395
		    	    	    	 }
396
		    	    	    	 else {
397
		    	    	    		// lancer mise a jour
398
		    	    	    	 }
399
 
400
 
401
		    	    	    	  break;
402
 
403
		    	    	      default:
404
 
83 david 405
		    	    	    	  numeroNom="";
20 david 406
		    	    	    	  obtenirListeReferentielNom();
407
 
408
		    	    	        break;
409
		    	    	    }
410
 
411
 
412
 
413
		     		}
414
 
415
		    		},    listenerConfigEspece
416
 
417
			);
418
 
419
 
420
 
421
 
422
		boutonOK.addListener(new ButtonListenerAdapter() {
39 david 423
 
20 david 424
			public void onClick(Button button, EventObject e) {
39 david 425
 
71 jpm 426
				if(modification)
427
				{
428
					modifierObservation() ;
429
				}
430
				else
431
				{
432
					ajouterObservation();
433
				}
39 david 434
 
71 jpm 435
 
20 david 436
			}
437
 
438
		});
77 jpm 439
 
440
		boutonAnnuler.addListener(new ButtonListenerAdapter() {
12 david 441
 
442
			public void onClick(Button button, EventObject e) {
443
 
77 jpm 444
				if(modification)
445
				{
446
					supprimerObservation() ;
447
				}
448
				else
449
				{
450
					viderChampsObservation();
451
				}
12 david 452
 
77 jpm 453
 
454
			}
455
 
12 david 456
		});
457
 
458
 
459
	}
460
 
461
	/**
462
	 * Desactive visuellement ce panneau
463
	 */
464
	public void desactiverPanneau()
465
	{
466
		this.setDisabled(true) ;
467
	}
468
 
469
	/**
470
	 * Active visuellement ce panneau
471
	 */
472
	public void activerPanneau()
473
	{
474
		this.setDisabled(false) ;
475
	}
13 david 476
 
477
	public void rafraichir(Object nouvelleDonnees, boolean repandreRaffraichissement) {
478
 
49 david 479
		// si l'on a reçu une liste du referentiel commune (completion referentiel commune)
13 david 480
			if(nouvelleDonnees instanceof ListeReferentielCommune)
481
			{
482
 
483
					ListeReferentielCommune data = (ListeReferentielCommune) nouvelleDonnees ;
484
					Object[][] communeData = new Object[data.size()][2];
485
					int i = 0 ;
486
 
487
					// on la parse et on récupère les informations quiç nous interessent
488
					for (Iterator it = data.keySet().iterator(); it.hasNext();)
489
					{
490
 
491
						ReferentielCommune ref=(ReferentielCommune) data.get(it.next());
492
 
493
						communeData[i][0]= ref.getCommune();
494
						communeData[i][1]= ref.getDepartement();
495
 
496
 
497
						i++ ;
498
					}
499
 
500
					   //	  creation du store
501
					FieldDef defCommune = new StringFieldDef("commune");
502
					FieldDef defDepartement = new StringFieldDef("departement");
503
 
504
 
505
					FieldDef[] defTab = { defCommune, defDepartement};
506
 
507
					RecordDef rd = new RecordDef(defTab);
508
 
509
					final MemoryProxy dataProxy = new MemoryProxy(communeData);
510
					final ArrayReader reader = new ArrayReader(rd);
511
 
20 david 512
					Store store=new Store(dataProxy,reader);
13 david 513
					store.load() ;
514
 
41 jpm 515
					commune.setStore(store);
13 david 516
 
517
			}
20 david 518
 
94 jpm 519
			//			 si l'on a reçu une liste du référentiel nom (complétion referentiel nom)
20 david 520
 
521
			if(nouvelleDonnees instanceof ListeReferentielNom)
522
			{
523
 
524
					ListeReferentielNom data = (ListeReferentielNom) nouvelleDonnees ;
525
					Object[][] nomData = new Object[data.size()][2];
526
					int i = 0 ;
527
 
528
					// on la parse et on récupère les informations quiç nous interessent
529
					for (Iterator it = data.keySet().iterator(); it.hasNext();)
530
					{
531
 
532
						ReferentielNom ref=(ReferentielNom) data.get(it.next());
533
 
534
						nomData[i][0]= ref.getNom();
535
						nomData[i][1]= ref.getNumeroNom();
536
 
537
 
538
						i++ ;
539
					}
540
 
541
					   //	  creation du store
542
					FieldDef defNom = new StringFieldDef("nom");
543
					FieldDef defNumeroNom = new StringFieldDef("numeroNom");
544
 
545
 
546
					FieldDef[] defTab = { defNom, defNumeroNom};
547
 
548
					RecordDef rd = new RecordDef(defTab);
549
 
550
					final MemoryProxy dataProxy = new MemoryProxy(nomData);
551
					final ArrayReader reader = new ArrayReader(rd);
552
 
553
					Store store=new Store(dataProxy,reader);
554
					store.load() ;
555
 
556
					espece.setStore(store);
557
 
558
 
559
 
560
			}
561
 
82 david 562
			// On recoit une observation dont on veut afficher le detail
563
 
71 jpm 564
			if(nouvelleDonnees instanceof Observation)
565
			{
566
				Observation obs = (Observation)nouvelleDonnees ;
567
				afficherDetailsObservation(obs) ;
568
			}
77 jpm 569
 
82 david 570
			// Sur Mise à jour ou suppression d'une suppression ?
571
 
77 jpm 572
			if(nouvelleDonnees instanceof String)
573
			{
574
				String str = (String)nouvelleDonnees ;
575
				observationMediateur.obtenirListeObservation() ;
576
			}
20 david 577
 
13 david 578
	}
12 david 579
 
580
 
13 david 581
	public void obtenirListeReferentielCommune() {
94 jpm 582
 
20 david 583
	 String com=commune.getText().replaceAll(" ","/");
584
	 com=com.replaceAll("%","");
585
 
586
	 observationMediateur.obtenirListeReferentielCommune(this,com);
13 david 587
 
588
	}
20 david 589
 
590
 
591
	public void obtenirListeReferentielNom() {
592
 
593
	  String esp=espece.getText().replaceAll(" ","/");
594
	  esp=esp.replaceAll("%","");
595
 
596
	  observationMediateur.obtenirListeReferentielNom(this,esp);
597
 
598
	}
599
 
600
 
39 david 601
	public void ajouterObservation() {
602
 
77 jpm 603
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getRawValue());
46 david 604
		observationMediateur.ajouterObservation(obs);
39 david 605
	}
12 david 606
 
71 jpm 607
	private void modifierObservation() {
608
 
79 david 609
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getText());
610
		obs.setNumeroOrdre(numeroOrdre);
611
		observationMediateur.modifierObservation(obs);
74 david 612
 
71 jpm 613
	}
77 jpm 614
 
615
	private void supprimerObservation() {
616
 
617
			observationMediateur.supprimerObservation(this, numeroOrdre);
618
	}
12 david 619
 
71 jpm 620
 
621
	public void afficherDetailsObservation(Observation obs)
622
	{
623
		viderChampsObservation() ;
624
 
625
		if(!obs.getDate().equals("null") && !obs.getDate().equals("000null")) {
626
			String[] dateEtHeure = obs.getDate().split(" ", 2);
77 jpm 627
			date.setValue(dateEtHeure[0]) ;
71 jpm 628
		}
629
		if(!obs.getLieudit().equals("null") && !obs.getLieudit().equals("000null")) {
630
			lieudit.setValue(obs.getLieudit()) ;
631
		}
632
		if(!obs.getStation().equals("null") && !obs.getStation().equals("000null")) {
633
			station.setValue(obs.getStation()) ;
634
		}
635
		if(!obs.getMilieu().equals("null") && !obs.getMilieu().equals("000null")) {
636
			milieu.setValue(obs.getMilieu()) ;
637
		}
638
		if(!obs.getCommentaire().equals("null") && !obs.getCommentaire().equals("000null")) {
639
			comment.setValue(obs.getCommentaire()) ;
640
		}
641
		if(!obs.getLocalite().equals("null") && !obs.getLocalite().equals("000null")) {
642
			commune.setValue(obs.getLocalite()) ;
643
		}
644
		if(!obs.getIdentifiantLocalite().equals("null") && !obs.getIdentifiantLocalite().equals("000null")) {
645
			departement = obs.getIdentifiantLocalite();
646
		}
647
		if(!obs.getNomSaisi().equals("null") && !obs.getNomSaisi().equals("000null")) {
648
			espece.setValue(obs.getNomSaisi()) ;
649
		}
650
		if(!obs.getNumeroNomenclaturalSaisi().equals("null") && !obs.getNumeroNomenclaturalSaisi().equals("000null")) {
651
			numeroNom = obs.getNumeroNomenclaturalSaisi() ;
652
		}
83 david 653
		if(!obs.getNumeroOrdre().equals("null") && !obs.getNumeroOrdre().equals("000nu2ll")) {
74 david 654
			numeroOrdre = obs.getNumeroOrdre() ;
655
		}
656
 
71 jpm 657
	}
658
 
659
	public void viderChampsObservation()
660
	{
661
 
662
		date.reset() ;
663
		lieudit.reset() ;
664
		station.reset() ;
665
		milieu.reset();
666
		comment.reset();
667
		commune.reset();
668
		departement = "";
669
		espece.reset();
670
		numeroNom = "" ;
74 david 671
		numeroOrdre = "";
71 jpm 672
 
673
	}
674
 
675
	private void setModification(String mode)
676
	{
677
		if(mode.equals("true")) {
678
 
679
			boutonOK.setText("Modifier") ;
680
			setTitle("Modification") ;
77 jpm 681
			boutonAnnuler.setText("Supprimer") ;
71 jpm 682
			modification = true ;
94 jpm 683
 
71 jpm 684
		}
685
		else
686
		{
687
 
688
			boutonOK.setText("Créer") ;
689
			setTitle("Saisir") ;
77 jpm 690
			boutonAnnuler.setText("Réinitialiser") ;
71 jpm 691
			modification = false ;
94 jpm 692
 
71 jpm 693
		}
694
 
695
	}
696
 
697
 
698
	/**
699
	 * renvoie vrai si on est en mode modification, faux si on est en mode création
700
	 * @return
701
	 */
702
	public boolean getModification()
703
	{
704
		return modification ;
705
	}
706
 
707
 
12 david 708
}