PCYoshi 9 年 前
コミット
15ee4a180d

+ 9
- 0
java/.idea/artifacts/java_jar.xml ファイルの表示

@@ -0,0 +1,9 @@
1
+<component name="ArtifactManager">
2
+  <artifact type="jar" name="java:jar">
3
+    <output-path>$PROJECT_DIR$/out/artifacts/java_jar</output-path>
4
+    <root id="archive" name="java.jar">
5
+      <element id="module-output" name="java" />
6
+      <element id="extracted-dir" path="$PROJECT_DIR$/lib/mysql-connector-java-5.1.35-bin.jar" path-in-jar="/" />
7
+    </root>
8
+  </artifact>
9
+</component>

+ 174
- 108
java/.idea/workspace.xml ファイルの表示

@@ -1,9 +1,24 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3
+  <component name="ArtifactsWorkspaceSettings">
4
+    <artifacts-to-build>
5
+      <artifact name="java:jar" />
6
+    </artifacts-to-build>
7
+  </component>
3 8
   <component name="ChangeListManager">
4 9
     <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
10
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" />
11
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
12
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/artifacts/java_jar.xml" />
5 13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" />
6
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionCategories.class" afterPath="$PROJECT_DIR$/out/production/java/GestionCategories.class" />
14
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionReponses.class" afterPath="$PROJECT_DIR$/out/production/java/GestionReponses.class" />
15
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanCategoriesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanCategoriesListener.class" />
16
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
17
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
18
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale.class" />
19
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
20
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
21
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
7 22
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
8 23
     </list>
9 24
     <ignored path="java.iws" />
@@ -29,23 +44,11 @@
29 44
       <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
30 45
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
31 46
           <provider selected="true" editor-type-id="text-editor">
32
-            <state vertical-scroll-proportion="0.22099447">
33
-              <caret line="340" column="71" selection-start-line="340" selection-start-column="71" selection-end-line="340" selection-end-column="71" />
47
+            <state vertical-scroll-proportion="0.5386819">
48
+              <caret line="368" column="13" selection-start-line="368" selection-start-column="13" selection-end-line="368" selection-end-column="13" />
34 49
               <folding>
35 50
                 <element signature="imports" expanded="true" />
36
-              </folding>
37
-            </state>
38
-          </provider>
39
-        </entry>
40
-      </file>
41
-      <file leaf-file-name="Categorie.java" pinned="false" current-in-tab="false">
42
-        <entry file="file://$PROJECT_DIR$/src/Categorie.java">
43
-          <provider selected="true" editor-type-id="text-editor">
44
-            <state vertical-scroll-proportion="0.0">
45
-              <caret line="5" column="4" selection-start-line="5" selection-start-column="4" selection-end-line="5" selection-end-column="4" />
46
-              <folding>
47
-                <element signature="e#80#81#0" expanded="true" />
48
-                <element signature="e#101#102#0" expanded="true" />
51
+                <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
49 52
               </folding>
50 53
             </state>
51 54
           </provider>
@@ -55,7 +58,7 @@
55 58
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
56 59
           <provider selected="true" editor-type-id="text-editor">
57 60
             <state vertical-scroll-proportion="0.0">
58
-              <caret line="63" column="76" selection-start-line="63" selection-start-column="76" selection-end-line="63" selection-end-column="76" />
61
+              <caret line="69" column="44" selection-start-line="69" selection-start-column="44" selection-end-line="69" selection-end-column="44" />
59 62
               <folding>
60 63
                 <element signature="imports" expanded="true" />
61 64
                 <element signature="e#1239#1240#0" expanded="true" />
@@ -71,7 +74,7 @@
71 74
         <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
72 75
           <provider selected="true" editor-type-id="text-editor">
73 76
             <state vertical-scroll-proportion="0.0">
74
-              <caret line="80" column="18" selection-start-line="80" selection-start-column="18" selection-end-line="80" selection-end-column="18" />
77
+              <caret line="15" column="52" selection-start-line="15" selection-start-column="52" selection-end-line="15" selection-end-column="52" />
75 78
               <folding>
76 79
                 <element signature="imports" expanded="true" />
77 80
                 <element signature="e#2067#2068#0" expanded="true" />
@@ -81,6 +84,41 @@
81 84
           </provider>
82 85
         </entry>
83 86
       </file>
87
+      <file leaf-file-name="GestionReponses.java" pinned="false" current-in-tab="false">
88
+        <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
89
+          <provider selected="true" editor-type-id="text-editor">
90
+            <state vertical-scroll-proportion="0.0">
91
+              <caret line="20" column="31" selection-start-line="20" selection-start-column="31" selection-end-line="20" selection-end-column="31" />
92
+              <folding>
93
+                <element signature="imports" expanded="true" />
94
+                <element signature="e#996#997#0" expanded="true" />
95
+                <element signature="e#1022#1023#0" expanded="true" />
96
+              </folding>
97
+            </state>
98
+          </provider>
99
+        </entry>
100
+      </file>
101
+      <file leaf-file-name="Reponses.java" pinned="false" current-in-tab="false">
102
+        <entry file="file://$PROJECT_DIR$/src/Reponses.java">
103
+          <provider selected="true" editor-type-id="text-editor">
104
+            <state vertical-scroll-proportion="0.0">
105
+              <caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
106
+              <folding>
107
+                <element signature="e#223#224#0" expanded="true" />
108
+                <element signature="e#245#246#0" expanded="true" />
109
+                <element signature="e#290#291#0" expanded="true" />
110
+                <element signature="e#321#322#0" expanded="true" />
111
+                <element signature="e#353#354#0" expanded="true" />
112
+                <element signature="e#375#376#0" expanded="true" />
113
+                <element signature="e#420#421#0" expanded="true" />
114
+                <element signature="e#451#452#0" expanded="true" />
115
+                <element signature="e#480#481#0" expanded="true" />
116
+                <element signature="e#539#540#0" expanded="true" />
117
+              </folding>
118
+            </state>
119
+          </provider>
120
+        </entry>
121
+      </file>
84 122
       <file leaf-file-name="mcd.png" pinned="false" current-in-tab="false">
85 123
         <entry file="file://$PROJECT_DIR$/mcd.png">
86 124
           <provider selected="true" editor-type-id="images">
@@ -119,9 +157,10 @@
119 157
         <option value="$PROJECT_DIR$/src/Question.java" />
120 158
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
121 159
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
122
-        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
123
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
124 160
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
161
+        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
162
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
163
+        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
125 164
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
126 165
       </list>
127 166
     </option>
@@ -153,18 +192,33 @@
153 192
             <id>Android Lint</id>
154 193
           </State>
155 194
           <State>
195
+            <id>Ant inspections</id>
196
+          </State>
197
+          <State>
156 198
             <id>Assignment issuesGroovy</id>
157 199
           </State>
158 200
           <State>
159 201
             <id>Assignment issuesJava</id>
160 202
           </State>
161 203
           <State>
204
+            <id>Code style issuesJava</id>
205
+          </State>
206
+          <State>
162 207
             <id>Control flow issuesJava</id>
163 208
           </State>
164 209
           <State>
210
+            <id>Encapsulation issuesJava</id>
211
+          </State>
212
+          <State>
165 213
             <id>Groovy</id>
166 214
           </State>
167 215
           <State>
216
+            <id>Initialization issuesJava</id>
217
+          </State>
218
+          <State>
219
+            <id>Internationalization issues</id>
220
+          </State>
221
+          <State>
168 222
             <id>Java</id>
169 223
           </State>
170 224
           <State>
@@ -180,12 +234,18 @@
180 234
             <id>Spelling</id>
181 235
           </State>
182 236
           <State>
237
+            <id>TestNG</id>
238
+          </State>
239
+          <State>
183 240
             <id>Threading issuesGroovy</id>
184 241
           </State>
185 242
           <State>
186 243
             <id>Threading issuesJava</id>
187 244
           </State>
188 245
           <State>
246
+            <id>Visibility issuesJava</id>
247
+          </State>
248
+          <State>
189 249
             <id>XPath</id>
190 250
           </State>
191 251
         </expanded-state>
@@ -220,6 +280,9 @@
220 280
       <sortByType />
221 281
     </navigator>
222 282
     <panes>
283
+      <pane id="PackagesPane" />
284
+      <pane id="Scratches" />
285
+      <pane id="Scope" />
223 286
       <pane id="ProjectPane">
224 287
         <subPane>
225 288
           <PATH>
@@ -254,23 +317,27 @@
254 317
           </PATH>
255 318
         </subPane>
256 319
       </pane>
257
-      <pane id="Scope" />
258
-      <pane id="PackagesPane" />
259
-      <pane id="Scratches" />
260 320
     </panes>
261 321
   </component>
262 322
   <component name="PropertiesComponent">
263 323
     <property name="recentsLimit" value="5" />
264 324
     <property name="FullScreen" value="false" />
265
-    <property name="settings.editor.selected.configurable" value="Errors" />
325
+    <property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Font" />
266 326
     <property name="settings.editor.splitter.proportion" value="0.2" />
267 327
     <property name="dynamic.classpath" value="false" />
268 328
     <property name="restartRequiresConfirmation" value="true" />
269 329
     <property name="OverrideImplement.combined" value="true" />
270 330
     <property name="OverrideImplement.overriding.sorted" value="false" />
271
-    <property name="project.structure.last.edited" value="Modules" />
272
-    <property name="project.structure.proportion" value="0.0" />
273
-    <property name="project.structure.side.proportion" value="0.0" />
331
+    <property name="project.structure.last.edited" value="Artifacts" />
332
+    <property name="project.structure.proportion" value="0.15" />
333
+    <property name="project.structure.side.proportion" value="0.2" />
334
+    <property name="GenerateAntBuildDialog.generateSingleFile" value="false" />
335
+    <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
336
+    <property name="GenerateAntBuildDialog.forceTargetJdk" value="true" />
337
+    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
338
+    <property name="GenerateAntBuildDialog.inclineRuntiemClasspath" value="false" />
339
+    <property name="GenerateAntBuildDialog.generateIdeaHomeProperty" value="false" />
340
+    <property name="GenerateAntBuildDialog.outputFileNameProperty" value="java" />
274 341
   </component>
275 342
   <component name="RecentsManager">
276 343
     <key name="ExtractSuperBase.RECENT_KEYS">
@@ -291,11 +358,7 @@
291 358
           <option name="mySupportsDeletion" value="false" />
292 359
           <option name="myCanBeAbsent" value="false" />
293 360
           <option name="myId" value="UPDATED" />
294
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/index.php</PATH>
295
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/model/class.categorie.php</PATH>
296
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/model/class.connector.php</PATH>
297
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/model/class.score.php</PATH>
298
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/tests.php</PATH>
361
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/controller/questions.php</PATH>
299 362
         </FILE-GROUP>
300 363
         <FILE-GROUP>
301 364
           <option name="myUpdateName" value="Created" />
@@ -303,8 +366,9 @@
303 366
           <option name="mySupportsDeletion" value="false" />
304 367
           <option name="myCanBeAbsent" value="false" />
305 368
           <option name="myId" value="CREATED" />
306
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/controller/palmares.php</PATH>
307
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/controller/questions.php</PATH>
369
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/index.htm</PATH>
370
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/jquery-2.1.4.min.js</PATH>
371
+          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/js/game.js</PATH>
308 372
         </FILE-GROUP>
309 373
         <FILE-GROUP>
310 374
           <option name="myUpdateName" value="Deleted" />
@@ -312,8 +376,6 @@
312 376
           <option name="mySupportsDeletion" value="false" />
313 377
           <option name="myCanBeAbsent" value="true" />
314 378
           <option name="myId" value="REMOVED_FROM_REPOSITORY" />
315
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/view/palmares.php</PATH>
316
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/api/view/questions.php</PATH>
317 379
         </FILE-GROUP>
318 380
         <FILE-GROUP>
319 381
           <option name="myUpdateName" value="Restored" />
@@ -632,7 +694,13 @@
632 694
       <option name="project" value="LOCAL" />
633 695
       <updated>1432894050823</updated>
634 696
     </task>
635
-    <option name="localTasksCounter" value="13" />
697
+    <task id="LOCAL-00013" summary="java: gestion categorie operationelle et ergonomique">
698
+      <created>1432894061411</created>
699
+      <option name="number" value="00013" />
700
+      <option name="project" value="LOCAL" />
701
+      <updated>1432894061411</updated>
702
+    </task>
703
+    <option name="localTasksCounter" value="14" />
636 704
     <servers />
637 705
   </component>
638 706
   <component name="TodoView">
@@ -657,20 +725,20 @@
657 725
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3996479" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
658 726
       <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" />
659 727
       <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" />
660
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.49695587" order="7" side_tool="false" content_ui="tabs" />
728
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32864675" sideWeight="0.49695587" order="7" side_tool="false" content_ui="tabs" />
661 729
       <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="8" side_tool="false" content_ui="tabs" />
662 730
       <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="6" side_tool="false" content_ui="tabs" />
663 731
       <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" />
664 732
       <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" />
665 733
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
666 734
       <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" />
667
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30579966" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
735
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30579966" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
668 736
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
669 737
       <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" />
670 738
       <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" />
671 739
       <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" />
672
-      <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" />
673 740
       <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" />
741
+      <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" />
674 742
     </layout>
675 743
   </component>
676 744
   <component name="Vcs.Log.UiProperties">
@@ -701,7 +769,15 @@
701 769
   </component>
702 770
   <component name="XDebuggerManager">
703 771
     <breakpoint-manager>
704
-      <option name="time" value="3" />
772
+      <breakpoints>
773
+        <line-breakpoint enabled="true" type="java-line">
774
+          <url>file://$PROJECT_DIR$/src/InterfacePrincipale.java</url>
775
+          <line>282</line>
776
+          <properties />
777
+          <option name="timeStamp" value="3" />
778
+        </line-breakpoint>
779
+      </breakpoints>
780
+      <option name="time" value="4" />
705 781
     </breakpoint-manager>
706 782
     <watches-manager />
707 783
   </component>
@@ -710,27 +786,10 @@
710 786
     <option name="FILTER_TARGETS" value="false" />
711 787
   </component>
712 788
   <component name="editorHistoryManager">
713
-    <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
714
-      <provider selected="true" editor-type-id="text-editor">
715
-        <state vertical-scroll-proportion="0.0">
716
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
717
-          <folding>
718
-            <element signature="imports" expanded="true" />
719
-            <element signature="e#2067#2068#0" expanded="true" />
720
-            <element signature="e#2095#2096#0" expanded="true" />
721
-          </folding>
722
-        </state>
723
-      </provider>
724
-    </entry>
725 789
     <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
726 790
       <provider selected="true" editor-type-id="text-editor">
727 791
         <state vertical-scroll-proportion="0.0">
728 792
           <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
729
-          <folding>
730
-            <element signature="imports" expanded="true" />
731
-            <element signature="e#198#199#0" expanded="true" />
732
-            <element signature="e#219#220#0" expanded="true" />
733
-          </folding>
734 793
         </state>
735 794
       </provider>
736 795
     </entry>
@@ -738,9 +797,6 @@
738 797
       <provider selected="true" editor-type-id="text-editor">
739 798
         <state vertical-scroll-proportion="0.0">
740 799
           <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
741
-          <folding>
742
-            <element signature="imports" expanded="true" />
743
-          </folding>
744 800
         </state>
745 801
       </provider>
746 802
     </entry>
@@ -748,7 +804,6 @@
748 804
       <provider selected="true" editor-type-id="text-editor">
749 805
         <state vertical-scroll-proportion="0.0">
750 806
           <caret line="8" column="75" selection-start-line="8" selection-start-column="75" selection-end-line="8" selection-end-column="75" />
751
-          <folding />
752 807
         </state>
753 808
       </provider>
754 809
     </entry>
@@ -756,9 +811,6 @@
756 811
       <provider selected="true" editor-type-id="text-editor">
757 812
         <state vertical-scroll-proportion="0.0">
758 813
           <caret line="11" column="73" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="73" />
759
-          <folding>
760
-            <element signature="imports" expanded="true" />
761
-          </folding>
762 814
         </state>
763 815
       </provider>
764 816
     </entry>
@@ -778,6 +830,7 @@
778 830
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
779 831
           <folding>
780 832
             <element signature="imports" expanded="true" />
833
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
781 834
           </folding>
782 835
         </state>
783 836
       </provider>
@@ -786,7 +839,6 @@
786 839
       <provider selected="true" editor-type-id="text-editor">
787 840
         <state vertical-scroll-proportion="0.0">
788 841
           <caret line="14" column="4" selection-start-line="14" selection-start-column="4" selection-end-line="14" selection-end-column="4" />
789
-          <folding />
790 842
         </state>
791 843
       </provider>
792 844
     </entry>
@@ -794,9 +846,6 @@
794 846
       <provider selected="true" editor-type-id="text-editor">
795 847
         <state vertical-scroll-proportion="0.0">
796 848
           <caret line="13" column="10" selection-start-line="13" selection-start-column="10" selection-end-line="13" selection-end-column="10" />
797
-          <folding>
798
-            <element signature="imports" expanded="true" />
799
-          </folding>
800 849
         </state>
801 850
       </provider>
802 851
     </entry>
@@ -816,6 +865,7 @@
816 865
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
817 866
           <folding>
818 867
             <element signature="imports" expanded="true" />
868
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
819 869
           </folding>
820 870
         </state>
821 871
       </provider>
@@ -824,7 +874,6 @@
824 874
       <provider selected="true" editor-type-id="text-editor">
825 875
         <state vertical-scroll-proportion="0.0">
826 876
           <caret line="12" column="25" selection-start-line="12" selection-start-column="12" selection-end-line="12" selection-end-column="25" />
827
-          <folding />
828 877
         </state>
829 878
       </provider>
830 879
     </entry>
@@ -832,9 +881,6 @@
832 881
       <provider selected="true" editor-type-id="text-editor">
833 882
         <state vertical-scroll-proportion="0.0">
834 883
           <caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
835
-          <folding>
836
-            <element signature="imports" expanded="true" />
837
-          </folding>
838 884
         </state>
839 885
       </provider>
840 886
     </entry>
@@ -854,6 +900,7 @@
854 900
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
855 901
           <folding>
856 902
             <element signature="imports" expanded="true" />
903
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
857 904
           </folding>
858 905
         </state>
859 906
       </provider>
@@ -862,7 +909,6 @@
862 909
       <provider selected="true" editor-type-id="text-editor">
863 910
         <state vertical-scroll-proportion="0.0">
864 911
           <caret line="1" column="1" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
865
-          <folding />
866 912
         </state>
867 913
       </provider>
868 914
     </entry>
@@ -870,9 +916,6 @@
870 916
       <provider selected="true" editor-type-id="text-editor">
871 917
         <state vertical-scroll-proportion="0.0">
872 918
           <caret line="12" column="109" selection-start-line="12" selection-start-column="109" selection-end-line="12" selection-end-column="109" />
873
-          <folding>
874
-            <element signature="imports" expanded="true" />
875
-          </folding>
876 919
         </state>
877 920
       </provider>
878 921
     </entry>
@@ -892,6 +935,7 @@
892 935
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
893 936
           <folding>
894 937
             <element signature="imports" expanded="true" />
938
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
895 939
           </folding>
896 940
         </state>
897 941
       </provider>
@@ -900,7 +944,6 @@
900 944
       <provider selected="true" editor-type-id="text-editor">
901 945
         <state vertical-scroll-proportion="0.0">
902 946
           <caret line="1" column="1" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
903
-          <folding />
904 947
         </state>
905 948
       </provider>
906 949
     </entry>
@@ -908,9 +951,6 @@
908 951
       <provider selected="true" editor-type-id="text-editor">
909 952
         <state vertical-scroll-proportion="0.0">
910 953
           <caret line="12" column="109" selection-start-line="12" selection-start-column="109" selection-end-line="12" selection-end-column="109" />
911
-          <folding>
912
-            <element signature="imports" expanded="true" />
913
-          </folding>
914 954
         </state>
915 955
       </provider>
916 956
     </entry>
@@ -930,6 +970,7 @@
930 970
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
931 971
           <folding>
932 972
             <element signature="imports" expanded="true" />
973
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
933 974
           </folding>
934 975
         </state>
935 976
       </provider>
@@ -938,7 +979,6 @@
938 979
       <provider selected="true" editor-type-id="text-editor">
939 980
         <state vertical-scroll-proportion="0.0">
940 981
           <caret line="1" column="1" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
941
-          <folding />
942 982
         </state>
943 983
       </provider>
944 984
     </entry>
@@ -946,9 +986,6 @@
946 986
       <provider selected="true" editor-type-id="text-editor">
947 987
         <state vertical-scroll-proportion="0.0">
948 988
           <caret line="12" column="109" selection-start-line="12" selection-start-column="109" selection-end-line="12" selection-end-column="109" />
949
-          <folding>
950
-            <element signature="imports" expanded="true" />
951
-          </folding>
952 989
         </state>
953 990
       </provider>
954 991
     </entry>
@@ -989,6 +1026,7 @@
989 1026
           <caret line="0" column="21" selection-start-line="0" selection-start-column="21" selection-end-line="0" selection-end-column="21" />
990 1027
           <folding>
991 1028
             <element signature="imports" expanded="true" />
1029
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
992 1030
           </folding>
993 1031
         </state>
994 1032
       </provider>
@@ -1023,9 +1061,6 @@
1023 1061
       <provider selected="true" editor-type-id="text-editor">
1024 1062
         <state vertical-scroll-proportion="0.5719626">
1025 1063
           <caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
1026
-          <folding>
1027
-            <element signature="imports" expanded="true" />
1028
-          </folding>
1029 1064
         </state>
1030 1065
       </provider>
1031 1066
     </entry>
@@ -1033,7 +1068,6 @@
1033 1068
       <provider selected="true" editor-type-id="text-editor">
1034 1069
         <state vertical-scroll-proportion="0.6130031">
1035 1070
           <caret line="11" column="44" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="44" />
1036
-          <folding />
1037 1071
         </state>
1038 1072
       </provider>
1039 1073
     </entry>
@@ -1044,31 +1078,40 @@
1044 1078
         </state>
1045 1079
       </provider>
1046 1080
     </entry>
1047
-    <entry file="file://$PROJECT_DIR$/src/Reponses.java">
1081
+    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1048 1082
       <provider selected="true" editor-type-id="text-editor">
1049
-        <state vertical-scroll-proportion="0.23551401">
1050
-          <caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" />
1083
+        <state vertical-scroll-proportion="0.24930748">
1084
+          <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
1051 1085
         </state>
1052 1086
       </provider>
1053 1087
     </entry>
1054
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1088
+    <entry file="file://$PROJECT_DIR$/src/Categorie.java">
1055 1089
       <provider selected="true" editor-type-id="text-editor">
1056 1090
         <state vertical-scroll-proportion="0.0">
1057
-          <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
1091
+          <caret line="5" column="4" selection-start-line="5" selection-start-column="4" selection-end-line="5" selection-end-column="4" />
1058 1092
           <folding>
1059
-            <element signature="imports" expanded="true" />
1060
-            <element signature="e#198#199#0" expanded="true" />
1061
-            <element signature="e#219#220#0" expanded="true" />
1093
+            <element signature="e#80#81#0" expanded="true" />
1094
+            <element signature="e#101#102#0" expanded="true" />
1095
+            <element signature="e#128#129#0" expanded="true" />
1096
+            <element signature="e#145#146#0" expanded="true" />
1097
+            <element signature="e#180#181#0" expanded="true" />
1098
+            <element signature="e#201#202#0" expanded="true" />
1099
+            <element signature="e#230#231#0" expanded="true" />
1100
+            <element signature="e#247#248#0" expanded="true" />
1062 1101
           </folding>
1063 1102
         </state>
1064 1103
       </provider>
1065 1104
     </entry>
1066
-    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1105
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1067 1106
       <provider selected="true" editor-type-id="text-editor">
1068
-        <state vertical-scroll-proportion="0.24930748">
1069
-          <caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
1107
+        <state vertical-scroll-proportion="0.12686567">
1108
+          <caret line="8" column="28" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
1070 1109
           <folding>
1071 1110
             <element signature="imports" expanded="true" />
1111
+            <element signature="e#1535#1536#0" expanded="true" />
1112
+            <element signature="e#1563#1564#0" expanded="true" />
1113
+            <element signature="e#1591#1592#0" expanded="true" />
1114
+            <element signature="e#1619#1620#0" expanded="true" />
1072 1115
           </folding>
1073 1116
         </state>
1074 1117
       </provider>
@@ -1078,13 +1121,33 @@
1078 1121
         <state />
1079 1122
       </provider>
1080 1123
     </entry>
1081
-    <entry file="file://$PROJECT_DIR$/src/Categorie.java">
1124
+    <entry file="file://$PROJECT_DIR$/src/Reponses.java">
1082 1125
       <provider selected="true" editor-type-id="text-editor">
1083 1126
         <state vertical-scroll-proportion="0.0">
1084
-          <caret line="5" column="4" selection-start-line="5" selection-start-column="4" selection-end-line="5" selection-end-column="4" />
1127
+          <caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
1085 1128
           <folding>
1086
-            <element signature="e#80#81#0" expanded="true" />
1087
-            <element signature="e#101#102#0" expanded="true" />
1129
+            <element signature="e#223#224#0" expanded="true" />
1130
+            <element signature="e#245#246#0" expanded="true" />
1131
+            <element signature="e#290#291#0" expanded="true" />
1132
+            <element signature="e#321#322#0" expanded="true" />
1133
+            <element signature="e#353#354#0" expanded="true" />
1134
+            <element signature="e#375#376#0" expanded="true" />
1135
+            <element signature="e#420#421#0" expanded="true" />
1136
+            <element signature="e#451#452#0" expanded="true" />
1137
+            <element signature="e#480#481#0" expanded="true" />
1138
+            <element signature="e#539#540#0" expanded="true" />
1139
+          </folding>
1140
+        </state>
1141
+      </provider>
1142
+    </entry>
1143
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1144
+      <provider selected="true" editor-type-id="text-editor">
1145
+        <state vertical-scroll-proportion="0.0">
1146
+          <caret line="20" column="31" selection-start-line="20" selection-start-column="31" selection-end-line="20" selection-end-column="31" />
1147
+          <folding>
1148
+            <element signature="imports" expanded="true" />
1149
+            <element signature="e#996#997#0" expanded="true" />
1150
+            <element signature="e#1022#1023#0" expanded="true" />
1088 1151
           </folding>
1089 1152
         </state>
1090 1153
       </provider>
@@ -1092,7 +1155,7 @@
1092 1155
     <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1093 1156
       <provider selected="true" editor-type-id="text-editor">
1094 1157
         <state vertical-scroll-proportion="0.0">
1095
-          <caret line="80" column="18" selection-start-line="80" selection-start-column="18" selection-end-line="80" selection-end-column="18" />
1158
+          <caret line="15" column="52" selection-start-line="15" selection-start-column="52" selection-end-line="15" selection-end-column="52" />
1096 1159
           <folding>
1097 1160
             <element signature="imports" expanded="true" />
1098 1161
             <element signature="e#2067#2068#0" expanded="true" />
@@ -1104,7 +1167,7 @@
1104 1167
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1105 1168
       <provider selected="true" editor-type-id="text-editor">
1106 1169
         <state vertical-scroll-proportion="0.0">
1107
-          <caret line="63" column="76" selection-start-line="63" selection-start-column="76" selection-end-line="63" selection-end-column="76" />
1170
+          <caret line="69" column="44" selection-start-line="69" selection-start-column="44" selection-end-line="69" selection-end-column="44" />
1108 1171
           <folding>
1109 1172
             <element signature="imports" expanded="true" />
1110 1173
             <element signature="e#1239#1240#0" expanded="true" />
@@ -1117,10 +1180,11 @@
1117 1180
     </entry>
1118 1181
     <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1119 1182
       <provider selected="true" editor-type-id="text-editor">
1120
-        <state vertical-scroll-proportion="0.22099447">
1121
-          <caret line="340" column="71" selection-start-line="340" selection-start-column="71" selection-end-line="340" selection-end-column="71" />
1183
+        <state vertical-scroll-proportion="0.5386819">
1184
+          <caret line="368" column="13" selection-start-line="368" selection-start-column="13" selection-end-line="368" selection-end-column="13" />
1122 1185
           <folding>
1123 1186
             <element signature="imports" expanded="true" />
1187
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
1124 1188
           </folding>
1125 1189
         </state>
1126 1190
       </provider>
@@ -1131,10 +1195,12 @@
1131 1195
       <state key="ArtifactsStructureConfigurable.UI">
1132 1196
         <settings>
1133 1197
           <artifact-editor />
1198
+          <last-edited>java:jar</last-edited>
1134 1199
           <splitter-proportions>
1135 1200
             <option name="proportions">
1136 1201
               <list>
1137 1202
                 <option value="0.2" />
1203
+                <option value="0.5" />
1138 1204
               </list>
1139 1205
             </option>
1140 1206
           </splitter-proportions>

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


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


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


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


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


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


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

@@ -63,4 +63,11 @@ public class ConnexionBDD
63 63
 	{
64 64
 		gestionCategories.updateCategorie(oldCategorieName, newCategorieName);
65 65
 	}
66
+
67
+	//Gestion réponses
68
+	public ArrayList<Reponses> getListeReponses(String catName)
69
+	{
70
+		gestionReponses.readReponses(catName);
71
+		return gestionReponses.getListReponses();
72
+	}
66 73
 }

+ 37
- 0
java/src/GestionReponses.java ファイルの表示

@@ -1,4 +1,7 @@
1 1
 import java.sql.Connection;
2
+import java.sql.PreparedStatement;
3
+import java.sql.ResultSet;
4
+import java.sql.SQLException;
2 5
 import java.util.ArrayList;
3 6
 
4 7
 public class GestionReponses
@@ -9,5 +12,39 @@ public class GestionReponses
9 12
 	public GestionReponses(Connection bdd)
10 13
 	{
11 14
 		this.bdd = bdd;
15
+		listReponses = new ArrayList<Reponses>();
16
+	}
17
+
18
+	public void readReponses(String nomCategorie)
19
+	{
20
+		String rq = "SELECT *" +
21
+				" FROM reponses" +
22
+				" WHERE nom_cat = ?";
23
+		try
24
+		{
25
+			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
26
+			preparedStatement.setString(1, nomCategorie);
27
+			ResultSet resultat = preparedStatement.executeQuery();
28
+
29
+			listReponses.clear();
30
+
31
+			while(resultat.next())
32
+			{
33
+				listReponses.add(new Reponses(resultat.getString("reponse1"), resultat.getString("reponse2")));
34
+			}
35
+
36
+			resultat.close();
37
+			preparedStatement.close();
38
+
39
+		}
40
+		catch (SQLException e)
41
+		{
42
+			e.printStackTrace();
43
+		}
44
+	}
45
+
46
+	public ArrayList<Reponses> getListReponses()
47
+	{
48
+		return listReponses;
12 49
 	}
13 50
 }

+ 28
- 5
java/src/InterfacePrincipale.java ファイルの表示

@@ -1,6 +1,8 @@
1 1
 import javax.swing.*;
2 2
 import javax.swing.border.BevelBorder;
3 3
 import javax.swing.border.Border;
4
+import javax.swing.event.ListSelectionEvent;
5
+import javax.swing.event.ListSelectionListener;
4 6
 import java.awt.*;
5 7
 import java.awt.event.ActionEvent;
6 8
 import java.awt.event.ActionListener;
@@ -103,7 +105,7 @@ public class InterfacePrincipale extends JFrame
103 105
 	private void createStatusBar()
104 106
 	{
105 107
 		statusBar = new JPanel();
106
-		statusText = new JLabel("La licorne magique mange une tomate");
108
+		statusText = new JLabel("Application demarrée, connexion à la base de donné effective. ");
107 109
 
108 110
 		Border border = BorderFactory.createMatteBorder(3,0,0,0, new Color(220,220,220));
109 111
 		statusBar.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10,70,5,70),border));
@@ -118,7 +120,6 @@ public class InterfacePrincipale extends JFrame
118 120
 		delC = new Bouton("Supprimer la catégorie", delImg);
119 121
 		editC = new Bouton("Modifier la catégorie", editImg);
120 122
 
121
-		String tab[] = {"a","b","c","d","e","f"};
122 123
 		listC = new JList(bdd.getListeCategorie().toArray());
123 124
 		JScrollPane sp = new JScrollPane(listC,
124 125
 				JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
@@ -134,6 +135,11 @@ public class InterfacePrincipale extends JFrame
134 135
 		delC.setMaximumSize(new Dimension(208,34));
135 136
 		editC.setMaximumSize(new Dimension(208,34));
136 137
 
138
+		JLabel labC = new JLabel("Catégories");
139
+		labC.setAlignmentX(Component.CENTER_ALIGNMENT);
140
+		labC.setBorder(BorderFactory.createEmptyBorder(0,0,10,0));
141
+
142
+		panCategories.add(labC);
137 143
 		panCategories.add(addC);
138 144
 		panCategories.add(Box.createRigidArea(new Dimension(1,5)));
139 145
 		panCategories.add(delC);
@@ -147,6 +153,7 @@ public class InterfacePrincipale extends JFrame
147 153
 		addC.addActionListener(pcl);
148 154
 		delC.addActionListener(pcl);
149 155
 		editC.addActionListener(pcl);
156
+		listC.addListSelectionListener(pcl);
150 157
 	}
151 158
 
152 159
 	private void createPanelReponses()
@@ -157,8 +164,7 @@ public class InterfacePrincipale extends JFrame
157 164
 		editR = new Bouton("Modifier le jeu de réponse", editImg);
158 165
 		comboRepCat = new JComboBox();
159 166
 
160
-		String tab[] = {"a","b","c","d","e","f"};
161
-		listR = new JList(tab);
167
+		listR = new JList();
162 168
 		JScrollPane sp = new JScrollPane(listR,
163 169
 				JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
164 170
 				JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
@@ -176,6 +182,11 @@ public class InterfacePrincipale extends JFrame
176 182
 		editR.setMaximumSize(new Dimension(300,34));
177 183
 		comboRepCat.setMaximumSize(new Dimension(1000,34));
178 184
 
185
+		JLabel labR = new JLabel("Réponses");
186
+		labR.setAlignmentX(Component.CENTER_ALIGNMENT);
187
+		labR.setBorder(BorderFactory.createEmptyBorder(0,0,10,0));
188
+
189
+		panReponses.add(labR);
179 190
 		panReponses.add(addR);
180 191
 		panReponses.add(Box.createRigidArea(new Dimension(1,5)));
181 192
 		panReponses.add(delR);
@@ -218,6 +229,11 @@ public class InterfacePrincipale extends JFrame
218 229
 		editQ.setMaximumSize(new Dimension(208,34));
219 230
 		comboQueRep.setMaximumSize(new Dimension(1000,34));
220 231
 
232
+		JLabel labQ = new JLabel("Questions");
233
+		labQ.setAlignmentX(Component.CENTER_ALIGNMENT);
234
+		labQ.setBorder(BorderFactory.createEmptyBorder(0,0,10,0));
235
+
236
+		panQuestions.add(labQ);
221 237
 		panQuestions.add(addQ);
222 238
 		panQuestions.add(Box.createRigidArea(new Dimension(1,5)));
223 239
 		panQuestions.add(delQ);
@@ -261,7 +277,7 @@ public class InterfacePrincipale extends JFrame
261 277
 	}
262 278
 
263 279
 
264
-	private class PanCategoriesListener implements ActionListener
280
+	private class PanCategoriesListener implements ActionListener, ListSelectionListener
265 281
 	{
266 282
 		public void actionPerformed(ActionEvent e)
267 283
 		{
@@ -352,6 +368,11 @@ public class InterfacePrincipale extends JFrame
352 368
 				}
353 369
 			}
354 370
 		}
371
+
372
+		public void valueChanged(ListSelectionEvent e)
373
+		{
374
+			listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
375
+		}
355 376
 	}
356 377
 
357 378
 	private class PanReponsesListener implements ActionListener
@@ -361,6 +382,8 @@ public class InterfacePrincipale extends JFrame
361 382
 			if(e.getSource() == addR)
362 383
 			{
363 384
 				statusText.setText("Création de réponses");
385
+				NouvelleReponseDialog n = new NouvelleReponseDialog("rr","r","uuu",null);
386
+				n.afficher();
364 387
 			}
365 388
 			else if(e.getSource() == delR)
366 389
 			{

+ 3
- 0
java/src/META-INF/MANIFEST.MF ファイルの表示

@@ -0,0 +1,3 @@
1
+Manifest-Version: 1.0
2
+Main-Class: MainAdminBddBurgerQuizz
3
+

+ 74
- 0
java/src/NouvelleReponseDialog.java ファイルの表示

@@ -0,0 +1,74 @@
1
+import javax.swing.*;
2
+import java.awt.*;
3
+import java.awt.event.ActionEvent;
4
+import java.awt.event.ActionListener;
5
+
6
+public class NouvelleReponseDialog extends JDialog implements ActionListener
7
+{
8
+	private JTextField rep1;
9
+	private JTextField rep2;
10
+	private JButton ok;
11
+	private JButton annuler;
12
+	private boolean mofidEffectues;
13
+
14
+	public NouvelleReponseDialog(String title, String defRep1, String defRep2, JFrame parent)
15
+	{
16
+		super(parent,title,true);
17
+		createInterface(defRep1,defRep2);
18
+		pack();
19
+		setLocationRelativeTo(null);
20
+	}
21
+
22
+	private void createInterface(String defRep1, String defRep2)
23
+	{
24
+		JPanel champs = new JPanel();
25
+		JPanel boutons = new JPanel();
26
+
27
+		rep1 = new JTextField(defRep1,15);
28
+		rep2 = new JTextField(defRep2,15);
29
+
30
+		ok = new JButton("OK");
31
+		annuler = new JButton("Annuler");
32
+		ok.addActionListener(this);
33
+		annuler.addActionListener(this);
34
+
35
+		champs.setLayout(new GridLayout(2,2));
36
+		champs.add(new JLabel("Réponse 1:"));
37
+		champs.add(rep1);
38
+		champs.add(new JLabel("Réponse 2:"));
39
+		champs.add(rep2);
40
+		boutons.add(annuler);
41
+		boutons.add(ok);
42
+
43
+		getContentPane().setLayout(new BorderLayout());
44
+		getContentPane().add(champs, BorderLayout.CENTER);
45
+		getContentPane().add(boutons, BorderLayout.SOUTH);
46
+	}
47
+
48
+	public boolean afficher()
49
+	{
50
+		setVisible(true);
51
+		return mofidEffectues;
52
+	}
53
+
54
+	public void actionPerformed(ActionEvent e)
55
+	{
56
+		if(e.getSource() == annuler)
57
+		{
58
+			mofidEffectues = false;
59
+		}
60
+		else if(e.getSource() == ok) {
61
+			mofidEffectues = true;
62
+		}
63
+
64
+		setVisible(false);
65
+	}
66
+
67
+	public String getRep2() {
68
+		return rep2.getText();
69
+	}
70
+
71
+	public String getRep1() {
72
+		return rep1.getText();
73
+	}
74
+}