瀏覽代碼

++ gestion reponsesV5

PCYoshi 9 年之前
父節點
當前提交
ee7ef5c03e
共有 5 個檔案被更改,包括 129 行新增81 行删除
  1. 62
    76
      java/.idea/workspace.xml
  2. 6
    1
      java/src/ConnexionBDD.java
  3. 44
    1
      java/src/GestionQuestions.java
  4. 1
    1
      java/src/GestionReponses.java
  5. 16
    2
      java/src/InterfacePrincipale.java

+ 62
- 76
java/.idea/workspace.xml 查看文件

@@ -6,17 +6,11 @@
6 6
     </artifacts-to-build>
7 7
   </component>
8 8
   <component name="ChangeListManager">
9
-    <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="++ gestion reponsesV4">
10
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
11
-      <change type="DELETED" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="" />
12
-      <change type="DELETED" beforePath="$PROJECT_DIR$/out/production/java/GestionQuestions.class" afterPath="" />
13
-      <change type="DELETED" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$1.class" afterPath="" />
14
-      <change type="DELETED" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="" />
15
-      <change type="DELETED" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="" />
9
+    <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
16 10
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
17 11
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionQuestions.java" afterPath="$PROJECT_DIR$/src/GestionQuestions.java" />
12
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
18 13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
19
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
20 14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
21 15
     </list>
22 16
     <ignored path="java.iws" />
@@ -39,18 +33,16 @@
39 33
   </component>
40 34
   <component name="FileEditorManager">
41 35
     <leaf>
42
-      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
36
+      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="false">
43 37
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
44 38
           <provider selected="true" editor-type-id="text-editor">
45
-            <state vertical-scroll-proportion="0.89971346">
46
-              <caret line="526" column="55" selection-start-line="526" selection-start-column="55" selection-end-line="526" selection-end-column="55" />
39
+            <state vertical-scroll-proportion="0.0">
40
+              <caret line="543" column="90" selection-start-line="543" selection-start-column="90" selection-end-line="543" selection-end-column="90" />
47 41
               <folding>
48 42
                 <element signature="imports" expanded="true" />
49 43
                 <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
50 44
                 <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
51 45
                 <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
52
-                <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
53
-                <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
54 46
                 <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
55 47
                 <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
56 48
               </folding>
@@ -62,7 +54,7 @@
62 54
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
63 55
           <provider selected="true" editor-type-id="text-editor">
64 56
             <state vertical-scroll-proportion="0.0">
65
-              <caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
57
+              <caret line="102" column="57" selection-start-line="102" selection-start-column="57" selection-end-line="102" selection-end-column="57" />
66 58
               <folding>
67 59
                 <element signature="imports" expanded="true" />
68 60
                 <element signature="e#1239#1240#0" expanded="true" />
@@ -76,15 +68,15 @@
76 68
           </provider>
77 69
         </entry>
78 70
       </file>
79
-      <file leaf-file-name="GestionReponses.java" pinned="false" current-in-tab="false">
71
+      <file leaf-file-name="GestionReponses.java" pinned="false" current-in-tab="true">
80 72
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
81 73
           <provider selected="true" editor-type-id="text-editor">
82
-            <state vertical-scroll-proportion="0.0">
83
-              <caret line="47" column="5" selection-start-line="47" selection-start-column="5" selection-end-line="47" selection-end-column="5" />
74
+            <state vertical-scroll-proportion="0.619403">
75
+              <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
84 76
               <folding>
85 77
                 <element signature="imports" expanded="true" />
86
-                <element signature="e#2635#2636#0" expanded="true" />
87
-                <element signature="e#2661#2662#0" expanded="true" />
78
+                <element signature="e#2627#2628#0" expanded="true" />
79
+                <element signature="e#2653#2654#0" expanded="true" />
88 80
               </folding>
89 81
             </state>
90 82
           </provider>
@@ -94,11 +86,12 @@
94 86
         <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
95 87
           <provider selected="true" editor-type-id="text-editor">
96 88
             <state vertical-scroll-proportion="0.0">
97
-              <caret line="47" column="98" selection-start-line="47" selection-start-column="30" selection-end-line="47" selection-end-column="98" />
89
+              <caret line="87" column="106" selection-start-line="87" selection-start-column="106" selection-end-line="87" selection-end-column="106" />
98 90
               <folding>
99 91
                 <element signature="imports" expanded="true" />
100
-                <element signature="e#1748#1749#0" expanded="true" />
101
-                <element signature="e#1776#1777#0" expanded="true" />
92
+                <element signature="e#2947#2948#0" expanded="true" />
93
+                <element signature="e#2975#2976#0" expanded="true" />
94
+                <marker date="1433256883202" expanded="true" signature="2334:2897" placeholder="{...}" />
102 95
               </folding>
103 96
             </state>
104 97
           </provider>
@@ -161,14 +154,14 @@
161 154
         <option value="$PROJECT_DIR$/src/Categorie.java" />
162 155
         <option value="$PROJECT_DIR$/src/Reponses.java" />
163 156
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
164
-        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
165 157
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
166 158
         <option value="$PROJECT_DIR$/src/Question.java" />
167
-        <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
168 159
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
169 160
         <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
170 161
         <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
171 162
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
163
+        <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
164
+        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
172 165
       </list>
173 166
     </option>
174 167
   </component>
@@ -736,7 +729,13 @@
736 729
       <option name="project" value="LOCAL" />
737 730
       <updated>1433247288224</updated>
738 731
     </task>
739
-    <option name="localTasksCounter" value="19" />
732
+    <task id="LOCAL-00019" summary="++ gestion reponsesV4">
733
+      <created>1433253655646</created>
734
+      <option name="number" value="00019" />
735
+      <option name="project" value="LOCAL" />
736
+      <updated>1433253655646</updated>
737
+    </task>
738
+    <option name="localTasksCounter" value="20" />
740 739
     <servers />
741 740
   </component>
742 741
   <component name="TodoView">
@@ -756,19 +755,19 @@
756 755
       <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" />
757 756
       <window_info id="Designer" 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" />
758 757
       <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" />
759
-      <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="6" side_tool="false" content_ui="tabs" />
758
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
760 759
       <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" />
761 760
       <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="2" side_tool="false" content_ui="tabs" />
762
-      <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" />
761
+      <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="9" side_tool="true" content_ui="tabs" />
763 762
       <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" />
764
-      <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="9" side_tool="false" content_ui="tabs" />
765
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32864675" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
766
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
763
+      <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="10" side_tool="false" content_ui="tabs" />
764
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
765
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
767 766
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
768 767
       <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" />
769
-      <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="10" side_tool="false" content_ui="tabs" />
768
+      <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="11" side_tool="false" content_ui="tabs" />
770 769
       <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" />
771
-      <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="11" side_tool="false" content_ui="tabs" />
770
+      <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="7" side_tool="false" content_ui="tabs" />
772 771
       <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="3" side_tool="false" content_ui="tabs" />
773 772
       <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" />
774 773
       <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" />
@@ -860,8 +859,6 @@
860 859
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
861 860
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
862 861
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
863
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
864
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
865 862
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
866 863
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
867 864
           </folding>
@@ -901,8 +898,6 @@
901 898
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
902 899
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
903 900
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
904
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
905
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
906 901
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
907 902
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
908 903
           </folding>
@@ -942,8 +937,6 @@
942 937
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
943 938
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
944 939
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
945
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
946
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
947 940
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
948 941
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
949 942
           </folding>
@@ -983,8 +976,6 @@
983 976
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
984 977
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
985 978
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
986
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
987
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
988 979
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
989 980
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
990 981
           </folding>
@@ -1024,8 +1015,6 @@
1024 1015
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1025 1016
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1026 1017
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1027
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1028
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
1029 1018
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1030 1019
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1031 1020
           </folding>
@@ -1086,8 +1075,6 @@
1086 1075
             <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1087 1076
             <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1088 1077
             <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1089
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1090
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
1091 1078
             <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1092 1079
             <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1093 1080
           </folding>
@@ -1196,73 +1183,72 @@
1196 1183
         </state>
1197 1184
       </provider>
1198 1185
     </entry>
1199
-    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1186
+    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1200 1187
       <provider selected="true" editor-type-id="text-editor">
1201 1188
         <state vertical-scroll-proportion="0.0">
1202
-          <caret line="47" column="98" selection-start-line="47" selection-start-column="30" selection-end-line="47" selection-end-column="98" />
1189
+          <caret line="102" column="57" selection-start-line="102" selection-start-column="57" selection-end-line="102" selection-end-column="57" />
1203 1190
           <folding>
1204 1191
             <element signature="imports" expanded="true" />
1205
-            <element signature="e#1748#1749#0" expanded="true" />
1206
-            <element signature="e#1776#1777#0" expanded="true" />
1192
+            <element signature="e#1239#1240#0" expanded="true" />
1193
+            <element signature="e#1294#1295#0" expanded="true" />
1194
+            <element signature="e#1349#1350#0" expanded="true" />
1195
+            <element signature="e#1404#1405#0" expanded="true" />
1196
+            <element signature="e#1960#1961#0" expanded="true" />
1197
+            <element signature="e#2017#2018#0" expanded="true" />
1207 1198
           </folding>
1208 1199
         </state>
1209 1200
       </provider>
1210 1201
     </entry>
1211
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1202
+    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1212 1203
       <provider selected="true" editor-type-id="text-editor">
1213 1204
         <state vertical-scroll-proportion="0.0">
1214
-          <caret line="47" column="5" selection-start-line="47" selection-start-column="5" selection-end-line="47" selection-end-column="5" />
1205
+          <caret line="543" column="90" selection-start-line="543" selection-start-column="90" selection-end-line="543" selection-end-column="90" />
1215 1206
           <folding>
1216 1207
             <element signature="imports" expanded="true" />
1217
-            <element signature="e#2635#2636#0" expanded="true" />
1218
-            <element signature="e#2661#2662#0" expanded="true" />
1208
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1209
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1210
+            <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1211
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1212
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1219 1213
           </folding>
1220 1214
         </state>
1221 1215
       </provider>
1222 1216
     </entry>
1223
-    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1217
+    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1224 1218
       <provider selected="true" editor-type-id="text-editor">
1225 1219
         <state vertical-scroll-proportion="0.0">
1226
-          <caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
1220
+          <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
1227 1221
           <folding>
1228 1222
             <element signature="imports" expanded="true" />
1229
-            <element signature="e#1239#1240#0" expanded="true" />
1230
-            <element signature="e#1294#1295#0" expanded="true" />
1231
-            <element signature="e#1349#1350#0" expanded="true" />
1232
-            <element signature="e#1404#1405#0" expanded="true" />
1233
-            <element signature="e#1960#1961#0" expanded="true" />
1234
-            <element signature="e#2017#2018#0" expanded="true" />
1223
+            <element signature="e#1953#1954#0" expanded="true" />
1224
+            <element signature="e#1985#1986#0" expanded="true" />
1225
+            <element signature="e#2013#2014#0" expanded="true" />
1226
+            <element signature="e#2053#2054#0" expanded="true" />
1235 1227
           </folding>
1236 1228
         </state>
1237 1229
       </provider>
1238 1230
     </entry>
1239
-    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1231
+    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1240 1232
       <provider selected="true" editor-type-id="text-editor">
1241 1233
         <state vertical-scroll-proportion="0.0">
1242
-          <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
1234
+          <caret line="87" column="106" selection-start-line="87" selection-start-column="106" selection-end-line="87" selection-end-column="106" />
1243 1235
           <folding>
1244 1236
             <element signature="imports" expanded="true" />
1245
-            <element signature="e#1953#1954#0" expanded="true" />
1246
-            <element signature="e#1985#1986#0" expanded="true" />
1247
-            <element signature="e#2013#2014#0" expanded="true" />
1248
-            <element signature="e#2053#2054#0" expanded="true" />
1237
+            <element signature="e#2947#2948#0" expanded="true" />
1238
+            <element signature="e#2975#2976#0" expanded="true" />
1239
+            <marker date="1433256883202" expanded="true" signature="2334:2897" placeholder="{...}" />
1249 1240
           </folding>
1250 1241
         </state>
1251 1242
       </provider>
1252 1243
     </entry>
1253
-    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1244
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1254 1245
       <provider selected="true" editor-type-id="text-editor">
1255
-        <state vertical-scroll-proportion="0.89971346">
1256
-          <caret line="526" column="55" selection-start-line="526" selection-start-column="55" selection-end-line="526" selection-end-column="55" />
1246
+        <state vertical-scroll-proportion="0.619403">
1247
+          <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
1257 1248
           <folding>
1258 1249
             <element signature="imports" expanded="true" />
1259
-            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1260
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1261
-            <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1262
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1263
-            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
1264
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1265
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1250
+            <element signature="e#2627#2628#0" expanded="true" />
1251
+            <element signature="e#2653#2654#0" expanded="true" />
1266 1252
           </folding>
1267 1253
         </state>
1268 1254
       </provider>

+ 6
- 1
java/src/ConnexionBDD.java 查看文件

@@ -83,7 +83,7 @@ public class ConnexionBDD
83 83
 
84 84
 	public void modifyReponsesReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
85 85
 	{
86
-		gestionReponses.updateReponsesReponses(categorie, oldRep1, oldRep2, newRep1, newRep2);
86
+		gestionReponses.updateReponses(categorie, oldRep1, oldRep2, newRep1, newRep2);
87 87
 	}
88 88
 
89 89
 	//Gestion questions
@@ -97,4 +97,9 @@ public class ConnexionBDD
97 97
 	{
98 98
 		gestionQuestions.createQuestion(intitule, reponse1, reponse2, num_reponse);
99 99
 	}
100
+
101
+	public void deleteQuestion(String intitule, String reponse1, String reponse2)
102
+	{
103
+		gestionQuestions.deleteQuestion(intitule, reponse1, reponse2);
104
+	}
100 105
 }

+ 44
- 1
java/src/GestionQuestions.java 查看文件

@@ -47,7 +47,7 @@ public class GestionQuestions
47 47
 
48 48
 	public void createQuestion(String intitule, String reponse1, String reponse2, int num_reponse)
49 49
 	{
50
-		String rq = "INSERT INTO reponses(intitule, reponse1, reponse2, num_reponse)" +
50
+		String rq = "INSERT INTO questions(intitule, reponse1, reponse2, num_reponse)" +
51 51
 				" VALUES(?, ?, ?, ?)";
52 52
 		try
53 53
 		{
@@ -65,6 +65,49 @@ public class GestionQuestions
65 65
 		}
66 66
 	}
67 67
 
68
+	public void deleteQuestion(String intitule, String reponse1, String reponse2)
69
+	{
70
+		String rq ="DELETE FROM questions" +
71
+				" WHERE reponse1 = ? AND reponse2 = ? AND intitule = ?";
72
+		try
73
+		{
74
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
75
+			preparedStatement.setString(1, reponse1);
76
+			preparedStatement.setString(2, reponse2);
77
+			preparedStatement.setString(3, intitule);
78
+			preparedStatement.executeUpdate();
79
+
80
+			preparedStatement.close();
81
+		}
82
+		catch (SQLException e)
83
+		{
84
+			e.printStackTrace();
85
+		}
86
+	}
87
+
88
+	public void updateReponsesReponses(String intitule, String reponse1, String reponse2, int num_reponse)
89
+	{
90
+		String rq ="UPDATE reponses" +
91
+				" SET nom_cat = ?, reponse1 = ?, reponse2 = ?" +
92
+				" WHERE reponse1 = ? AND reponse2 = ?";
93
+		try
94
+		{
95
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
96
+			preparedStatement.setString(1, categorie);
97
+			preparedStatement.setString(2, newRep1);
98
+			preparedStatement.setString(3, newRep2);
99
+			preparedStatement.setString(4, oldRep1);
100
+			preparedStatement.setString(5, oldRep2);
101
+			preparedStatement.executeUpdate();
102
+
103
+			preparedStatement.close();
104
+		}
105
+		catch (SQLException e)
106
+		{
107
+			e.printStackTrace();
108
+		}
109
+	}
110
+
68 111
 	public ArrayList<Question> getListeQuestions() {
69 112
 		return listeQuestions;
70 113
 	}

+ 1
- 1
java/src/GestionReponses.java 查看文件

@@ -82,7 +82,7 @@ public class GestionReponses
82 82
 		}
83 83
 	}
84 84
 
85
-	public void updateReponsesReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
85
+	public void updateReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
86 86
 	{
87 87
 		String rq ="UPDATE reponses" +
88 88
 				" SET nom_cat = ?, reponse1 = ?, reponse2 = ?" +

+ 16
- 2
java/src/InterfacePrincipale.java 查看文件

@@ -510,7 +510,7 @@ public class InterfacePrincipale extends JFrame
510 510
 		{
511 511
 			if(listR.isSelectionEmpty())
512 512
 			{
513
-				statusText.setText("Veuillez selectioner une catégorie.");
513
+				statusText.setText("Veuillez selectioner une sous-catégorie.");
514 514
 				return;
515 515
 			}
516 516
 
@@ -529,7 +529,21 @@ public class InterfacePrincipale extends JFrame
529 529
 			}
530 530
 			else if(e.getSource() == delQ)
531 531
 			{
532
-				statusText.setText("Supression de question");
532
+				JOptionPane jop = new JOptionPane();
533
+
534
+				Question q = (Question) listQ.getSelectedValue();
535
+
536
+				if(q == null)
537
+				{
538
+					statusText.setText("Veuiller d'abord selectionner une question.");
539
+					return;
540
+				}
541
+
542
+				if(jop.showConfirmDialog(null,"Voulez vous vraiment supprimer la question " + q.getIntitule() + " ?", "Supression de question", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
543
+				{
544
+					bdd.deleteQuestion(q.getIntitule(), q.getReponse1(), q.getReponse2());
545
+					listQ.setListData(bdd.getListeQuestions(q.getReponse1(), q.getReponse2()).toArray());
546
+				}
533 547
 			}
534 548
 			else if(e.getSource() == editQ)
535 549
 			{