ソースを参照

++ gestion reponsesV2

PCYoshi 9 年 前
コミット
7dc6e6a040

+ 176
- 37
java/.idea/workspace.xml ファイルの表示

@@ -7,16 +7,12 @@
7 7
   </component>
8 8
   <component name="ChangeListManager">
9 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 12
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
16 13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionCategories.java" afterPath="$PROJECT_DIR$/src/GestionCategories.java" />
17 14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
18 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 16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
21 17
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
22 18
     </list>
@@ -43,8 +39,8 @@
43 39
       <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
44 40
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
45 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 44
               <folding>
49 45
                 <element signature="imports" expanded="true" />
50 46
               </folding>
@@ -52,11 +48,29 @@
52 48
           </provider>
53 49
         </entry>
54 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 69
       <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
56 70
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
57 71
           <provider selected="true" editor-type-id="text-editor">
58 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 74
               <folding>
61 75
                 <element signature="imports" expanded="true" />
62 76
                 <element signature="e#1239#1240#0" expanded="true" />
@@ -74,11 +88,11 @@
74 88
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
75 89
           <provider selected="true" editor-type-id="text-editor">
76 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 92
               <folding>
79 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 96
               </folding>
83 97
             </state>
84 98
           </provider>
@@ -88,11 +102,11 @@
88 102
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
89 103
           <provider selected="true" editor-type-id="text-editor">
90 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 106
               <folding>
93 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 110
               </folding>
97 111
             </state>
98 112
           </provider>
@@ -157,9 +171,9 @@
157 171
         <option value="$PROJECT_DIR$/src/Question.java" />
158 172
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
159 173
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
174
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
160 175
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
161 176
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
162
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
163 177
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
164 178
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
165 179
       </list>
@@ -280,8 +294,6 @@
280 294
       <sortByType />
281 295
     </navigator>
282 296
     <panes>
283
-      <pane id="PackagesPane" />
284
-      <pane id="Scratches" />
285 297
       <pane id="ProjectPane">
286 298
         <subPane>
287 299
           <PATH>
@@ -316,6 +328,8 @@
316 328
           </PATH>
317 329
         </subPane>
318 330
       </pane>
331
+      <pane id="PackagesPane" />
332
+      <pane id="Scratches" />
319 333
       <pane id="Scope" />
320 334
     </panes>
321 335
   </component>
@@ -344,6 +358,118 @@
344 358
       <recent name="" />
345 359
     </key>
346 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 473
   <component name="RunManager" selected="Application.Main">
348 474
     <configuration default="false" name="Main" type="Application" factoryName="Application" temporary="true">
349 475
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
@@ -599,7 +725,13 @@
599 725
       <option name="project" value="LOCAL" />
600 726
       <updated>1432923249468</updated>
601 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 735
     <servers />
604 736
   </component>
605 737
   <component name="TodoView">
@@ -621,7 +753,6 @@
621 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 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 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 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 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 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,13 +762,14 @@
631 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 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 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 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 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 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 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 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 773
     </layout>
642 774
   </component>
643 775
   <component name="Vcs.Log.UiProperties">
@@ -666,7 +798,8 @@
666 798
     <MESSAGE value="java: gestion categorie operationelle et ergonomique" />
667 799
     <MESSAGE value="++" />
668 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 803
   </component>
671 804
   <component name="XDebuggerManager">
672 805
     <breakpoint-manager>
@@ -1003,26 +1136,30 @@
1003 1136
         <state />
1004 1137
       </provider>
1005 1138
     </entry>
1006
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1139
+    <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1007 1140
       <provider selected="true" editor-type-id="text-editor">
1008 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 1143
           <folding>
1011 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 1147
           </folding>
1015 1148
         </state>
1016 1149
       </provider>
1017 1150
     </entry>
1018
-    <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1151
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1019 1152
       <provider selected="true" editor-type-id="text-editor">
1020 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 1155
           <folding>
1023 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 1163
           </folding>
1027 1164
         </state>
1028 1165
       </provider>
@@ -1030,7 +1167,7 @@
1030 1167
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1031 1168
       <provider selected="true" editor-type-id="text-editor">
1032 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 1171
           <folding>
1035 1172
             <element signature="imports" expanded="true" />
1036 1173
             <element signature="e#1239#1240#0" expanded="true" />
@@ -1043,20 +1180,22 @@
1043 1180
         </state>
1044 1181
       </provider>
1045 1182
     </entry>
1046
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1183
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1047 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 1187
           <folding>
1051 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 1191
           </folding>
1053 1192
         </state>
1054 1193
       </provider>
1055 1194
     </entry>
1056 1195
     <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1057 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 1199
           <folding>
1061 1200
             <element signature="imports" expanded="true" />
1062 1201
           </folding>

バイナリ
java/out/production/java/InterfacePrincipale$PanCategoriesListener.class ファイルの表示


バイナリ
java/out/production/java/InterfacePrincipale.class ファイルの表示


+ 2
- 7
java/src/ConnexionBDD.java ファイルの表示

@@ -81,13 +81,8 @@ public class ConnexionBDD
81 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 ファイルの表示

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

+ 14
- 25
java/src/GestionReponses.java ファイルの表示

@@ -55,7 +55,10 @@ public class GestionReponses
55 55
 			preparedStatement.setString(2, reponse1);
56 56
 			preparedStatement.setString(3, reponse2);
57 57
 			preparedStatement.executeUpdate();
58
-		} catch (SQLException e) {
58
+
59
+			preparedStatement.close();
60
+		}
61
+		catch (SQLException e) {
59 62
 			e.printStackTrace();
60 63
 		}
61 64
 	}
@@ -70,26 +73,8 @@ public class GestionReponses
70 73
 			preparedStatement.setString(1, rep1);
71 74
 			preparedStatement.setString(2, rep2);
72 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 79
 		catch (SQLException e)
95 80
 		{
@@ -97,18 +82,22 @@ public class GestionReponses
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 87
 		String rq ="UPDATE reponses" +
103
-				" SET nom_cat = ?" +
88
+				" SET nom_cat = ?, reponse1 = ?, reponse2 = ?" +
104 89
 				" WHERE reponse1 = ? AND reponse2 = ?";
105 90
 		try
106 91
 		{
107 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 98
 			preparedStatement.executeUpdate();
99
+
100
+			preparedStatement.close();
112 101
 		}
113 102
 		catch (SQLException e)
114 103
 		{

+ 18
- 29
java/src/InterfacePrincipale.java ファイルの表示

@@ -25,7 +25,6 @@ public class InterfacePrincipale extends JFrame
25 25
 	private Bouton addR;
26 26
 	private Bouton delR;
27 27
 	private Bouton editR;
28
-	private JComboBox comboRepCat;
29 28
 	private JList listR;
30 29
 
31 30
 	//Panel des questions
@@ -160,7 +159,6 @@ public class InterfacePrincipale extends JFrame
160 159
 		addR = new Bouton("Ajouter un jeu de réponses", plusImg);
161 160
 		delR = new Bouton("Supprimer le jeu de réponses", delImg);
162 161
 		editR = new Bouton("Modifier le jeu de réponse", editImg);
163
-		comboRepCat = new JComboBox();
164 162
 
165 163
 		listR = new JList();
166 164
 		JScrollPane sp = new JScrollPane(listR,
@@ -173,12 +171,10 @@ public class InterfacePrincipale extends JFrame
173 171
 		addR.setAlignmentX(CENTER_ALIGNMENT);
174 172
 		delR.setAlignmentX(CENTER_ALIGNMENT);
175 173
 		editR.setAlignmentX(CENTER_ALIGNMENT);
176
-		comboRepCat.setOpaque(false);
177 174
 
178 175
 		addR.setMaximumSize(new Dimension(300,34));
179 176
 		delR.setMaximumSize(new Dimension(300,34));
180 177
 		editR.setMaximumSize(new Dimension(300,34));
181
-		comboRepCat.setMaximumSize(new Dimension(1000,34));
182 178
 
183 179
 		JLabel labR = new JLabel("Réponses");
184 180
 		labR.setAlignmentX(Component.CENTER_ALIGNMENT);
@@ -190,8 +186,6 @@ public class InterfacePrincipale extends JFrame
190 186
 		panReponses.add(delR);
191 187
 		panReponses.add(Box.createRigidArea(new Dimension(1, 10)));
192 188
 		panReponses.add(sp);
193
-		panReponses.add(Box.createRigidArea(new Dimension(1, 10)));
194
-		panReponses.add(comboRepCat);
195 189
 		panReponses.add(Box.createRigidArea(new Dimension(1, 5)));
196 190
 		panReponses.add(editR);
197 191
 
@@ -201,7 +195,6 @@ public class InterfacePrincipale extends JFrame
201 195
 		delR.addActionListener(prl);
202 196
 		editR.addActionListener(prl);
203 197
 		listR.addListSelectionListener(prl);
204
-		comboRepCat.addActionListener(prl);
205 198
 	}
206 199
 
207 200
 	private void createPanelQuestion()
@@ -310,6 +303,19 @@ public class InterfacePrincipale extends JFrame
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 319
 	private class PanCategoriesListener implements ActionListener, ListSelectionListener
314 320
 	{
315 321
 		public void actionPerformed(ActionEvent e)
@@ -397,7 +403,6 @@ public class InterfacePrincipale extends JFrame
397 403
 			if(!listC.isSelectionEmpty())
398 404
 			{
399 405
 				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
400
-				comboRepCat.removeAllItems();
401 406
 			}
402 407
 		}
403 408
 	}
@@ -414,7 +419,7 @@ public class InterfacePrincipale extends JFrame
414 419
 
415 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 423
 				if(nrd.afficher() == true)
419 424
 				{
420 425
 					String catName = listC.getSelectedValue().toString();
@@ -457,38 +462,22 @@ public class InterfacePrincipale extends JFrame
457 462
 
458 463
 				String reponse1 = r.getReponse1();
459 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 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 471
 					listR.setListData(bdd.getListeReponses(catName).toArray());
472
+					reSelectCategorie(nrd.getCat());
467 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 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 ファイルの表示

@@ -10,16 +10,17 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
10 10
 	private JButton ok;
11 11
 	private JButton annuler;
12 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 17
 		super(parent,title,true);
17
-		createInterface(defRep1,defRep2);
18
+		createInterface(defRep1, defRep2, defCategorie, tabCategorie);
18 19
 		pack();
19 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 25
 		JPanel champs = new JPanel();
25 26
 		JPanel boutons = new JPanel();
@@ -35,11 +36,30 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
35 36
 		ok.addActionListener(this);
36 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 41
 		champs.add(new JLabel("Réponse 1:"));
40 42
 		champs.add(rep1);
41 43
 		champs.add(new JLabel("Réponse 2:"));
42 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 63
 		boutons.add(annuler);
44 64
 		boutons.add(ok);
45 65
 
@@ -78,4 +98,8 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
78 98
 	public String getRep1() {
79 99
 		return rep1.getText();
80 100
 	}
101
+
102
+	public String getCat() {
103
+		return comboCat.getSelectedItem().toString();
104
+	}
81 105
 }