Explorar el Código

++ gestion reponsesV4

PCYoshi hace 9 años
padre
commit
b752e3320b

+ 149
- 103
java/.idea/workspace.xml Ver fichero

@@ -6,19 +6,17 @@
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 reponsesV3">
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/GestionQuestions.class" afterPath="$PROJECT_DIR$/out/production/java/GestionQuestions.class" />
13
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionReponses.class" afterPath="$PROJECT_DIR$/out/production/java/GestionReponses.class" />
14
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
15
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
16
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/Question.class" afterPath="$PROJECT_DIR$/out/production/java/Question.class" />
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="" />
17 16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
18 17
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionQuestions.java" afterPath="$PROJECT_DIR$/src/GestionQuestions.java" />
19 18
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
20 19
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
21
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Question.java" afterPath="$PROJECT_DIR$/src/Question.java" />
22 20
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
23 21
     </list>
24 22
     <ignored path="java.iws" />
@@ -41,13 +39,20 @@
41 39
   </component>
42 40
   <component name="FileEditorManager">
43 41
     <leaf>
44
-      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="false">
42
+      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
45 43
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
46 44
           <provider selected="true" editor-type-id="text-editor">
47
-            <state vertical-scroll-proportion="0.0">
48
-              <caret line="469" column="42" selection-start-line="469" selection-start-column="42" selection-end-line="469" selection-end-column="42" />
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" />
49 47
               <folding>
50 48
                 <element signature="imports" expanded="true" />
49
+                <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
50
+                <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
51
+                <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
+                <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
55
+                <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
51 56
               </folding>
52 57
             </state>
53 58
           </provider>
@@ -57,7 +62,7 @@
57 62
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
58 63
           <provider selected="true" editor-type-id="text-editor">
59 64
             <state vertical-scroll-proportion="0.0">
60
-              <caret line="92" column="52" selection-start-line="92" selection-start-column="52" selection-end-line="92" selection-end-column="52" />
65
+              <caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
61 66
               <folding>
62 67
                 <element signature="imports" expanded="true" />
63 68
                 <element signature="e#1239#1240#0" expanded="true" />
@@ -75,7 +80,7 @@
75 80
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
76 81
           <provider selected="true" editor-type-id="text-editor">
77 82
             <state vertical-scroll-proportion="0.0">
78
-              <caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" />
83
+              <caret line="47" column="5" selection-start-line="47" selection-start-column="5" selection-end-line="47" selection-end-column="5" />
79 84
               <folding>
80 85
                 <element signature="imports" expanded="true" />
81 86
                 <element signature="e#2635#2636#0" expanded="true" />
@@ -85,51 +90,45 @@
85 90
           </provider>
86 91
         </entry>
87 92
       </file>
88
-      <file leaf-file-name="GestionQuestions.java" pinned="false" current-in-tab="true">
93
+      <file leaf-file-name="GestionQuestions.java" pinned="false" current-in-tab="false">
89 94
         <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
90 95
           <provider selected="true" editor-type-id="text-editor">
91
-            <state vertical-scroll-proportion="0.56160456">
92
-              <caret line="34" column="165" selection-start-line="34" selection-start-column="165" selection-end-line="34" selection-end-column="165" />
96
+            <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" />
93 98
               <folding>
94 99
                 <element signature="imports" expanded="true" />
95
-                <element signature="e#1151#1152#0" expanded="true" />
96
-                <element signature="e#1179#1180#0" expanded="true" />
100
+                <element signature="e#1748#1749#0" expanded="true" />
101
+                <element signature="e#1776#1777#0" expanded="true" />
97 102
               </folding>
98 103
             </state>
99 104
           </provider>
100 105
         </entry>
101 106
       </file>
102
-      <file leaf-file-name="Question.java" pinned="false" current-in-tab="false">
103
-        <entry file="file://$PROJECT_DIR$/src/Question.java">
107
+      <file leaf-file-name="NouvelleQuestionDialog.java" pinned="false" current-in-tab="false">
108
+        <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
104 109
           <provider selected="true" editor-type-id="text-editor">
105 110
             <state vertical-scroll-proportion="0.0">
106
-              <caret line="52" column="26" selection-start-line="52" selection-start-column="26" selection-end-line="52" selection-end-column="26" />
111
+              <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
107 112
               <folding>
108
-                <element signature="e#359#360#0" expanded="true" />
109
-                <element signature="e#381#382#0" expanded="true" />
110
-                <element signature="e#426#427#0" expanded="true" />
111
-                <element signature="e#457#458#0" expanded="true" />
112
-                <element signature="e#489#490#0" expanded="true" />
113
-                <element signature="e#511#512#0" expanded="true" />
114
-                <element signature="e#556#557#0" expanded="true" />
115
-                <element signature="e#587#588#0" expanded="true" />
116
-                <element signature="e#619#620#0" expanded="true" />
117
-                <element signature="e#641#642#0" expanded="true" />
118
-                <element signature="e#686#687#0" expanded="true" />
119
-                <element signature="e#717#718#0" expanded="true" />
120
-                <element signature="e#745#746#0" expanded="true" />
121
-                <element signature="e#766#767#0" expanded="true" />
122
-                <element signature="e#806#807#0" expanded="true" />
123
-                <element signature="e#835#836#0" expanded="true" />
113
+                <element signature="imports" expanded="true" />
114
+                <element signature="e#1953#1954#0" expanded="true" />
115
+                <element signature="e#1985#1986#0" expanded="true" />
116
+                <element signature="e#2013#2014#0" expanded="true" />
117
+                <element signature="e#2053#2054#0" expanded="true" />
124 118
               </folding>
125 119
             </state>
126 120
           </provider>
127 121
         </entry>
128 122
       </file>
129
-      <file leaf-file-name="mcd.png" pinned="false" current-in-tab="false">
130
-        <entry file="file://$PROJECT_DIR$/mcd.png">
131
-          <provider selected="true" editor-type-id="images">
132
-            <state />
123
+      <file leaf-file-name="NouvelleReponseDialog.java" pinned="false" current-in-tab="false">
124
+        <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
125
+          <provider selected="true" editor-type-id="text-editor">
126
+            <state vertical-scroll-proportion="0.0">
127
+              <caret line="48" column="37" selection-start-line="48" selection-start-column="37" selection-end-line="48" selection-end-column="37" />
128
+              <folding>
129
+                <element signature="imports" expanded="true" />
130
+              </folding>
131
+            </state>
133 132
           </provider>
134 133
         </entry>
135 134
       </file>
@@ -164,10 +163,11 @@
164 163
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
165 164
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
166 165
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
167
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
168
-        <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
169 166
         <option value="$PROJECT_DIR$/src/Question.java" />
167
+        <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
170 168
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
169
+        <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
170
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
171 171
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
172 172
       </list>
173 173
     </option>
@@ -730,7 +730,13 @@
730 730
       <option name="project" value="LOCAL" />
731 731
       <updated>1433236557607</updated>
732 732
     </task>
733
-    <option name="localTasksCounter" value="18" />
733
+    <task id="LOCAL-00018" summary="++ gestion reponsesV3">
734
+      <created>1433247288224</created>
735
+      <option name="number" value="00018" />
736
+      <option name="project" value="LOCAL" />
737
+      <updated>1433247288224</updated>
738
+    </task>
739
+    <option name="localTasksCounter" value="19" />
734 740
     <servers />
735 741
   </component>
736 742
   <component name="TodoView">
@@ -744,7 +750,7 @@
744 750
   </component>
745 751
   <component name="ToolWindowManager">
746 752
     <frame x="-1" y="27" width="1368" height="712" extended-state="6" />
747
-    <editor active="false" />
753
+    <editor active="true" />
748 754
     <layout>
749 755
       <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" />
750 756
       <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" />
@@ -755,12 +761,12 @@
755 761
       <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" />
756 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" />
757 763
       <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" />
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="8" side_tool="false" content_ui="tabs" />
759
-      <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32864675" sideWeight="0.5" order="10" side_tool="false" 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" />
760 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" />
761 767
       <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" />
762 768
       <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" />
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="9" 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" />
764 770
       <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" />
765 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" />
766 772
       <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" />
@@ -800,11 +806,12 @@
800 806
     <MESSAGE value="++ gestion reponses" />
801 807
     <MESSAGE value="++ gestion reponsesV2" />
802 808
     <MESSAGE value="++ gestion reponsesV3" />
803
-    <option name="LAST_COMMIT_MESSAGE" value="++ gestion reponsesV3" />
809
+    <MESSAGE value="++ gestion reponsesV4" />
810
+    <option name="LAST_COMMIT_MESSAGE" value="++ gestion reponsesV4" />
804 811
   </component>
805 812
   <component name="XDebuggerManager">
806 813
     <breakpoint-manager>
807
-      <option name="time" value="5" />
814
+      <option name="time" value="6" />
808 815
     </breakpoint-manager>
809 816
     <watches-manager />
810 817
   </component>
@@ -813,13 +820,6 @@
813 820
     <option name="FILTER_TARGETS" value="false" />
814 821
   </component>
815 822
   <component name="editorHistoryManager">
816
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
817
-      <provider selected="true" editor-type-id="text-editor">
818
-        <state vertical-scroll-proportion="0.0">
819
-          <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
820
-        </state>
821
-      </provider>
822
-    </entry>
823 823
     <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
824 824
       <provider selected="true" editor-type-id="text-editor">
825 825
         <state vertical-scroll-proportion="0.0">
@@ -857,6 +857,13 @@
857 857
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
858 858
           <folding>
859 859
             <element signature="imports" expanded="true" />
860
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
861
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
862
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
866
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
860 867
           </folding>
861 868
         </state>
862 869
       </provider>
@@ -891,6 +898,13 @@
891 898
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
892 899
           <folding>
893 900
             <element signature="imports" expanded="true" />
901
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
902
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
903
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
907
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
894 908
           </folding>
895 909
         </state>
896 910
       </provider>
@@ -925,6 +939,13 @@
925 939
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
926 940
           <folding>
927 941
             <element signature="imports" expanded="true" />
942
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
943
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
944
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
948
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
928 949
           </folding>
929 950
         </state>
930 951
       </provider>
@@ -959,6 +980,13 @@
959 980
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
960 981
           <folding>
961 982
             <element signature="imports" expanded="true" />
983
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
984
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
985
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
989
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
962 990
           </folding>
963 991
         </state>
964 992
       </provider>
@@ -993,6 +1021,13 @@
993 1021
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
994 1022
           <folding>
995 1023
             <element signature="imports" expanded="true" />
1024
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1025
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1026
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1030
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
996 1031
           </folding>
997 1032
         </state>
998 1033
       </provider>
@@ -1048,6 +1083,13 @@
1048 1083
           <caret line="0" column="21" selection-start-line="0" selection-start-column="21" selection-end-line="0" selection-end-column="21" />
1049 1084
           <folding>
1050 1085
             <element signature="imports" expanded="true" />
1086
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1087
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1088
+            <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
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1092
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1051 1093
           </folding>
1052 1094
         </state>
1053 1095
       </provider>
@@ -1131,92 +1173,96 @@
1131 1173
         </state>
1132 1174
       </provider>
1133 1175
     </entry>
1134
-    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1176
+    <entry file="file://$PROJECT_DIR$/mcd.png">
1177
+      <provider selected="true" editor-type-id="images">
1178
+        <state />
1179
+      </provider>
1180
+    </entry>
1181
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1135 1182
       <provider selected="true" editor-type-id="text-editor">
1136 1183
         <state vertical-scroll-proportion="0.0">
1137
-          <caret line="92" column="52" selection-start-line="92" selection-start-column="52" selection-end-line="92" selection-end-column="52" />
1184
+          <caret line="48" column="37" selection-start-line="48" selection-start-column="37" selection-end-line="48" selection-end-column="37" />
1138 1185
           <folding>
1139 1186
             <element signature="imports" expanded="true" />
1140
-            <element signature="e#1239#1240#0" expanded="true" />
1141
-            <element signature="e#1294#1295#0" expanded="true" />
1142
-            <element signature="e#1349#1350#0" expanded="true" />
1143
-            <element signature="e#1404#1405#0" expanded="true" />
1144
-            <element signature="e#1960#1961#0" expanded="true" />
1145
-            <element signature="e#2017#2018#0" expanded="true" />
1146 1187
           </folding>
1147 1188
         </state>
1148 1189
       </provider>
1149 1190
     </entry>
1150
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1191
+    <entry file="file://$PROJECT_DIR$/src/Question.java">
1192
+      <provider selected="true" editor-type-id="text-editor">
1193
+        <state vertical-scroll-proportion="0.46082088">
1194
+          <caret line="52" column="26" selection-start-line="52" selection-start-column="26" selection-end-line="52" selection-end-column="26" />
1195
+          <folding />
1196
+        </state>
1197
+      </provider>
1198
+    </entry>
1199
+    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1151 1200
       <provider selected="true" editor-type-id="text-editor">
1152 1201
         <state vertical-scroll-proportion="0.0">
1153
-          <caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" />
1202
+          <caret line="47" column="98" selection-start-line="47" selection-start-column="30" selection-end-line="47" selection-end-column="98" />
1154 1203
           <folding>
1155 1204
             <element signature="imports" expanded="true" />
1156
-            <element signature="e#2635#2636#0" expanded="true" />
1157
-            <element signature="e#2661#2662#0" expanded="true" />
1205
+            <element signature="e#1748#1749#0" expanded="true" />
1206
+            <element signature="e#1776#1777#0" expanded="true" />
1158 1207
           </folding>
1159 1208
         </state>
1160 1209
       </provider>
1161 1210
     </entry>
1162
-    <entry file="file://$PROJECT_DIR$/mcd.png">
1163
-      <provider selected="true" editor-type-id="images">
1164
-        <state />
1165
-      </provider>
1166
-    </entry>
1167
-    <entry file="file://$PROJECT_DIR$/src/Question.java">
1211
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1168 1212
       <provider selected="true" editor-type-id="text-editor">
1169 1213
         <state vertical-scroll-proportion="0.0">
1170
-          <caret line="52" column="26" selection-start-line="52" selection-start-column="26" selection-end-line="52" selection-end-column="26" />
1214
+          <caret line="47" column="5" selection-start-line="47" selection-start-column="5" selection-end-line="47" selection-end-column="5" />
1171 1215
           <folding>
1172
-            <element signature="e#359#360#0" expanded="true" />
1173
-            <element signature="e#381#382#0" expanded="true" />
1174
-            <element signature="e#426#427#0" expanded="true" />
1175
-            <element signature="e#457#458#0" expanded="true" />
1176
-            <element signature="e#489#490#0" expanded="true" />
1177
-            <element signature="e#511#512#0" expanded="true" />
1178
-            <element signature="e#556#557#0" expanded="true" />
1179
-            <element signature="e#587#588#0" expanded="true" />
1180
-            <element signature="e#619#620#0" expanded="true" />
1181
-            <element signature="e#641#642#0" expanded="true" />
1182
-            <element signature="e#686#687#0" expanded="true" />
1183
-            <element signature="e#717#718#0" expanded="true" />
1184
-            <element signature="e#745#746#0" expanded="true" />
1185
-            <element signature="e#766#767#0" expanded="true" />
1186
-            <element signature="e#806#807#0" expanded="true" />
1187
-            <element signature="e#835#836#0" expanded="true" />
1216
+            <element signature="imports" expanded="true" />
1217
+            <element signature="e#2635#2636#0" expanded="true" />
1218
+            <element signature="e#2661#2662#0" expanded="true" />
1188 1219
           </folding>
1189 1220
         </state>
1190 1221
       </provider>
1191 1222
     </entry>
1192
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1223
+    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1193 1224
       <provider selected="true" editor-type-id="text-editor">
1194
-        <state vertical-scroll-proportion="0.28544775">
1195
-          <caret line="9" column="23" selection-start-line="9" selection-start-column="23" selection-end-line="9" selection-end-column="23" />
1225
+        <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" />
1196 1227
           <folding>
1197 1228
             <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" />
1198 1235
           </folding>
1199 1236
         </state>
1200 1237
       </provider>
1201 1238
     </entry>
1202
-    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1239
+    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1203 1240
       <provider selected="true" editor-type-id="text-editor">
1204 1241
         <state vertical-scroll-proportion="0.0">
1205
-          <caret line="469" column="42" selection-start-line="469" selection-start-column="42" selection-end-line="469" selection-end-column="42" />
1242
+          <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
1206 1243
           <folding>
1207 1244
             <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" />
1208 1249
           </folding>
1209 1250
         </state>
1210 1251
       </provider>
1211 1252
     </entry>
1212
-    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1253
+    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1213 1254
       <provider selected="true" editor-type-id="text-editor">
1214
-        <state vertical-scroll-proportion="0.56160456">
1215
-          <caret line="34" column="165" selection-start-line="34" selection-start-column="165" selection-end-line="34" selection-end-column="165" />
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" />
1216 1257
           <folding>
1217 1258
             <element signature="imports" expanded="true" />
1218
-            <element signature="e#1151#1152#0" expanded="true" />
1219
-            <element signature="e#1179#1180#0" 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" />
1220 1266
           </folding>
1221 1267
         </state>
1222 1268
       </provider>

BIN
java/out/production/java/ConnexionBDD.class Ver fichero


BIN
java/out/production/java/GestionQuestions.class Ver fichero


BIN
java/out/production/java/InterfacePrincipale$PanQuestionsListener.class Ver fichero


BIN
java/out/production/java/InterfacePrincipale$PanReponsesListener.class Ver fichero


+ 5
- 0
java/src/ConnexionBDD.java Ver fichero

@@ -92,4 +92,9 @@ public class ConnexionBDD
92 92
 		gestionQuestions.readQuestions(reponse1, reponse2);
93 93
 		return gestionQuestions.getListeQuestions();
94 94
 	}
95
+
96
+	public void createQuestion(String intitule, String reponse1, String reponse2, int num_reponse)
97
+	{
98
+		gestionQuestions.createQuestion(intitule, reponse1, reponse2, num_reponse);
99
+	}
95 100
 }

+ 20
- 0
java/src/GestionQuestions.java Ver fichero

@@ -45,6 +45,26 @@ public class GestionQuestions
45 45
 		}
46 46
 	}
47 47
 
48
+	public void createQuestion(String intitule, String reponse1, String reponse2, int num_reponse)
49
+	{
50
+		String rq = "INSERT INTO reponses(intitule, reponse1, reponse2, num_reponse)" +
51
+				" VALUES(?, ?, ?, ?)";
52
+		try
53
+		{
54
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
55
+			preparedStatement.setString(1, intitule);
56
+			preparedStatement.setString(2, reponse1);
57
+			preparedStatement.setString(3, reponse2);
58
+			preparedStatement.setInt(4, num_reponse);
59
+			preparedStatement.executeUpdate();
60
+
61
+			preparedStatement.close();
62
+		}
63
+		catch (SQLException e) {
64
+			e.printStackTrace();
65
+		}
66
+	}
67
+
48 68
 	public ArrayList<Question> getListeQuestions() {
49 69
 		return listeQuestions;
50 70
 	}

+ 30
- 4
java/src/InterfacePrincipale.java Ver fichero

@@ -302,6 +302,23 @@ public class InterfacePrincipale extends JFrame
302 302
 		}
303 303
 	}
304 304
 
305
+	private void reSelectQuestion(String intitule)
306
+	{
307
+		Reponses r = (Reponses) listR.getSelectedValue();
308
+		Object[] tabObject = bdd.getListeQuestions(r.getReponse1(), r.getReponse2()).toArray();
309
+		Question[] tabQuestions = Arrays.copyOf(tabObject, tabObject.length, Question[].class);
310
+		listQ.setListData(tabQuestions);
311
+
312
+		for(int i=0; i<tabQuestions.length; i++)
313
+		{
314
+			if(tabQuestions[i].getIntitule().equals(intitule))
315
+			{
316
+				listQ.setSelectedValue(tabQuestions[i], true);
317
+				break;
318
+			}
319
+		}
320
+	}
321
+
305 322
 	private String[] getCategorieList()
306 323
 	{
307 324
 		ListModel model = listC.getModel();
@@ -339,7 +356,7 @@ public class InterfacePrincipale extends JFrame
339 356
 				}
340 357
 
341 358
 				bdd.createCategorie(catName);
342
-				listC.setListData(bdd.getListeCategorie().toArray());
359
+				//listC.setListData(bdd.getListeCategorie().toArray());
343 360
 				reSelectCategorie(catName);
344 361
 				listQ.setListData(new Vector(0));
345 362
 			}
@@ -426,7 +443,7 @@ public class InterfacePrincipale extends JFrame
426 443
 				{
427 444
 					String catName = listC.getSelectedValue().toString();
428 445
 					bdd.createReponses(catName, nrd.getRep1(), nrd.getRep2());
429
-					listR.setListData(bdd.getListeReponses(catName).toArray());
446
+					//listR.setListData(bdd.getListeReponses(catName).toArray());
430 447
 					reSelectReponses(nrd.getRep1(), nrd.getRep2());
431 448
 				}
432 449
 			}
@@ -470,7 +487,7 @@ public class InterfacePrincipale extends JFrame
470 487
 				if(nrd.afficher() == true)
471 488
 				{
472 489
 					bdd.modifyReponsesReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
473
-					listR.setListData(bdd.getListeReponses(catName).toArray());
490
+					//listR.setListData(bdd.getListeReponses(catName).toArray());
474 491
 					reSelectCategorie(nrd.getCat());
475 492
 					reSelectReponses(nrd.getRep1(), nrd.getRep2());
476 493
 				}
@@ -499,7 +516,16 @@ public class InterfacePrincipale extends JFrame
499 516
 
500 517
 			if(e.getSource() == addQ)
501 518
 			{
502
-				statusText.setText("Création de question");
519
+				Reponses r = (Reponses) listR.getSelectedValue();
520
+				NouvelleQuestionDialog nqd = new NouvelleQuestionDialog("Nouvelle question", "",
521
+						0, r.getReponse1(),r.getReponse2(), null);
522
+
523
+				if(nqd.afficher() == true)
524
+				{
525
+					bdd.createQuestion(nqd.getIntitule(), r.getReponse1(), r.getReponse2(), nqd.getReponse());
526
+					//listQ.setListData(bdd.getListeQuestions(r.getReponse1(), r.getReponse2()));
527
+					reSelectQuestion(nqd.getIntitule());
528
+				}
503 529
 			}
504 530
 			else if(e.getSource() == delQ)
505 531
 			{

+ 86
- 0
java/src/NouvelleQuestionDialog.java Ver fichero

@@ -0,0 +1,86 @@
1
+import javax.swing.*;
2
+import java.awt.*;
3
+import java.awt.event.ActionEvent;
4
+import java.awt.event.ActionListener;
5
+
6
+public class NouvelleQuestionDialog extends JDialog implements ActionListener
7
+{
8
+	private JTextField intitule;
9
+	private JButton ok;
10
+	private JButton annuler;
11
+	private boolean mofidEffectues;
12
+	private JComboBox reponse;
13
+
14
+	public NouvelleQuestionDialog(String title, String defIntitule, int defReponse, String reponse1, String reponse2, JFrame parent)
15
+	{
16
+		super(parent, title, true);
17
+		createInterface(defIntitule, defReponse, reponse1, reponse2);
18
+		pack();
19
+		setLocationRelativeTo(null);
20
+	}
21
+
22
+	private void createInterface(String defIntitule, int defReponse, String reponse1, String reponse2)
23
+	{
24
+		JPanel champs = new JPanel();
25
+		JPanel boutons = new JPanel();
26
+
27
+		intitule = new JTextField(defIntitule, 15);
28
+		intitule.setBackground(Color.WHITE);
29
+
30
+		ok = new JButton("OK");
31
+		annuler = new JButton("Annuler");
32
+		ok.addActionListener(this);
33
+		annuler.addActionListener(this);
34
+
35
+		reponse = new JComboBox();
36
+		reponse.addItem("Les deux");
37
+		reponse.addItem(reponse1);
38
+		reponse.addItem(reponse2);
39
+		reponse.setSelectedIndex(defReponse);
40
+
41
+		GridLayout gridLayout = new GridLayout(2, 2);
42
+		champs.setLayout(gridLayout);
43
+		champs.add(new JLabel("Intitulé:"));
44
+		champs.add(intitule);
45
+		champs.add(new JLabel("Bonne réponse:"));
46
+		champs.add(reponse);
47
+
48
+		boutons.add(annuler);
49
+		boutons.add(ok);
50
+
51
+		getContentPane().setLayout(new BorderLayout());
52
+		getContentPane().add(champs, BorderLayout.CENTER);
53
+		getContentPane().add(boutons, BorderLayout.SOUTH);
54
+	}
55
+
56
+	public boolean afficher()
57
+	{
58
+		setVisible(true);
59
+		return mofidEffectues;
60
+	}
61
+
62
+	public void actionPerformed(ActionEvent e)
63
+	{
64
+		if(e.getSource() == annuler)
65
+		{
66
+			mofidEffectues = false;
67
+			setVisible(false);
68
+		}
69
+		else if(e.getSource() == ok) {
70
+			if(intitule.getText().isEmpty())
71
+			{
72
+				return;
73
+			}
74
+			mofidEffectues = true;
75
+			setVisible(false);
76
+		}
77
+	}
78
+
79
+	public String getIntitule() {
80
+		return intitule.getText();
81
+	}
82
+
83
+	public int getReponse() {
84
+		return reponse.getSelectedIndex();
85
+	}
86
+}

+ 4
- 4
java/src/NouvelleReponseDialog.java Ver fichero

@@ -20,7 +20,7 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
20 20
 		setLocationRelativeTo(null);
21 21
 	}
22 22
 
23
-	private void createInterface(String defRep1, String defRep2, String defCategorie, String[] tabCatrgorie)
23
+	private void createInterface(String defRep1, String defRep2, String defCategorie, String[] tabCategorie)
24 24
 	{
25 25
 		JPanel champs = new JPanel();
26 26
 		JPanel boutons = new JPanel();
@@ -47,10 +47,10 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
47 47
 		{
48 48
 			comboCat = new JComboBox();
49 49
 			comboCat.setOpaque(true);
50
-			for(int i=0; i<tabCatrgorie.length; i++)
50
+			for(int i=0; i< tabCategorie.length; i++)
51 51
 			{
52
-				comboCat.addItem(tabCatrgorie[i]);
53
-				if(tabCatrgorie[i].equals(defCategorie))
52
+				comboCat.addItem(tabCategorie[i]);
53
+				if(tabCategorie[i].equals(defCategorie))
54 54
 				{
55 55
 					comboCat.setSelectedIndex(i);
56 56
 				}