Browse Source

Merge branch 'master' of https://github.com/babolivier/burger-quizz

Brendan Abolivier 9 years ago
parent
commit
cd3789ecbb

+ 176
- 37
java/.idea/workspace.xml View File

7
   </component>
7
   </component>
8
   <component name="ChangeListManager">
8
   <component name="ChangeListManager">
9
     <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
9
     <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
10
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" />
11
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionCategories.class" afterPath="$PROJECT_DIR$/out/production/java/GestionCategories.class" />
12
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionReponses.class" afterPath="$PROJECT_DIR$/out/production/java/GestionReponses.class" />
13
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
14
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
10
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanCategoriesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanCategoriesListener.class" />
11
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale.class" />
15
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
12
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionCategories.java" afterPath="$PROJECT_DIR$/src/GestionCategories.java" />
13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionCategories.java" afterPath="$PROJECT_DIR$/src/GestionCategories.java" />
17
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
18
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
15
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
19
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" afterPath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" />
20
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
21
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
17
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
22
     </list>
18
     </list>
43
       <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
39
       <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
44
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
40
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
45
           <provider selected="true" editor-type-id="text-editor">
41
           <provider selected="true" editor-type-id="text-editor">
46
-            <state vertical-scroll-proportion="3.2033582">
47
-              <caret line="472" column="13" selection-start-line="472" selection-start-column="13" selection-end-line="472" selection-end-column="13" />
42
+            <state vertical-scroll-proportion="0.45895523">
43
+              <caret line="470" column="79" selection-start-line="470" selection-start-column="79" selection-end-line="470" selection-end-column="79" />
48
               <folding>
44
               <folding>
49
                 <element signature="imports" expanded="true" />
45
                 <element signature="imports" expanded="true" />
50
               </folding>
46
               </folding>
52
           </provider>
48
           </provider>
53
         </entry>
49
         </entry>
54
       </file>
50
       </file>
51
+      <file leaf-file-name="NouvelleReponseDialog.java" pinned="false" current-in-tab="false">
52
+        <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
53
+          <provider selected="true" editor-type-id="text-editor">
54
+            <state vertical-scroll-proportion="0.0">
55
+              <caret line="59" column="31" selection-start-line="59" selection-start-column="31" selection-end-line="59" selection-end-column="31" />
56
+              <folding>
57
+                <element signature="imports" expanded="true" />
58
+                <element signature="e#2268#2269#0" expanded="true" />
59
+                <element signature="e#2296#2297#0" expanded="true" />
60
+                <element signature="e#2324#2325#0" expanded="true" />
61
+                <element signature="e#2352#2353#0" expanded="true" />
62
+                <element signature="e#2379#2380#0" expanded="true" />
63
+                <element signature="e#2430#2431#0" expanded="true" />
64
+              </folding>
65
+            </state>
66
+          </provider>
67
+        </entry>
68
+      </file>
55
       <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
69
       <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
56
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
70
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
57
           <provider selected="true" editor-type-id="text-editor">
71
           <provider selected="true" editor-type-id="text-editor">
58
             <state vertical-scroll-proportion="0.0">
72
             <state vertical-scroll-proportion="0.0">
59
-              <caret line="88" column="94" selection-start-line="88" selection-start-column="94" selection-end-line="88" selection-end-column="94" />
73
+              <caret line="78" column="54" selection-start-line="78" selection-start-column="54" selection-end-line="78" selection-end-column="54" />
60
               <folding>
74
               <folding>
61
                 <element signature="imports" expanded="true" />
75
                 <element signature="imports" expanded="true" />
62
                 <element signature="e#1239#1240#0" expanded="true" />
76
                 <element signature="e#1239#1240#0" expanded="true" />
74
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
88
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
75
           <provider selected="true" editor-type-id="text-editor">
89
           <provider selected="true" editor-type-id="text-editor">
76
             <state vertical-scroll-proportion="0.0">
90
             <state vertical-scroll-proportion="0.0">
77
-              <caret line="82" column="11" selection-start-line="82" selection-start-column="11" selection-end-line="82" selection-end-column="11" />
91
+              <caret line="93" column="38" selection-start-line="93" selection-start-column="38" selection-end-line="93" selection-end-column="38" />
78
               <folding>
92
               <folding>
79
                 <element signature="imports" expanded="true" />
93
                 <element signature="imports" expanded="true" />
80
-                <element signature="e#2067#2068#0" expanded="true" />
81
-                <element signature="e#2095#2096#0" expanded="true" />
94
+                <element signature="e#2160#2161#0" expanded="true" />
95
+                <element signature="e#2188#2189#0" expanded="true" />
82
               </folding>
96
               </folding>
83
             </state>
97
             </state>
84
           </provider>
98
           </provider>
88
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
102
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
89
           <provider selected="true" editor-type-id="text-editor">
103
           <provider selected="true" editor-type-id="text-editor">
90
             <state vertical-scroll-proportion="0.0">
104
             <state vertical-scroll-proportion="0.0">
91
-              <caret line="102" column="33" selection-start-line="102" selection-start-column="33" selection-end-line="102" selection-end-column="33" />
105
+              <caret line="99" column="38" selection-start-line="99" selection-start-column="38" selection-end-line="99" selection-end-column="38" />
92
               <folding>
106
               <folding>
93
                 <element signature="imports" expanded="true" />
107
                 <element signature="imports" expanded="true" />
94
-                <element signature="e#2963#2964#0" expanded="true" />
95
-                <element signature="e#2989#2990#0" expanded="true" />
108
+                <element signature="e#2635#2636#0" expanded="true" />
109
+                <element signature="e#2661#2662#0" expanded="true" />
96
               </folding>
110
               </folding>
97
             </state>
111
             </state>
98
           </provider>
112
           </provider>
157
         <option value="$PROJECT_DIR$/src/Question.java" />
171
         <option value="$PROJECT_DIR$/src/Question.java" />
158
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
172
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
159
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
173
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
174
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
160
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
175
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
161
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
176
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
162
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
163
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
177
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
164
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
178
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
165
       </list>
179
       </list>
280
       <sortByType />
294
       <sortByType />
281
     </navigator>
295
     </navigator>
282
     <panes>
296
     <panes>
283
-      <pane id="PackagesPane" />
284
-      <pane id="Scratches" />
285
       <pane id="ProjectPane">
297
       <pane id="ProjectPane">
286
         <subPane>
298
         <subPane>
287
           <PATH>
299
           <PATH>
316
           </PATH>
328
           </PATH>
317
         </subPane>
329
         </subPane>
318
       </pane>
330
       </pane>
331
+      <pane id="PackagesPane" />
332
+      <pane id="Scratches" />
319
       <pane id="Scope" />
333
       <pane id="Scope" />
320
     </panes>
334
     </panes>
321
   </component>
335
   </component>
344
       <recent name="" />
358
       <recent name="" />
345
     </key>
359
     </key>
346
   </component>
360
   </component>
361
+  <component name="RestoreUpdateTree" date="Moments ago" ActionInfo="_Update">
362
+    <UpdatedFiles>
363
+      <FILE-GROUP>
364
+        <option name="myUpdateName" value="Updated from server" />
365
+        <option name="myStatusName" value="Changed on server" />
366
+        <option name="mySupportsDeletion" value="false" />
367
+        <option name="myCanBeAbsent" value="false" />
368
+        <option name="myId" value="CHANGED_ON_SERVER" />
369
+        <FILE-GROUP>
370
+          <option name="myUpdateName" value="Updated" />
371
+          <option name="myStatusName" value="Changed" />
372
+          <option name="mySupportsDeletion" value="false" />
373
+          <option name="myCanBeAbsent" value="false" />
374
+          <option name="myId" value="UPDATED" />
375
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/model/class.questset.php</PATH>
376
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/index.htm</PATH>
377
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/js/game.js</PATH>
378
+        </FILE-GROUP>
379
+        <FILE-GROUP>
380
+          <option name="myUpdateName" value="Created" />
381
+          <option name="myStatusName" value="Created" />
382
+          <option name="mySupportsDeletion" value="false" />
383
+          <option name="myCanBeAbsent" value="false" />
384
+          <option name="myId" value="CREATED" />
385
+        </FILE-GROUP>
386
+        <FILE-GROUP>
387
+          <option name="myUpdateName" value="Deleted" />
388
+          <option name="myStatusName" value="Deleted" />
389
+          <option name="mySupportsDeletion" value="false" />
390
+          <option name="myCanBeAbsent" value="true" />
391
+          <option name="myId" value="REMOVED_FROM_REPOSITORY" />
392
+        </FILE-GROUP>
393
+        <FILE-GROUP>
394
+          <option name="myUpdateName" value="Restored" />
395
+          <option name="myStatusName" value="Will be restored" />
396
+          <option name="mySupportsDeletion" value="false" />
397
+          <option name="myCanBeAbsent" value="false" />
398
+          <option name="myId" value="RESTORED" />
399
+        </FILE-GROUP>
400
+      </FILE-GROUP>
401
+      <FILE-GROUP>
402
+        <option name="myUpdateName" value="Modified" />
403
+        <option name="myStatusName" value="Modified" />
404
+        <option name="mySupportsDeletion" value="false" />
405
+        <option name="myCanBeAbsent" value="false" />
406
+        <option name="myId" value="MODIFIED" />
407
+      </FILE-GROUP>
408
+      <FILE-GROUP>
409
+        <option name="myUpdateName" value="Skipped" />
410
+        <option name="myStatusName" value="Skipped" />
411
+        <option name="mySupportsDeletion" value="false" />
412
+        <option name="myCanBeAbsent" value="false" />
413
+        <option name="myId" value="SKIPPED" />
414
+      </FILE-GROUP>
415
+      <FILE-GROUP>
416
+        <option name="myUpdateName" value="Merged with conflicts" />
417
+        <option name="myStatusName" value="Will be merged with conflicts" />
418
+        <option name="mySupportsDeletion" value="false" />
419
+        <option name="myCanBeAbsent" value="false" />
420
+        <option name="myId" value="MERGED_WITH_CONFLICTS" />
421
+      </FILE-GROUP>
422
+      <FILE-GROUP>
423
+        <option name="myUpdateName" value="Merged with tree conflicts" />
424
+        <option name="myStatusName" value="Merged with tree conflicts" />
425
+        <option name="mySupportsDeletion" value="false" />
426
+        <option name="myCanBeAbsent" value="false" />
427
+        <option name="myId" value="MERGED_WITH_TREE_CONFLICT" />
428
+      </FILE-GROUP>
429
+      <FILE-GROUP>
430
+        <option name="myUpdateName" value="Merged with property conflicts" />
431
+        <option name="myStatusName" value="Will be merged with property conflicts" />
432
+        <option name="mySupportsDeletion" value="false" />
433
+        <option name="myCanBeAbsent" value="false" />
434
+        <option name="myId" value="MERGED_WITH_PROPERTY_CONFLICT" />
435
+      </FILE-GROUP>
436
+      <FILE-GROUP>
437
+        <option name="myUpdateName" value="Merged" />
438
+        <option name="myStatusName" value="Will be merged" />
439
+        <option name="mySupportsDeletion" value="false" />
440
+        <option name="myCanBeAbsent" value="false" />
441
+        <option name="myId" value="MERGED" />
442
+      </FILE-GROUP>
443
+      <FILE-GROUP>
444
+        <option name="myUpdateName" value="Not in repository" />
445
+        <option name="myStatusName" value="Not in repository" />
446
+        <option name="mySupportsDeletion" value="true" />
447
+        <option name="myCanBeAbsent" value="false" />
448
+        <option name="myId" value="UNKNOWN" />
449
+      </FILE-GROUP>
450
+      <FILE-GROUP>
451
+        <option name="myUpdateName" value="Locally added" />
452
+        <option name="myStatusName" value="Locally added" />
453
+        <option name="mySupportsDeletion" value="false" />
454
+        <option name="myCanBeAbsent" value="false" />
455
+        <option name="myId" value="LOCALLY_ADDED" />
456
+      </FILE-GROUP>
457
+      <FILE-GROUP>
458
+        <option name="myUpdateName" value="Locally removed" />
459
+        <option name="myStatusName" value="Locally removed" />
460
+        <option name="mySupportsDeletion" value="false" />
461
+        <option name="myCanBeAbsent" value="false" />
462
+        <option name="myId" value="LOCALLY_REMOVED" />
463
+      </FILE-GROUP>
464
+      <FILE-GROUP>
465
+        <option name="myUpdateName" value="Switched" />
466
+        <option name="myStatusName" value="Switched" />
467
+        <option name="mySupportsDeletion" value="false" />
468
+        <option name="myCanBeAbsent" value="false" />
469
+        <option name="myId" value="SWITCHED" />
470
+      </FILE-GROUP>
471
+    </UpdatedFiles>
472
+  </component>
347
   <component name="RunManager" selected="Application.Main">
473
   <component name="RunManager" selected="Application.Main">
348
     <configuration default="false" name="Main" type="Application" factoryName="Application" temporary="true">
474
     <configuration default="false" name="Main" type="Application" factoryName="Application" temporary="true">
349
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
475
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
599
       <option name="project" value="LOCAL" />
725
       <option name="project" value="LOCAL" />
600
       <updated>1432923249468</updated>
726
       <updated>1432923249468</updated>
601
     </task>
727
     </task>
602
-    <option name="localTasksCounter" value="16" />
728
+    <task id="LOCAL-00016" summary="++ gestion reponses">
729
+      <created>1433172079872</created>
730
+      <option name="number" value="00016" />
731
+      <option name="project" value="LOCAL" />
732
+      <updated>1433172079872</updated>
733
+    </task>
734
+    <option name="localTasksCounter" value="17" />
603
     <servers />
735
     <servers />
604
   </component>
736
   </component>
605
   <component name="TodoView">
737
   <component name="TodoView">
621
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
753
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
622
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
754
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
623
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
755
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
624
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3996479" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
625
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5030441" order="7" side_tool="true" content_ui="tabs" />
756
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5030441" order="7" side_tool="true" content_ui="tabs" />
626
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
757
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
627
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.49695587" order="7" side_tool="false" content_ui="tabs" />
758
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.49695587" order="7" side_tool="false" content_ui="tabs" />
631
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
762
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
632
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
763
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
633
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16717325" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
764
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16717325" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
634
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30579966" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
635
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
765
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
636
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
766
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
637
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
767
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
768
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3996479" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
638
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
769
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
639
-      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
640
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
770
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
771
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
772
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30579966" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
641
     </layout>
773
     </layout>
642
   </component>
774
   </component>
643
   <component name="Vcs.Log.UiProperties">
775
   <component name="Vcs.Log.UiProperties">
666
     <MESSAGE value="java: gestion categorie operationelle et ergonomique" />
798
     <MESSAGE value="java: gestion categorie operationelle et ergonomique" />
667
     <MESSAGE value="++" />
799
     <MESSAGE value="++" />
668
     <MESSAGE value="correction de bug" />
800
     <MESSAGE value="correction de bug" />
669
-    <option name="LAST_COMMIT_MESSAGE" value="correction de bug" />
801
+    <MESSAGE value="++ gestion reponses" />
802
+    <option name="LAST_COMMIT_MESSAGE" value="++ gestion reponses" />
670
   </component>
803
   </component>
671
   <component name="XDebuggerManager">
804
   <component name="XDebuggerManager">
672
     <breakpoint-manager>
805
     <breakpoint-manager>
1003
         <state />
1136
         <state />
1004
       </provider>
1137
       </provider>
1005
     </entry>
1138
     </entry>
1006
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1139
+    <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1007
       <provider selected="true" editor-type-id="text-editor">
1140
       <provider selected="true" editor-type-id="text-editor">
1008
         <state vertical-scroll-proportion="0.0">
1141
         <state vertical-scroll-proportion="0.0">
1009
-          <caret line="102" column="33" selection-start-line="102" selection-start-column="33" selection-end-line="102" selection-end-column="33" />
1142
+          <caret line="93" column="38" selection-start-line="93" selection-start-column="38" selection-end-line="93" selection-end-column="38" />
1010
           <folding>
1143
           <folding>
1011
             <element signature="imports" expanded="true" />
1144
             <element signature="imports" expanded="true" />
1012
-            <element signature="e#2963#2964#0" expanded="true" />
1013
-            <element signature="e#2989#2990#0" expanded="true" />
1145
+            <element signature="e#2160#2161#0" expanded="true" />
1146
+            <element signature="e#2188#2189#0" expanded="true" />
1014
           </folding>
1147
           </folding>
1015
         </state>
1148
         </state>
1016
       </provider>
1149
       </provider>
1017
     </entry>
1150
     </entry>
1018
-    <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1151
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1019
       <provider selected="true" editor-type-id="text-editor">
1152
       <provider selected="true" editor-type-id="text-editor">
1020
         <state vertical-scroll-proportion="0.0">
1153
         <state vertical-scroll-proportion="0.0">
1021
-          <caret line="82" column="11" selection-start-line="82" selection-start-column="11" selection-end-line="82" selection-end-column="11" />
1154
+          <caret line="59" column="31" selection-start-line="59" selection-start-column="31" selection-end-line="59" selection-end-column="31" />
1022
           <folding>
1155
           <folding>
1023
             <element signature="imports" expanded="true" />
1156
             <element signature="imports" expanded="true" />
1024
-            <element signature="e#2067#2068#0" expanded="true" />
1025
-            <element signature="e#2095#2096#0" expanded="true" />
1157
+            <element signature="e#2268#2269#0" expanded="true" />
1158
+            <element signature="e#2296#2297#0" expanded="true" />
1159
+            <element signature="e#2324#2325#0" expanded="true" />
1160
+            <element signature="e#2352#2353#0" expanded="true" />
1161
+            <element signature="e#2379#2380#0" expanded="true" />
1162
+            <element signature="e#2430#2431#0" expanded="true" />
1026
           </folding>
1163
           </folding>
1027
         </state>
1164
         </state>
1028
       </provider>
1165
       </provider>
1030
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1167
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1031
       <provider selected="true" editor-type-id="text-editor">
1168
       <provider selected="true" editor-type-id="text-editor">
1032
         <state vertical-scroll-proportion="0.0">
1169
         <state vertical-scroll-proportion="0.0">
1033
-          <caret line="88" column="94" selection-start-line="88" selection-start-column="94" selection-end-line="88" selection-end-column="94" />
1170
+          <caret line="78" column="54" selection-start-line="78" selection-start-column="54" selection-end-line="78" selection-end-column="54" />
1034
           <folding>
1171
           <folding>
1035
             <element signature="imports" expanded="true" />
1172
             <element signature="imports" expanded="true" />
1036
             <element signature="e#1239#1240#0" expanded="true" />
1173
             <element signature="e#1239#1240#0" expanded="true" />
1043
         </state>
1180
         </state>
1044
       </provider>
1181
       </provider>
1045
     </entry>
1182
     </entry>
1046
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1183
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1047
       <provider selected="true" editor-type-id="text-editor">
1184
       <provider selected="true" editor-type-id="text-editor">
1048
-        <state vertical-scroll-proportion="-0.6325967">
1049
-          <caret line="30" column="12" selection-start-line="30" selection-start-column="12" selection-end-line="30" selection-end-column="12" />
1185
+        <state vertical-scroll-proportion="0.0">
1186
+          <caret line="99" column="38" selection-start-line="99" selection-start-column="38" selection-end-line="99" selection-end-column="38" />
1050
           <folding>
1187
           <folding>
1051
             <element signature="imports" expanded="true" />
1188
             <element signature="imports" expanded="true" />
1189
+            <element signature="e#2635#2636#0" expanded="true" />
1190
+            <element signature="e#2661#2662#0" expanded="true" />
1052
           </folding>
1191
           </folding>
1053
         </state>
1192
         </state>
1054
       </provider>
1193
       </provider>
1055
     </entry>
1194
     </entry>
1056
     <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1195
     <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1057
       <provider selected="true" editor-type-id="text-editor">
1196
       <provider selected="true" editor-type-id="text-editor">
1058
-        <state vertical-scroll-proportion="3.2033582">
1059
-          <caret line="472" column="13" selection-start-line="472" selection-start-column="13" selection-end-line="472" selection-end-column="13" />
1197
+        <state vertical-scroll-proportion="0.45895523">
1198
+          <caret line="470" column="79" selection-start-line="470" selection-start-column="79" selection-end-line="470" selection-end-column="79" />
1060
           <folding>
1199
           <folding>
1061
             <element signature="imports" expanded="true" />
1200
             <element signature="imports" expanded="true" />
1062
           </folding>
1201
           </folding>

BIN
java/out/production/java/InterfacePrincipale$PanCategoriesListener.class View File


BIN
java/out/production/java/InterfacePrincipale.class View File


+ 2
- 7
java/src/ConnexionBDD.java View File

81
 		gestionReponses.deleteReponses(reponse1, reponse2);
81
 		gestionReponses.deleteReponses(reponse1, reponse2);
82
 	}
82
 	}
83
 
83
 
84
-	public void modifyReponsesReponses(String oldRep1, String oldRep2, String newRep1, String newRep2)
84
+	public void modifyReponsesReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
85
 	{
85
 	{
86
-		gestionReponses.updateReponsesReponses(oldRep1, oldRep2, newRep1, newRep2);
87
-	}
88
-
89
-	public void modifyReponsesCategorie(String reponse1, String reponses2, String newCategorie)
90
-	{
91
-		gestionReponses.updateReponsesCategorie(reponse1, reponses2, newCategorie);
86
+		gestionReponses.updateReponsesReponses(categorie, oldRep1, oldRep2, newRep1, newRep2);
92
 	}
87
 	}
93
 }
88
 }

+ 6
- 0
java/src/GestionCategories.java View File

51
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
51
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
52
 			preparedStatement.setString(1,categorieName);
52
 			preparedStatement.setString(1,categorieName);
53
 			preparedStatement.executeUpdate();
53
 			preparedStatement.executeUpdate();
54
+
55
+			preparedStatement.close();
54
 		}
56
 		}
55
 		catch (SQLException e)
57
 		catch (SQLException e)
56
 		{
58
 		{
67
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
69
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
68
 			preparedStatement.setString(1,categorieName);
70
 			preparedStatement.setString(1,categorieName);
69
 			preparedStatement.executeUpdate();
71
 			preparedStatement.executeUpdate();
72
+
73
+			preparedStatement.close();
70
 		}
74
 		}
71
 		catch (SQLException e)
75
 		catch (SQLException e)
72
 		{
76
 		{
86
 			preparedStatement.setString(1, newCategorieName);
90
 			preparedStatement.setString(1, newCategorieName);
87
 			preparedStatement.setString(2, oldCategorieName);
91
 			preparedStatement.setString(2, oldCategorieName);
88
 			preparedStatement.executeUpdate();
92
 			preparedStatement.executeUpdate();
93
+
94
+			preparedStatement.close();
89
 		}
95
 		}
90
 		catch (SQLException e)
96
 		catch (SQLException e)
91
 		{
97
 		{

+ 14
- 25
java/src/GestionReponses.java View File

55
 			preparedStatement.setString(2, reponse1);
55
 			preparedStatement.setString(2, reponse1);
56
 			preparedStatement.setString(3, reponse2);
56
 			preparedStatement.setString(3, reponse2);
57
 			preparedStatement.executeUpdate();
57
 			preparedStatement.executeUpdate();
58
-		} catch (SQLException e) {
58
+
59
+			preparedStatement.close();
60
+		}
61
+		catch (SQLException e) {
59
 			e.printStackTrace();
62
 			e.printStackTrace();
60
 		}
63
 		}
61
 	}
64
 	}
70
 			preparedStatement.setString(1, rep1);
73
 			preparedStatement.setString(1, rep1);
71
 			preparedStatement.setString(2, rep2);
74
 			preparedStatement.setString(2, rep2);
72
 			preparedStatement.executeUpdate();
75
 			preparedStatement.executeUpdate();
73
-		}
74
-		catch (SQLException e)
75
-		{
76
-			e.printStackTrace();
77
-		}
78
-	}
79
 
76
 
80
-	public void updateReponsesReponses(String oldRep1, String oldRep2, String newRep1, String newRep2)
81
-	{
82
-		String rq ="UPDATE reponses" +
83
-				" SET reponse1 = ?, reponse2 = ?" +
84
-				" WHERE reponse1 = ? AND reponse2 = ?";
85
-		try
86
-		{
87
-			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
88
-			preparedStatement.setString(1, newRep1);
89
-			preparedStatement.setString(2, newRep2);
90
-			preparedStatement.setString(3, oldRep1);
91
-			preparedStatement.setString(4, oldRep2);
92
-			preparedStatement.executeUpdate();
77
+			preparedStatement.close();
93
 		}
78
 		}
94
 		catch (SQLException e)
79
 		catch (SQLException e)
95
 		{
80
 		{
97
 		}
82
 		}
98
 	}
83
 	}
99
 
84
 
100
-	public void updateReponsesCategorie(String rep1, String rep2, String newCategorie)
85
+	public void updateReponsesReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
101
 	{
86
 	{
102
 		String rq ="UPDATE reponses" +
87
 		String rq ="UPDATE reponses" +
103
-				" SET nom_cat = ?" +
88
+				" SET nom_cat = ?, reponse1 = ?, reponse2 = ?" +
104
 				" WHERE reponse1 = ? AND reponse2 = ?";
89
 				" WHERE reponse1 = ? AND reponse2 = ?";
105
 		try
90
 		try
106
 		{
91
 		{
107
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
92
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
108
-			preparedStatement.setString(1, newCategorie);
109
-			preparedStatement.setString(2, rep1);
110
-			preparedStatement.setString(3, rep2);
93
+			preparedStatement.setString(1, categorie);
94
+			preparedStatement.setString(2, newRep1);
95
+			preparedStatement.setString(3, newRep2);
96
+			preparedStatement.setString(4, oldRep1);
97
+			preparedStatement.setString(5, oldRep2);
111
 			preparedStatement.executeUpdate();
98
 			preparedStatement.executeUpdate();
99
+
100
+			preparedStatement.close();
112
 		}
101
 		}
113
 		catch (SQLException e)
102
 		catch (SQLException e)
114
 		{
103
 		{

+ 18
- 29
java/src/InterfacePrincipale.java View File

25
 	private Bouton addR;
25
 	private Bouton addR;
26
 	private Bouton delR;
26
 	private Bouton delR;
27
 	private Bouton editR;
27
 	private Bouton editR;
28
-	private JComboBox comboRepCat;
29
 	private JList listR;
28
 	private JList listR;
30
 
29
 
31
 	//Panel des questions
30
 	//Panel des questions
160
 		addR = new Bouton("Ajouter un jeu de réponses", plusImg);
159
 		addR = new Bouton("Ajouter un jeu de réponses", plusImg);
161
 		delR = new Bouton("Supprimer le jeu de réponses", delImg);
160
 		delR = new Bouton("Supprimer le jeu de réponses", delImg);
162
 		editR = new Bouton("Modifier le jeu de réponse", editImg);
161
 		editR = new Bouton("Modifier le jeu de réponse", editImg);
163
-		comboRepCat = new JComboBox();
164
 
162
 
165
 		listR = new JList();
163
 		listR = new JList();
166
 		JScrollPane sp = new JScrollPane(listR,
164
 		JScrollPane sp = new JScrollPane(listR,
173
 		addR.setAlignmentX(CENTER_ALIGNMENT);
171
 		addR.setAlignmentX(CENTER_ALIGNMENT);
174
 		delR.setAlignmentX(CENTER_ALIGNMENT);
172
 		delR.setAlignmentX(CENTER_ALIGNMENT);
175
 		editR.setAlignmentX(CENTER_ALIGNMENT);
173
 		editR.setAlignmentX(CENTER_ALIGNMENT);
176
-		comboRepCat.setOpaque(false);
177
 
174
 
178
 		addR.setMaximumSize(new Dimension(300,34));
175
 		addR.setMaximumSize(new Dimension(300,34));
179
 		delR.setMaximumSize(new Dimension(300,34));
176
 		delR.setMaximumSize(new Dimension(300,34));
180
 		editR.setMaximumSize(new Dimension(300,34));
177
 		editR.setMaximumSize(new Dimension(300,34));
181
-		comboRepCat.setMaximumSize(new Dimension(1000,34));
182
 
178
 
183
 		JLabel labR = new JLabel("Réponses");
179
 		JLabel labR = new JLabel("Réponses");
184
 		labR.setAlignmentX(Component.CENTER_ALIGNMENT);
180
 		labR.setAlignmentX(Component.CENTER_ALIGNMENT);
190
 		panReponses.add(delR);
186
 		panReponses.add(delR);
191
 		panReponses.add(Box.createRigidArea(new Dimension(1, 10)));
187
 		panReponses.add(Box.createRigidArea(new Dimension(1, 10)));
192
 		panReponses.add(sp);
188
 		panReponses.add(sp);
193
-		panReponses.add(Box.createRigidArea(new Dimension(1, 10)));
194
-		panReponses.add(comboRepCat);
195
 		panReponses.add(Box.createRigidArea(new Dimension(1, 5)));
189
 		panReponses.add(Box.createRigidArea(new Dimension(1, 5)));
196
 		panReponses.add(editR);
190
 		panReponses.add(editR);
197
 
191
 
201
 		delR.addActionListener(prl);
195
 		delR.addActionListener(prl);
202
 		editR.addActionListener(prl);
196
 		editR.addActionListener(prl);
203
 		listR.addListSelectionListener(prl);
197
 		listR.addListSelectionListener(prl);
204
-		comboRepCat.addActionListener(prl);
205
 	}
198
 	}
206
 
199
 
207
 	private void createPanelQuestion()
200
 	private void createPanelQuestion()
310
 		}
303
 		}
311
 	}
304
 	}
312
 
305
 
306
+	private String[] getCategorieList()
307
+	{
308
+		ListModel model = listC.getModel();
309
+		String[] tabCategories = new String[model.getSize()];
310
+
311
+		for(int i=0; i < model.getSize(); i++)
312
+		{
313
+			Categorie c =  (Categorie)model.getElementAt(i);
314
+			tabCategories[i] = c.getNom();
315
+		}
316
+		return tabCategories;
317
+	}
318
+
313
 	private class PanCategoriesListener implements ActionListener, ListSelectionListener
319
 	private class PanCategoriesListener implements ActionListener, ListSelectionListener
314
 	{
320
 	{
315
 		public void actionPerformed(ActionEvent e)
321
 		public void actionPerformed(ActionEvent e)
397
 			if(!listC.isSelectionEmpty())
403
 			if(!listC.isSelectionEmpty())
398
 			{
404
 			{
399
 				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
405
 				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
400
-				comboRepCat.removeAllItems();
401
 			}
406
 			}
402
 		}
407
 		}
403
 	}
408
 	}
414
 
419
 
415
 			if(e.getSource() == addR)
420
 			if(e.getSource() == addR)
416
 			{
421
 			{
417
-				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Nouveau jeu de réponses","","",null);
422
+				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Nouveau jeu de réponses", "", "", null, null, null);
418
 				if(nrd.afficher() == true)
423
 				if(nrd.afficher() == true)
419
 				{
424
 				{
420
 					String catName = listC.getSelectedValue().toString();
425
 					String catName = listC.getSelectedValue().toString();
457
 
462
 
458
 				String reponse1 = r.getReponse1();
463
 				String reponse1 = r.getReponse1();
459
 				String reponse2 = r.getReponse2();
464
 				String reponse2 = r.getReponse2();
465
+				String catName = listC.getSelectedValue().toString();
460
 
466
 
461
-				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Modification jeu de réponses", reponse1, reponse2, null);
467
+				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Modification jeu de réponses", reponse1, reponse2, catName, getCategorieList(), null);
462
 				if(nrd.afficher() == true)
468
 				if(nrd.afficher() == true)
463
 				{
469
 				{
464
-					String catName = listC.getSelectedValue().toString();
465
-					bdd.modifyReponsesReponses(reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
470
+					bdd.modifyReponsesReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
466
 					listR.setListData(bdd.getListeReponses(catName).toArray());
471
 					listR.setListData(bdd.getListeReponses(catName).toArray());
472
+					reSelectCategorie(nrd.getCat());
467
 					reSelectReponses(nrd.getRep1(), nrd.getRep2());
473
 					reSelectReponses(nrd.getRep1(), nrd.getRep2());
468
 				}
474
 				}
469
 			}
475
 			}
470
-			else if(e.getSource() == comboRepCat)
471
-			{
472
-				System.out.println("éLOL");
473
-			}
474
 		}
476
 		}
475
 
477
 
476
 		public void valueChanged(ListSelectionEvent listSelectionEvent)
478
 		public void valueChanged(ListSelectionEvent listSelectionEvent)
477
 		{
479
 		{
478
-			ListModel model = listC.getModel();
479
-			comboRepCat.removeAllItems();
480
 
480
 
481
-			String cat = listC.getSelectedValue().toString();
482
-
483
-			for(int i=0; i < model.getSize(); i++)
484
-			{
485
-				Categorie c =  (Categorie)model.getElementAt(i);
486
-				comboRepCat.addItem(c.getNom());
487
-				if(cat.equals(c.getNom()))
488
-				{
489
-					comboRepCat.setSelectedItem(c.getNom());
490
-				}
491
-			}
492
 		}
481
 		}
493
 	}
482
 	}
494
 
483
 

+ 28
- 4
java/src/NouvelleReponseDialog.java View File

10
 	private JButton ok;
10
 	private JButton ok;
11
 	private JButton annuler;
11
 	private JButton annuler;
12
 	private boolean mofidEffectues;
12
 	private boolean mofidEffectues;
13
+	private JComboBox comboCat;
13
 
14
 
14
-	public NouvelleReponseDialog(String title, String defRep1, String defRep2, JFrame parent)
15
+	public NouvelleReponseDialog(String title, String defRep1, String defRep2, String defCategorie, String[] tabCategorie,JFrame parent)
15
 	{
16
 	{
16
 		super(parent,title,true);
17
 		super(parent,title,true);
17
-		createInterface(defRep1,defRep2);
18
+		createInterface(defRep1, defRep2, defCategorie, tabCategorie);
18
 		pack();
19
 		pack();
19
 		setLocationRelativeTo(null);
20
 		setLocationRelativeTo(null);
20
 	}
21
 	}
21
 
22
 
22
-	private void createInterface(String defRep1, String defRep2)
23
+	private void createInterface(String defRep1, String defRep2, String defCategorie, String[] tabCatrgorie)
23
 	{
24
 	{
24
 		JPanel champs = new JPanel();
25
 		JPanel champs = new JPanel();
25
 		JPanel boutons = new JPanel();
26
 		JPanel boutons = new JPanel();
35
 		ok.addActionListener(this);
36
 		ok.addActionListener(this);
36
 		annuler.addActionListener(this);
37
 		annuler.addActionListener(this);
37
 
38
 
38
-		champs.setLayout(new GridLayout(2,2));
39
+		GridLayout gridLayout = new GridLayout(2, 2);
40
+		champs.setLayout(gridLayout);
39
 		champs.add(new JLabel("Réponse 1:"));
41
 		champs.add(new JLabel("Réponse 1:"));
40
 		champs.add(rep1);
42
 		champs.add(rep1);
41
 		champs.add(new JLabel("Réponse 2:"));
43
 		champs.add(new JLabel("Réponse 2:"));
42
 		champs.add(rep2);
44
 		champs.add(rep2);
45
+
46
+		if(defCategorie == null)
47
+		{
48
+			comboCat = new JComboBox();
49
+			comboCat.setOpaque(true);
50
+			for(int i=0; i<tabCatrgorie.length; i++)
51
+			{
52
+				comboCat.addItem(tabCatrgorie[i]);
53
+				if(tabCatrgorie[i].equals(defCategorie))
54
+				{
55
+					comboCat.setSelectedIndex(i);
56
+				}
57
+			}
58
+			gridLayout.setRows(3);
59
+			champs.add(new JLabel("Catégorie:"));
60
+			champs.add(comboCat);
61
+		}
62
+
43
 		boutons.add(annuler);
63
 		boutons.add(annuler);
44
 		boutons.add(ok);
64
 		boutons.add(ok);
45
 
65
 
78
 	public String getRep1() {
98
 	public String getRep1() {
79
 		return rep1.getText();
99
 		return rep1.getText();
80
 	}
100
 	}
101
+
102
+	public String getCat() {
103
+		return comboCat.getSelectedItem().toString();
104
+	}
81
 }
105
 }