Browse Source

++ gestion reponses

PCYoshi 9 years ago
parent
commit
39c24a177e

+ 61
- 56
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/InterfacePrincipale$PanCategoriesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanCategoriesListener.class" />
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" />
11
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
12
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
15
+      <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" />
17
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
18
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" afterPath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" />
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" />
15
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
21
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
16
     </list>
22
     </list>
17
     <ignored path="java.iws" />
23
     <ignored path="java.iws" />
34
   </component>
40
   </component>
35
   <component name="FileEditorManager">
41
   <component name="FileEditorManager">
36
     <leaf>
42
     <leaf>
37
-      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="false">
43
+      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
38
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
44
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
39
           <provider selected="true" editor-type-id="text-editor">
45
           <provider selected="true" editor-type-id="text-editor">
40
-            <state vertical-scroll-proportion="0.0">
41
-              <caret line="374" column="16" selection-start-line="374" selection-start-column="16" selection-end-line="374" selection-end-column="16" />
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
               <folding>
48
               <folding>
43
                 <element signature="imports" expanded="true" />
49
                 <element signature="imports" expanded="true" />
44
               </folding>
50
               </folding>
50
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
56
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
51
           <provider selected="true" editor-type-id="text-editor">
57
           <provider selected="true" editor-type-id="text-editor">
52
             <state vertical-scroll-proportion="0.0">
58
             <state vertical-scroll-proportion="0.0">
53
-              <caret line="69" column="44" selection-start-line="69" selection-start-column="44" selection-end-line="69" selection-end-column="44" />
59
+              <caret line="88" column="94" selection-start-line="88" selection-start-column="94" selection-end-line="88" selection-end-column="94" />
54
               <folding>
60
               <folding>
55
                 <element signature="imports" expanded="true" />
61
                 <element signature="imports" expanded="true" />
56
                 <element signature="e#1239#1240#0" expanded="true" />
62
                 <element signature="e#1239#1240#0" expanded="true" />
57
                 <element signature="e#1294#1295#0" expanded="true" />
63
                 <element signature="e#1294#1295#0" expanded="true" />
58
                 <element signature="e#1349#1350#0" expanded="true" />
64
                 <element signature="e#1349#1350#0" expanded="true" />
59
                 <element signature="e#1404#1405#0" expanded="true" />
65
                 <element signature="e#1404#1405#0" expanded="true" />
66
+                <element signature="e#1960#1961#0" expanded="true" />
67
+                <element signature="e#2017#2018#0" expanded="true" />
60
               </folding>
68
               </folding>
61
             </state>
69
             </state>
62
           </provider>
70
           </provider>
66
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
74
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
67
           <provider selected="true" editor-type-id="text-editor">
75
           <provider selected="true" editor-type-id="text-editor">
68
             <state vertical-scroll-proportion="0.0">
76
             <state vertical-scroll-proportion="0.0">
69
-              <caret line="15" column="52" selection-start-line="15" selection-start-column="52" selection-end-line="15" selection-end-column="52" />
77
+              <caret line="82" column="11" selection-start-line="82" selection-start-column="11" selection-end-line="82" selection-end-column="11" />
70
               <folding>
78
               <folding>
71
                 <element signature="imports" expanded="true" />
79
                 <element signature="imports" expanded="true" />
72
                 <element signature="e#2067#2068#0" expanded="true" />
80
                 <element signature="e#2067#2068#0" expanded="true" />
80
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
88
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
81
           <provider selected="true" editor-type-id="text-editor">
89
           <provider selected="true" editor-type-id="text-editor">
82
             <state vertical-scroll-proportion="0.0">
90
             <state vertical-scroll-proportion="0.0">
83
-              <caret line="28" column="30" selection-start-line="28" selection-start-column="30" selection-end-line="28" selection-end-column="30" />
91
+              <caret line="102" column="33" selection-start-line="102" selection-start-column="33" selection-end-line="102" selection-end-column="33" />
84
               <folding>
92
               <folding>
85
                 <element signature="imports" expanded="true" />
93
                 <element signature="imports" expanded="true" />
86
-                <element signature="e#996#997#0" expanded="true" />
87
-                <element signature="e#1022#1023#0" expanded="true" />
94
+                <element signature="e#2963#2964#0" expanded="true" />
95
+                <element signature="e#2989#2990#0" expanded="true" />
88
               </folding>
96
               </folding>
89
             </state>
97
             </state>
90
           </provider>
98
           </provider>
111
           </provider>
119
           </provider>
112
         </entry>
120
         </entry>
113
       </file>
121
       </file>
114
-      <file leaf-file-name="mcd.png" pinned="false" current-in-tab="true">
122
+      <file leaf-file-name="mcd.png" pinned="false" current-in-tab="false">
115
         <entry file="file://$PROJECT_DIR$/mcd.png">
123
         <entry file="file://$PROJECT_DIR$/mcd.png">
116
           <provider selected="true" editor-type-id="images">
124
           <provider selected="true" editor-type-id="images">
117
             <state />
125
             <state />
150
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
158
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
151
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
159
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
152
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
160
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
153
-        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
154
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
155
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
161
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
162
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
163
+        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
156
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
164
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
157
       </list>
165
       </list>
158
     </option>
166
     </option>
272
       <sortByType />
280
       <sortByType />
273
     </navigator>
281
     </navigator>
274
     <panes>
282
     <panes>
275
-      <pane id="Scope" />
276
       <pane id="PackagesPane" />
283
       <pane id="PackagesPane" />
284
+      <pane id="Scratches" />
277
       <pane id="ProjectPane">
285
       <pane id="ProjectPane">
278
         <subPane>
286
         <subPane>
279
           <PATH>
287
           <PATH>
308
           </PATH>
316
           </PATH>
309
         </subPane>
317
         </subPane>
310
       </pane>
318
       </pane>
311
-      <pane id="Scratches" />
319
+      <pane id="Scope" />
312
     </panes>
320
     </panes>
313
   </component>
321
   </component>
314
   <component name="PropertiesComponent">
322
   <component name="PropertiesComponent">
585
       <option name="project" value="LOCAL" />
593
       <option name="project" value="LOCAL" />
586
       <updated>1432912975055</updated>
594
       <updated>1432912975055</updated>
587
     </task>
595
     </task>
588
-    <option name="localTasksCounter" value="15" />
596
+    <task id="LOCAL-00015" summary="correction de bug">
597
+      <created>1432923249468</created>
598
+      <option name="number" value="00015" />
599
+      <option name="project" value="LOCAL" />
600
+      <updated>1432923249468</updated>
601
+    </task>
602
+    <option name="localTasksCounter" value="16" />
589
     <servers />
603
     <servers />
590
   </component>
604
   </component>
591
   <component name="TodoView">
605
   <component name="TodoView">
599
   </component>
613
   </component>
600
   <component name="ToolWindowManager">
614
   <component name="ToolWindowManager">
601
     <frame x="-1" y="27" width="1368" height="712" extended-state="6" />
615
     <frame x="-1" y="27" width="1368" height="712" extended-state="6" />
602
-    <editor active="false" />
616
+    <editor active="true" />
603
     <layout>
617
     <layout>
604
       <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
618
       <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
605
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
619
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
622
       <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" />
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" />
623
       <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" />
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" />
624
       <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" />
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" />
625
-      <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" />
626
       <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" />
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" />
627
     </layout>
641
     </layout>
628
   </component>
642
   </component>
629
   <component name="Vcs.Log.UiProperties">
643
   <component name="Vcs.Log.UiProperties">
651
     <MESSAGE value="java: gestion categorie operationelle" />
665
     <MESSAGE value="java: gestion categorie operationelle" />
652
     <MESSAGE value="java: gestion categorie operationelle et ergonomique" />
666
     <MESSAGE value="java: gestion categorie operationelle et ergonomique" />
653
     <MESSAGE value="++" />
667
     <MESSAGE value="++" />
654
-    <option name="LAST_COMMIT_MESSAGE" value="++" />
668
+    <MESSAGE value="correction de bug" />
669
+    <option name="LAST_COMMIT_MESSAGE" value="correction de bug" />
655
   </component>
670
   </component>
656
   <component name="XDebuggerManager">
671
   <component name="XDebuggerManager">
657
     <breakpoint-manager>
672
     <breakpoint-manager>
658
-      <breakpoints>
659
-        <line-breakpoint enabled="true" type="java-line">
660
-          <url>file://$PROJECT_DIR$/src/InterfacePrincipale.java</url>
661
-          <line>283</line>
662
-          <properties />
663
-          <option name="timeStamp" value="3" />
664
-        </line-breakpoint>
665
-      </breakpoints>
666
-      <option name="time" value="4" />
673
+      <option name="time" value="5" />
667
     </breakpoint-manager>
674
     </breakpoint-manager>
668
     <watches-manager />
675
     <watches-manager />
669
   </component>
676
   </component>
972
         </state>
979
         </state>
973
       </provider>
980
       </provider>
974
     </entry>
981
     </entry>
975
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
976
-      <provider selected="true" editor-type-id="text-editor">
977
-        <state vertical-scroll-proportion="0.12686567">
978
-          <caret line="8" column="28" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
979
-          <folding>
980
-            <element signature="imports" expanded="true" />
981
-            <element signature="e#1535#1536#0" expanded="true" />
982
-            <element signature="e#1563#1564#0" expanded="true" />
983
-            <element signature="e#1591#1592#0" expanded="true" />
984
-            <element signature="e#1619#1620#0" expanded="true" />
985
-          </folding>
986
-        </state>
987
-      </provider>
988
-    </entry>
989
     <entry file="file://$PROJECT_DIR$/src/Reponses.java">
982
     <entry file="file://$PROJECT_DIR$/src/Reponses.java">
990
       <provider selected="true" editor-type-id="text-editor">
983
       <provider selected="true" editor-type-id="text-editor">
991
         <state vertical-scroll-proportion="0.0">
984
         <state vertical-scroll-proportion="0.0">
1005
         </state>
998
         </state>
1006
       </provider>
999
       </provider>
1007
     </entry>
1000
     </entry>
1001
+    <entry file="file://$PROJECT_DIR$/mcd.png">
1002
+      <provider selected="true" editor-type-id="images">
1003
+        <state />
1004
+      </provider>
1005
+    </entry>
1006
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1007
+      <provider selected="true" editor-type-id="text-editor">
1008
+        <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" />
1010
+          <folding>
1011
+            <element signature="imports" expanded="true" />
1012
+            <element signature="e#2963#2964#0" expanded="true" />
1013
+            <element signature="e#2989#2990#0" expanded="true" />
1014
+          </folding>
1015
+        </state>
1016
+      </provider>
1017
+    </entry>
1008
     <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1018
     <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1009
       <provider selected="true" editor-type-id="text-editor">
1019
       <provider selected="true" editor-type-id="text-editor">
1010
         <state vertical-scroll-proportion="0.0">
1020
         <state vertical-scroll-proportion="0.0">
1011
-          <caret line="15" column="52" selection-start-line="15" selection-start-column="52" selection-end-line="15" selection-end-column="52" />
1021
+          <caret line="82" column="11" selection-start-line="82" selection-start-column="11" selection-end-line="82" selection-end-column="11" />
1012
           <folding>
1022
           <folding>
1013
             <element signature="imports" expanded="true" />
1023
             <element signature="imports" expanded="true" />
1014
             <element signature="e#2067#2068#0" expanded="true" />
1024
             <element signature="e#2067#2068#0" expanded="true" />
1020
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1030
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1021
       <provider selected="true" editor-type-id="text-editor">
1031
       <provider selected="true" editor-type-id="text-editor">
1022
         <state vertical-scroll-proportion="0.0">
1032
         <state vertical-scroll-proportion="0.0">
1023
-          <caret line="69" column="44" selection-start-line="69" selection-start-column="44" selection-end-line="69" selection-end-column="44" />
1033
+          <caret line="88" column="94" selection-start-line="88" selection-start-column="94" selection-end-line="88" selection-end-column="94" />
1024
           <folding>
1034
           <folding>
1025
             <element signature="imports" expanded="true" />
1035
             <element signature="imports" expanded="true" />
1026
             <element signature="e#1239#1240#0" expanded="true" />
1036
             <element signature="e#1239#1240#0" expanded="true" />
1027
             <element signature="e#1294#1295#0" expanded="true" />
1037
             <element signature="e#1294#1295#0" expanded="true" />
1028
             <element signature="e#1349#1350#0" expanded="true" />
1038
             <element signature="e#1349#1350#0" expanded="true" />
1029
             <element signature="e#1404#1405#0" expanded="true" />
1039
             <element signature="e#1404#1405#0" expanded="true" />
1040
+            <element signature="e#1960#1961#0" expanded="true" />
1041
+            <element signature="e#2017#2018#0" expanded="true" />
1030
           </folding>
1042
           </folding>
1031
         </state>
1043
         </state>
1032
       </provider>
1044
       </provider>
1033
     </entry>
1045
     </entry>
1034
-    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1046
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1035
       <provider selected="true" editor-type-id="text-editor">
1047
       <provider selected="true" editor-type-id="text-editor">
1036
-        <state vertical-scroll-proportion="0.0">
1037
-          <caret line="374" column="16" selection-start-line="374" selection-start-column="16" selection-end-line="374" selection-end-column="16" />
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" />
1038
           <folding>
1050
           <folding>
1039
             <element signature="imports" expanded="true" />
1051
             <element signature="imports" expanded="true" />
1040
           </folding>
1052
           </folding>
1041
         </state>
1053
         </state>
1042
       </provider>
1054
       </provider>
1043
     </entry>
1055
     </entry>
1044
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1056
+    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1045
       <provider selected="true" editor-type-id="text-editor">
1057
       <provider selected="true" editor-type-id="text-editor">
1046
-        <state vertical-scroll-proportion="0.0">
1047
-          <caret line="28" column="30" selection-start-line="28" selection-start-column="30" selection-end-line="28" selection-end-column="30" />
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" />
1048
           <folding>
1060
           <folding>
1049
             <element signature="imports" expanded="true" />
1061
             <element signature="imports" expanded="true" />
1050
-            <element signature="e#996#997#0" expanded="true" />
1051
-            <element signature="e#1022#1023#0" expanded="true" />
1052
           </folding>
1062
           </folding>
1053
         </state>
1063
         </state>
1054
       </provider>
1064
       </provider>
1055
     </entry>
1065
     </entry>
1056
-    <entry file="file://$PROJECT_DIR$/mcd.png">
1057
-      <provider selected="true" editor-type-id="images">
1058
-        <state />
1059
-      </provider>
1060
-    </entry>
1061
   </component>
1066
   </component>
1062
   <component name="masterDetails">
1067
   <component name="masterDetails">
1063
     <states>
1068
     <states>

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


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


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


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


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


+ 21
- 1
java/src/ConnexionBDD.java View File

51
 
51
 
52
 	public void createCategorie(String categorieName)
52
 	public void createCategorie(String categorieName)
53
 	{
53
 	{
54
-		gestionCategories.insertCategorie(categorieName);
54
+		gestionCategories.createCategorie(categorieName);
55
 	}
55
 	}
56
 
56
 
57
 	public void deleteCategorie(String categorieName)
57
 	public void deleteCategorie(String categorieName)
70
 		gestionReponses.readReponses(catName);
70
 		gestionReponses.readReponses(catName);
71
 		return gestionReponses.getListReponses();
71
 		return gestionReponses.getListReponses();
72
 	}
72
 	}
73
+
74
+	public void createReponses(String nomCategorie, String reponse1, String reponse2)
75
+	{
76
+		gestionReponses.createReponses(nomCategorie, reponse1, reponse2);
77
+	}
78
+
79
+	public void deleteReponses(String reponse1, String reponse2)
80
+	{
81
+		gestionReponses.deleteReponses(reponse1, reponse2);
82
+	}
83
+
84
+	public void modifyReponsesReponses(String oldRep1, String oldRep2, String newRep1, String newRep2)
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);
92
+	}
73
 }
93
 }

+ 1
- 1
java/src/GestionCategories.java View File

42
 		}
42
 		}
43
 	}
43
 	}
44
 
44
 
45
-	public void insertCategorie(String categorieName)
45
+	public void createCategorie(String categorieName)
46
 	{
46
 	{
47
 		String rq ="INSERT INTO categorie(nom_cat)" +
47
 		String rq ="INSERT INTO categorie(nom_cat)" +
48
 				" VALUES(?)";
48
 				" VALUES(?)";

+ 73
- 0
java/src/GestionReponses.java View File

20
 		String rq = "SELECT *" +
20
 		String rq = "SELECT *" +
21
 				" FROM reponses" +
21
 				" FROM reponses" +
22
 				" WHERE nom_cat = ?";
22
 				" WHERE nom_cat = ?";
23
+
23
 		try
24
 		try
24
 		{
25
 		{
25
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
26
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
43
 		}
44
 		}
44
 	}
45
 	}
45
 
46
 
47
+	public void createReponses(String nomCategorie, String reponse1, String reponse2)
48
+	{
49
+		String rq = "INSERT INTO reponses(nom_cat,reponse1,reponse2)" +
50
+				" VALUES(?,?,?)";
51
+		try
52
+		{
53
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
54
+			preparedStatement.setString(1, nomCategorie);
55
+			preparedStatement.setString(2, reponse1);
56
+			preparedStatement.setString(3, reponse2);
57
+			preparedStatement.executeUpdate();
58
+		} catch (SQLException e) {
59
+			e.printStackTrace();
60
+		}
61
+	}
62
+
63
+	public void deleteReponses(String rep1, String rep2)
64
+	{
65
+		String rq ="DELETE FROM reponses" +
66
+				" WHERE reponse1 = ? AND reponse2 = ?";
67
+		try
68
+		{
69
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
70
+			preparedStatement.setString(1, rep1);
71
+			preparedStatement.setString(2, rep2);
72
+			preparedStatement.executeUpdate();
73
+		}
74
+		catch (SQLException e)
75
+		{
76
+			e.printStackTrace();
77
+		}
78
+	}
79
+
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();
93
+		}
94
+		catch (SQLException e)
95
+		{
96
+			e.printStackTrace();
97
+		}
98
+	}
99
+
100
+	public void updateReponsesCategorie(String rep1, String rep2, String newCategorie)
101
+	{
102
+		String rq ="UPDATE reponses" +
103
+				" SET nom_cat = ?" +
104
+				" WHERE reponse1 = ? AND reponse2 = ?";
105
+		try
106
+		{
107
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
108
+			preparedStatement.setString(1, newCategorie);
109
+			preparedStatement.setString(2, rep1);
110
+			preparedStatement.setString(3, rep2);
111
+			preparedStatement.executeUpdate();
112
+		}
113
+		catch (SQLException e)
114
+		{
115
+			e.printStackTrace();
116
+		}
117
+	}
118
+
46
 	public ArrayList<Reponses> getListReponses()
119
 	public ArrayList<Reponses> getListReponses()
47
 	{
120
 	{
48
 		return listReponses;
121
 		return listReponses;

+ 122
- 24
java/src/InterfacePrincipale.java View File

1
 import javax.swing.*;
1
 import javax.swing.*;
2
-import javax.swing.border.BevelBorder;
3
 import javax.swing.border.Border;
2
 import javax.swing.border.Border;
4
 import javax.swing.event.ListSelectionEvent;
3
 import javax.swing.event.ListSelectionEvent;
5
 import javax.swing.event.ListSelectionListener;
4
 import javax.swing.event.ListSelectionListener;
6
 import java.awt.*;
5
 import java.awt.*;
7
 import java.awt.event.ActionEvent;
6
 import java.awt.event.ActionEvent;
8
 import java.awt.event.ActionListener;
7
 import java.awt.event.ActionListener;
9
-import java.lang.reflect.Array;
10
 import java.util.Arrays;
8
 import java.util.Arrays;
9
+import java.util.Vector;
11
 
10
 
12
-import static java.lang.Thread.currentThread;
13
 import static java.lang.Thread.sleep;
11
 import static java.lang.Thread.sleep;
14
 import static javax.swing.BoxLayout.*;
12
 import static javax.swing.BoxLayout.*;
15
 
13
 
175
 		addR.setAlignmentX(CENTER_ALIGNMENT);
173
 		addR.setAlignmentX(CENTER_ALIGNMENT);
176
 		delR.setAlignmentX(CENTER_ALIGNMENT);
174
 		delR.setAlignmentX(CENTER_ALIGNMENT);
177
 		editR.setAlignmentX(CENTER_ALIGNMENT);
175
 		editR.setAlignmentX(CENTER_ALIGNMENT);
176
+		comboRepCat.setOpaque(false);
178
 
177
 
179
-		comboRepCat.setAlignmentX(CENTER_ALIGNMENT);
180
 		addR.setMaximumSize(new Dimension(300,34));
178
 		addR.setMaximumSize(new Dimension(300,34));
181
 		delR.setMaximumSize(new Dimension(300,34));
179
 		delR.setMaximumSize(new Dimension(300,34));
182
 		editR.setMaximumSize(new Dimension(300,34));
180
 		editR.setMaximumSize(new Dimension(300,34));
202
 		addR.addActionListener(prl);
200
 		addR.addActionListener(prl);
203
 		delR.addActionListener(prl);
201
 		delR.addActionListener(prl);
204
 		editR.addActionListener(prl);
202
 		editR.addActionListener(prl);
203
+		listR.addListSelectionListener(prl);
204
+		comboRepCat.addActionListener(prl);
205
 	}
205
 	}
206
 
206
 
207
 	private void createPanelQuestion()
207
 	private void createPanelQuestion()
224
 		addQ.setAlignmentX(CENTER_ALIGNMENT);
224
 		addQ.setAlignmentX(CENTER_ALIGNMENT);
225
 		delQ.setAlignmentX(CENTER_ALIGNMENT);
225
 		delQ.setAlignmentX(CENTER_ALIGNMENT);
226
 		editQ.setAlignmentX(CENTER_ALIGNMENT);
226
 		editQ.setAlignmentX(CENTER_ALIGNMENT);
227
+		comboQueRep.setOpaque(false);
228
+
227
 		addQ.setMaximumSize(new Dimension(208,34));
229
 		addQ.setMaximumSize(new Dimension(208,34));
228
 		delQ.setMaximumSize(new Dimension(208,34));
230
 		delQ.setMaximumSize(new Dimension(208,34));
229
 		editQ.setMaximumSize(new Dimension(208,34));
231
 		editQ.setMaximumSize(new Dimension(208,34));
276
 		pack();
278
 		pack();
277
 	}
279
 	}
278
 
280
 
281
+	private void reSelectCategorie(String newCatName)
282
+	{
283
+		Object[] tabObject = bdd.getListeCategorie().toArray();
284
+		Categorie[] tabCategorie = Arrays.copyOf(tabObject, tabObject.length, Categorie[].class);
285
+		listC.setListData(tabCategorie);
286
+
287
+		for(int i=0; i<tabCategorie.length; i++)
288
+		{
289
+			if(tabCategorie[i].getNom().equals(newCatName))
290
+			{
291
+				listC.setSelectedValue(tabCategorie[i], true);
292
+				break;
293
+			}
294
+		}
295
+	}
296
+
297
+	private void reSelectReponses(String rep1, String rep2)
298
+	{
299
+		Object[] tabObject = bdd.getListeReponses(listC.getSelectedValue().toString()).toArray();
300
+		Reponses[] tabReponses = Arrays.copyOf(tabObject, tabObject.length, Reponses[].class);
301
+		listR.setListData(tabReponses);
302
+
303
+		for(int i=0; i<tabReponses.length; i++)
304
+		{
305
+			if(tabReponses[i].getReponse1().equals(rep1) && tabReponses[i].getReponse2().equals(rep2))
306
+			{
307
+				listR.setSelectedValue(tabReponses[i], true);
308
+				break;
309
+			}
310
+		}
311
+	}
279
 
312
 
280
 	private class PanCategoriesListener implements ActionListener, ListSelectionListener
313
 	private class PanCategoriesListener implements ActionListener, ListSelectionListener
281
 	{
314
 	{
282
-		private boolean b;
283
 		public void actionPerformed(ActionEvent e)
315
 		public void actionPerformed(ActionEvent e)
284
 		{
316
 		{
285
 			if(e.getSource() == addC)
317
 			if(e.getSource() == addC)
303
 
335
 
304
 				bdd.createCategorie(catName);
336
 				bdd.createCategorie(catName);
305
 				listC.setListData(bdd.getListeCategorie().toArray());
337
 				listC.setListData(bdd.getListeCategorie().toArray());
338
+				reSelectCategorie(catName);
306
 			}
339
 			}
307
 			else if(e.getSource() == delC)
340
 			else if(e.getSource() == delC)
308
 			{
341
 			{
322
 				{
355
 				{
323
 					bdd.deleteCategorie(categorieName);
356
 					bdd.deleteCategorie(categorieName);
324
 					listC.setListData(bdd.getListeCategorie().toArray());
357
 					listC.setListData(bdd.getListeCategorie().toArray());
358
+					listR.setListData(new Vector(0));
325
 				}
359
 				}
326
 			}
360
 			}
327
 			else if(e.getSource() == editC)
361
 			else if(e.getSource() == editC)
354
 				}
388
 				}
355
 
389
 
356
 				bdd.renameCategorie(oldCatName, newCatName);
390
 				bdd.renameCategorie(oldCatName, newCatName);
357
-
358
-				Object[] tabObject = bdd.getListeCategorie().toArray();
359
-				Categorie[] tabCategorie = Arrays.copyOf(tabObject, tabObject.length, Categorie[].class);
360
-				listC.setListData(tabCategorie);
361
-
362
-				for(int i=0; i<tabCategorie.length; i++)
363
-				{
364
-					if(tabCategorie[i].getNom().equals(newCatName))
365
-					{
366
-						listC.setSelectedValue(tabCategorie[i], true);
367
-						break;
368
-					}
369
-				}
391
+				reSelectCategorie(newCatName);
370
 			}
392
 			}
371
 		}
393
 		}
372
 
394
 
375
 			if(!listC.isSelectionEmpty())
397
 			if(!listC.isSelectionEmpty())
376
 			{
398
 			{
377
 				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
399
 				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
400
+				comboRepCat.removeAllItems();
378
 			}
401
 			}
379
 		}
402
 		}
380
 	}
403
 	}
381
 
404
 
382
-	private class PanReponsesListener implements ActionListener
405
+	private class PanReponsesListener implements ActionListener, ListSelectionListener
383
 	{
406
 	{
384
 		public void actionPerformed(ActionEvent e)
407
 		public void actionPerformed(ActionEvent e)
385
 		{
408
 		{
409
+			if(listC.isSelectionEmpty())
410
+			{
411
+				statusText.setText("Veuillez selectioner une catégorie.");
412
+				return;
413
+			}
414
+
386
 			if(e.getSource() == addR)
415
 			if(e.getSource() == addR)
387
 			{
416
 			{
388
-				statusText.setText("Création de réponses");
389
-				NouvelleReponseDialog n = new NouvelleReponseDialog("rr","r","uuu",null);
390
-				n.afficher();
417
+				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Nouveau jeu de réponses","","",null);
418
+				if(nrd.afficher() == true)
419
+				{
420
+					String catName = listC.getSelectedValue().toString();
421
+					bdd.createReponses(catName, nrd.getRep1(), nrd.getRep2());
422
+					listR.setListData(bdd.getListeReponses(catName).toArray());
423
+					reSelectReponses(nrd.getRep1(), nrd.getRep2());
424
+				}
391
 			}
425
 			}
392
 			else if(e.getSource() == delR)
426
 			else if(e.getSource() == delR)
393
 			{
427
 			{
394
-				statusText.setText("Supression de réponses");
428
+				JOptionPane jop = new JOptionPane();
429
+
430
+				Reponses r = (Reponses) listR.getSelectedValue();
431
+
432
+				if(r == null)
433
+				{
434
+					statusText.setText("Veuiller d'abord selectionner un jeu de réponses.");
435
+					return;
436
+				}
437
+
438
+				String reponse1 = r.getReponse1();
439
+				String reponse2 = r.getReponse2();
440
+
441
+				if(jop.showConfirmDialog(null,"Voulez vous vraiment supprimer le jeu de réponses " + reponse1 + ", " + reponse2 + " ?\nCela supprimera aussi toutes les questions associé à cette catégorie.", "Supression de réponses", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
442
+				{
443
+					bdd.deleteReponses(reponse1, reponse2);
444
+					listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
445
+					listQ.setListData(new Vector(0));
446
+				}
395
 			}
447
 			}
396
 			else if(e.getSource() == editR)
448
 			else if(e.getSource() == editR)
397
 			{
449
 			{
398
-				statusText.setText("Modification de réponses");
450
+				Reponses r = (Reponses) listR.getSelectedValue();
451
+
452
+				if(r == null)
453
+				{
454
+					statusText.setText("Veuiller d'abord selectionner un jeu de réponses.");
455
+					return;
456
+				}
457
+
458
+				String reponse1 = r.getReponse1();
459
+				String reponse2 = r.getReponse2();
460
+
461
+				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Modification jeu de réponses", reponse1, reponse2, null);
462
+				if(nrd.afficher() == true)
463
+				{
464
+					String catName = listC.getSelectedValue().toString();
465
+					bdd.modifyReponsesReponses(reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
466
+					listR.setListData(bdd.getListeReponses(catName).toArray());
467
+					reSelectReponses(nrd.getRep1(), nrd.getRep2());
468
+				}
469
+			}
470
+			else if(e.getSource() == comboRepCat)
471
+			{
472
+				System.out.println("éLOL");
473
+			}
474
+		}
475
+
476
+		public void valueChanged(ListSelectionEvent listSelectionEvent)
477
+		{
478
+			ListModel model = listC.getModel();
479
+			comboRepCat.removeAllItems();
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
+				}
399
 			}
491
 			}
400
 		}
492
 		}
401
 	}
493
 	}
404
 	{
496
 	{
405
 		public void actionPerformed(ActionEvent e)
497
 		public void actionPerformed(ActionEvent e)
406
 		{
498
 		{
499
+			if(listR.isSelectionEmpty())
500
+			{
501
+				statusText.setText("Veuillez selectioner une catégorie.");
502
+				return;
503
+			}
504
+
407
 			if(e.getSource() == addQ)
505
 			if(e.getSource() == addQ)
408
 			{
506
 			{
409
 				statusText.setText("Création de question");
507
 				statusText.setText("Création de question");

+ 9
- 2
java/src/NouvelleReponseDialog.java View File

27
 		rep1 = new JTextField(defRep1,15);
27
 		rep1 = new JTextField(defRep1,15);
28
 		rep2 = new JTextField(defRep2,15);
28
 		rep2 = new JTextField(defRep2,15);
29
 
29
 
30
+		rep1.setBackground(Color.WHITE);
31
+		rep2.setBackground(Color.WHITE);
32
+
30
 		ok = new JButton("OK");
33
 		ok = new JButton("OK");
31
 		annuler = new JButton("Annuler");
34
 		annuler = new JButton("Annuler");
32
 		ok.addActionListener(this);
35
 		ok.addActionListener(this);
56
 		if(e.getSource() == annuler)
59
 		if(e.getSource() == annuler)
57
 		{
60
 		{
58
 			mofidEffectues = false;
61
 			mofidEffectues = false;
62
+			setVisible(false);
59
 		}
63
 		}
60
 		else if(e.getSource() == ok) {
64
 		else if(e.getSource() == ok) {
65
+			if(rep1.getText().isEmpty() || rep2.getText().isEmpty())
66
+			{
67
+				return;
68
+			}
61
 			mofidEffectues = true;
69
 			mofidEffectues = true;
70
+			setVisible(false);
62
 		}
71
 		}
63
-
64
-		setVisible(false);
65
 	}
72
 	}
66
 
73
 
67
 	public String getRep2() {
74
 	public String getRep2() {