Преглед изворни кода

Merge branch 'master' of https://github.com/babolivier/burger-quizz

Brendan Abolivier пре 9 година
родитељ
комит
5ad93ec209

+ 115
- 269
java/.idea/workspace.xml Прегледај датотеку

@@ -7,10 +7,15 @@
7 7
   </component>
8 8
   <component name="ChangeListManager">
9 9
     <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
10
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" />
11
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$1.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$1.class" />
10 12
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
11 13
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
14
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/MainAdminBddBurgerQuizz.class" afterPath="$PROJECT_DIR$/out/production/java/MainAdminBddBurgerQuizz.class" />
15
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
12 16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBddDialog.java" afterPath="$PROJECT_DIR$/src/ConnexionBddDialog.java" />
13 17
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
18
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" afterPath="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
14 19
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
15 20
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
16 21
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
@@ -35,27 +40,31 @@
35 40
   </component>
36 41
   <component name="FileEditorManager">
37 42
     <leaf>
38
-      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
43
+      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="false">
39 44
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
40 45
           <provider selected="true" editor-type-id="text-editor">
41
-            <state vertical-scroll-proportion="0.660221">
42
-              <caret line="118" column="55" selection-start-line="118" selection-start-column="55" selection-end-line="118" selection-end-column="55" />
43
-              <folding>
44
-                <element signature="imports" expanded="true" />
45
-                <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
46
-                <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
47
-                <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
48
-                <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
49
-              </folding>
46
+            <state vertical-scroll-proportion="0.0">
47
+              <caret line="584" column="26" selection-start-line="584" selection-start-column="19" selection-end-line="584" selection-end-column="26" />
48
+              <folding />
50 49
             </state>
51 50
           </provider>
52 51
         </entry>
53 52
       </file>
54
-      <file leaf-file-name="ConnexionBddDialog.java" pinned="false" current-in-tab="false">
55
-        <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
53
+      <file leaf-file-name="NouvelleReponseDialog.java" pinned="false" current-in-tab="false">
54
+        <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
56 55
           <provider selected="true" editor-type-id="text-editor">
57 56
             <state vertical-scroll-proportion="0.0">
58
-              <caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
57
+              <caret line="35" column="31" selection-start-line="35" selection-start-column="31" selection-end-line="35" selection-end-column="31" />
58
+              <folding />
59
+            </state>
60
+          </provider>
61
+        </entry>
62
+      </file>
63
+      <file leaf-file-name="MainAdminBddBurgerQuizz.java" pinned="false" current-in-tab="true">
64
+        <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
65
+          <provider selected="true" editor-type-id="text-editor">
66
+            <state vertical-scroll-proportion="0.06716418">
67
+              <caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
59 68
               <folding>
60 69
                 <element signature="imports" expanded="true" />
61 70
               </folding>
@@ -67,23 +76,17 @@
67 76
         <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
68 77
           <provider selected="true" editor-type-id="text-editor">
69 78
             <state vertical-scroll-proportion="0.0">
70
-              <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
71
-              <folding>
72
-                <element signature="imports" expanded="true" />
73
-                <element signature="e#2002#2003#0" expanded="true" />
74
-                <element signature="e#2034#2035#0" expanded="true" />
75
-                <element signature="e#2062#2063#0" expanded="true" />
76
-                <element signature="e#2102#2103#0" expanded="true" />
77
-              </folding>
79
+              <caret line="73" column="143" selection-start-line="73" selection-start-column="143" selection-end-line="73" selection-end-column="143" />
80
+              <folding />
78 81
             </state>
79 82
           </provider>
80 83
         </entry>
81 84
       </file>
82
-      <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
83
-        <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
85
+      <file leaf-file-name="ConnexionBddDialog.java" pinned="false" current-in-tab="false">
86
+        <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
84 87
           <provider selected="true" editor-type-id="text-editor">
85 88
             <state vertical-scroll-proportion="0.0">
86
-              <caret line="39" column="74" selection-start-line="39" selection-start-column="74" selection-end-line="39" selection-end-column="74" />
89
+              <caret line="105" column="143" selection-start-line="105" selection-start-column="143" selection-end-line="105" selection-end-column="143" />
87 90
               <folding>
88 91
                 <element signature="imports" expanded="true" />
89 92
               </folding>
@@ -116,19 +119,21 @@
116 119
         <option value="$PROJECT_DIR$/src/Main.java" />
117 120
         <option value="$PROJECT_DIR$/src/Interface.java" />
118 121
         <option value="$PROJECT_DIR$/src/ConnectDialog.java" />
119
-        <option value="$PROJECT_DIR$/src/Bouton.java" />
120 122
         <option value="$PROJECT_DIR$/src/Categorie.java" />
121 123
         <option value="$PROJECT_DIR$/src/Reponses.java" />
122 124
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
123
-        <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
124 125
         <option value="$PROJECT_DIR$/src/Question.java" />
125 126
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
126
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
127 127
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
128
+        <option value="$PROJECT_DIR$/src/Bouton.java" />
129
+        <option value="$PROJECT_DIR$/src/configBDD.java" />
130
+        <option value="$PROJECT_DIR$/src/ConfigBDD.java" />
131
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
128 132
         <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
129
-        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
130 133
         <option value="$PROJECT_DIR$/src/ConnexionBddDialog.java" />
131 134
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
135
+        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
136
+        <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
132 137
       </list>
133 138
     </option>
134 139
   </component>
@@ -282,14 +287,14 @@
282 287
         </subPane>
283 288
       </pane>
284 289
       <pane id="Scope" />
285
-      <pane id="Scratches" />
286 290
       <pane id="PackagesPane" />
291
+      <pane id="Scratches" />
287 292
     </panes>
288 293
   </component>
289 294
   <component name="PropertiesComponent">
290 295
     <property name="recentsLimit" value="5" />
291 296
     <property name="FullScreen" value="false" />
292
-    <property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Font" />
297
+    <property name="settings.editor.selected.configurable" value="application.passwordSafe" />
293 298
     <property name="settings.editor.splitter.proportion" value="0.2" />
294 299
     <property name="dynamic.classpath" value="false" />
295 300
     <property name="restartRequiresConfirmation" value="true" />
@@ -311,121 +316,6 @@
311 316
       <recent name="" />
312 317
     </key>
313 318
   </component>
314
-  <component name="RestoreUpdateTree" date="Moments ago" ActionInfo="_Update">
315
-    <UpdatedFiles>
316
-      <FILE-GROUP>
317
-        <option name="myUpdateName" value="Updated from server" />
318
-        <option name="myStatusName" value="Changed on server" />
319
-        <option name="mySupportsDeletion" value="false" />
320
-        <option name="myCanBeAbsent" value="false" />
321
-        <option name="myId" value="CHANGED_ON_SERVER" />
322
-        <FILE-GROUP>
323
-          <option name="myUpdateName" value="Updated" />
324
-          <option name="myStatusName" value="Changed" />
325
-          <option name="mySupportsDeletion" value="false" />
326
-          <option name="myCanBeAbsent" value="false" />
327
-          <option name="myId" value="UPDATED" />
328
-        </FILE-GROUP>
329
-        <FILE-GROUP>
330
-          <option name="myUpdateName" value="Created" />
331
-          <option name="myStatusName" value="Created" />
332
-          <option name="mySupportsDeletion" value="false" />
333
-          <option name="myCanBeAbsent" value="false" />
334
-          <option name="myId" value="CREATED" />
335
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/README</PATH>
336
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/client/index.html</PATH>
337
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/client/js/game.js</PATH>
338
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/server/npm-debug.log</PATH>
339
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/server/package.json</PATH>
340
-          <PATH vcs="Git" revision="">$PROJECT_DIR$/../web/multi/server/server.js</PATH>
341
-        </FILE-GROUP>
342
-        <FILE-GROUP>
343
-          <option name="myUpdateName" value="Deleted" />
344
-          <option name="myStatusName" value="Deleted" />
345
-          <option name="mySupportsDeletion" value="false" />
346
-          <option name="myCanBeAbsent" value="true" />
347
-          <option name="myId" value="REMOVED_FROM_REPOSITORY" />
348
-        </FILE-GROUP>
349
-        <FILE-GROUP>
350
-          <option name="myUpdateName" value="Restored" />
351
-          <option name="myStatusName" value="Will be restored" />
352
-          <option name="mySupportsDeletion" value="false" />
353
-          <option name="myCanBeAbsent" value="false" />
354
-          <option name="myId" value="RESTORED" />
355
-        </FILE-GROUP>
356
-      </FILE-GROUP>
357
-      <FILE-GROUP>
358
-        <option name="myUpdateName" value="Modified" />
359
-        <option name="myStatusName" value="Modified" />
360
-        <option name="mySupportsDeletion" value="false" />
361
-        <option name="myCanBeAbsent" value="false" />
362
-        <option name="myId" value="MODIFIED" />
363
-      </FILE-GROUP>
364
-      <FILE-GROUP>
365
-        <option name="myUpdateName" value="Skipped" />
366
-        <option name="myStatusName" value="Skipped" />
367
-        <option name="mySupportsDeletion" value="false" />
368
-        <option name="myCanBeAbsent" value="false" />
369
-        <option name="myId" value="SKIPPED" />
370
-      </FILE-GROUP>
371
-      <FILE-GROUP>
372
-        <option name="myUpdateName" value="Merged with conflicts" />
373
-        <option name="myStatusName" value="Will be merged with conflicts" />
374
-        <option name="mySupportsDeletion" value="false" />
375
-        <option name="myCanBeAbsent" value="false" />
376
-        <option name="myId" value="MERGED_WITH_CONFLICTS" />
377
-      </FILE-GROUP>
378
-      <FILE-GROUP>
379
-        <option name="myUpdateName" value="Merged with tree conflicts" />
380
-        <option name="myStatusName" value="Merged with tree conflicts" />
381
-        <option name="mySupportsDeletion" value="false" />
382
-        <option name="myCanBeAbsent" value="false" />
383
-        <option name="myId" value="MERGED_WITH_TREE_CONFLICT" />
384
-      </FILE-GROUP>
385
-      <FILE-GROUP>
386
-        <option name="myUpdateName" value="Merged with property conflicts" />
387
-        <option name="myStatusName" value="Will be merged with property conflicts" />
388
-        <option name="mySupportsDeletion" value="false" />
389
-        <option name="myCanBeAbsent" value="false" />
390
-        <option name="myId" value="MERGED_WITH_PROPERTY_CONFLICT" />
391
-      </FILE-GROUP>
392
-      <FILE-GROUP>
393
-        <option name="myUpdateName" value="Merged" />
394
-        <option name="myStatusName" value="Will be merged" />
395
-        <option name="mySupportsDeletion" value="false" />
396
-        <option name="myCanBeAbsent" value="false" />
397
-        <option name="myId" value="MERGED" />
398
-      </FILE-GROUP>
399
-      <FILE-GROUP>
400
-        <option name="myUpdateName" value="Not in repository" />
401
-        <option name="myStatusName" value="Not in repository" />
402
-        <option name="mySupportsDeletion" value="true" />
403
-        <option name="myCanBeAbsent" value="false" />
404
-        <option name="myId" value="UNKNOWN" />
405
-      </FILE-GROUP>
406
-      <FILE-GROUP>
407
-        <option name="myUpdateName" value="Locally added" />
408
-        <option name="myStatusName" value="Locally added" />
409
-        <option name="mySupportsDeletion" value="false" />
410
-        <option name="myCanBeAbsent" value="false" />
411
-        <option name="myId" value="LOCALLY_ADDED" />
412
-      </FILE-GROUP>
413
-      <FILE-GROUP>
414
-        <option name="myUpdateName" value="Locally removed" />
415
-        <option name="myStatusName" value="Locally removed" />
416
-        <option name="mySupportsDeletion" value="false" />
417
-        <option name="myCanBeAbsent" value="false" />
418
-        <option name="myId" value="LOCALLY_REMOVED" />
419
-      </FILE-GROUP>
420
-      <FILE-GROUP>
421
-        <option name="myUpdateName" value="Switched" />
422
-        <option name="myStatusName" value="Switched" />
423
-        <option name="mySupportsDeletion" value="false" />
424
-        <option name="myCanBeAbsent" value="false" />
425
-        <option name="myId" value="SWITCHED" />
426
-      </FILE-GROUP>
427
-    </UpdatedFiles>
428
-  </component>
429 319
   <component name="RunManager" selected="Application.Main">
430 320
     <configuration default="false" name="Main" type="Application" factoryName="Application" temporary="true">
431 321
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
@@ -582,7 +472,7 @@
582 472
   </component>
583 473
   <component name="ShelveChangesManager" show_recycled="false" />
584 474
   <component name="SvnConfiguration">
585
-    <configuration />
475
+    <configuration>$USER_HOME$/.subversion</configuration>
586 476
   </component>
587 477
   <component name="TaskManager">
588 478
     <task active="true" id="Default" summary="Default task">
@@ -723,7 +613,25 @@
723 613
       <option name="project" value="LOCAL" />
724 614
       <updated>1433340153817</updated>
725 615
     </task>
726
-    <option name="localTasksCounter" value="23" />
616
+    <task id="LOCAL-00023" summary="amelioration diverse concernant la boite de dialogue des parametres">
617
+      <created>1433351854490</created>
618
+      <option name="number" value="00023" />
619
+      <option name="project" value="LOCAL" />
620
+      <updated>1433351854490</updated>
621
+    </task>
622
+    <task id="LOCAL-00024" summary="amelioration diverse concernant la boite de dialogue des parametres">
623
+      <created>1433352072706</created>
624
+      <option name="number" value="00024" />
625
+      <option name="project" value="LOCAL" />
626
+      <updated>1433352072706</updated>
627
+    </task>
628
+    <task id="LOCAL-00025" summary="modification parametre operationelle">
629
+      <created>1433413381772</created>
630
+      <option name="number" value="00025" />
631
+      <option name="project" value="LOCAL" />
632
+      <updated>1433413381772</updated>
633
+    </task>
634
+    <option name="localTasksCounter" value="26" />
727 635
     <servers />
728 636
   </component>
729 637
   <component name="TodoView">
@@ -739,29 +647,29 @@
739 647
     <frame x="-1" y="27" width="1368" height="712" extended-state="6" />
740 648
     <editor active="false" />
741 649
     <layout>
742
-      <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" />
743 650
       <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" />
651
+      <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" />
744 652
       <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
745
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
746 653
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
747
-      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
748
-      <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" />
749
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5030441" order="9" side_tool="true" content_ui="tabs" />
750
-      <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" />
751
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.49695587" order="10" side_tool="false" content_ui="tabs" />
752
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
753 654
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
655
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
656
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
754 657
       <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" />
755 658
       <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" />
756 659
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
757
-      <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" />
758
-      <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="7" side_tool="false" content_ui="tabs" />
660
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26291794" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
661
+      <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" />
662
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5030441" order="9" side_tool="true" content_ui="tabs" />
663
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.49695587" order="10" side_tool="false" content_ui="tabs" />
759 664
       <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" />
760 665
       <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" />
761 666
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
667
+      <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" />
668
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
762 669
       <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" />
763 670
       <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" />
764 671
       <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="4" side_tool="false" content_ui="tabs" />
672
+      <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="7" side_tool="false" content_ui="tabs" />
765 673
     </layout>
766 674
   </component>
767 675
   <component name="Vcs.Log.UiProperties">
@@ -796,7 +704,9 @@
796 704
     <MESSAGE value="++ gestion reponsesV4" />
797 705
     <MESSAGE value="++ gestion reponsesV5" />
798 706
     <MESSAGE value="dialogu co bdd" />
799
-    <option name="LAST_COMMIT_MESSAGE" value="dialogu co bdd" />
707
+    <MESSAGE value="amelioration diverse concernant la boite de dialogue des parametres" />
708
+    <MESSAGE value="modification parametre operationelle" />
709
+    <option name="LAST_COMMIT_MESSAGE" value="modification parametre operationelle" />
800 710
   </component>
801 711
   <component name="XDebuggerManager">
802 712
     <breakpoint-manager>
@@ -809,20 +719,6 @@
809 719
     <option name="FILTER_TARGETS" value="false" />
810 720
   </component>
811 721
   <component name="editorHistoryManager">
812
-    <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
813
-      <provider selected="true" editor-type-id="text-editor">
814
-        <state vertical-scroll-proportion="0.0">
815
-          <caret line="8" column="75" selection-start-line="8" selection-start-column="75" selection-end-line="8" selection-end-column="75" />
816
-        </state>
817
-      </provider>
818
-    </entry>
819
-    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
820
-      <provider selected="true" editor-type-id="text-editor">
821
-        <state vertical-scroll-proportion="0.0">
822
-          <caret line="11" column="73" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="73" />
823
-        </state>
824
-      </provider>
825
-    </entry>
826 722
     <entry file="file://$PROJECT_DIR$/mcd.png">
827 723
       <provider selected="true" editor-type-id="images">
828 724
         <state />
@@ -837,13 +733,7 @@
837 733
       <provider selected="true" editor-type-id="text-editor">
838 734
         <state vertical-scroll-proportion="0.0">
839 735
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
840
-          <folding>
841
-            <element signature="imports" expanded="true" />
842
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
843
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
844
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
845
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
846
-          </folding>
736
+          <folding />
847 737
         </state>
848 738
       </provider>
849 739
     </entry>
@@ -875,13 +765,7 @@
875 765
       <provider selected="true" editor-type-id="text-editor">
876 766
         <state vertical-scroll-proportion="0.0">
877 767
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
878
-          <folding>
879
-            <element signature="imports" expanded="true" />
880
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
881
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
882
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
883
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
884
-          </folding>
768
+          <folding />
885 769
         </state>
886 770
       </provider>
887 771
     </entry>
@@ -913,13 +797,7 @@
913 797
       <provider selected="true" editor-type-id="text-editor">
914 798
         <state vertical-scroll-proportion="0.0">
915 799
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
916
-          <folding>
917
-            <element signature="imports" expanded="true" />
918
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
919
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
920
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
921
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
922
-          </folding>
800
+          <folding />
923 801
         </state>
924 802
       </provider>
925 803
     </entry>
@@ -951,13 +829,7 @@
951 829
       <provider selected="true" editor-type-id="text-editor">
952 830
         <state vertical-scroll-proportion="0.0">
953 831
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
954
-          <folding>
955
-            <element signature="imports" expanded="true" />
956
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
957
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
958
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
959
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
960
-          </folding>
832
+          <folding />
961 833
         </state>
962 834
       </provider>
963 835
     </entry>
@@ -989,13 +861,7 @@
989 861
       <provider selected="true" editor-type-id="text-editor">
990 862
         <state vertical-scroll-proportion="0.0">
991 863
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
992
-          <folding>
993
-            <element signature="imports" expanded="true" />
994
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
995
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
996
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
997
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
998
-          </folding>
864
+          <folding />
999 865
         </state>
1000 866
       </provider>
1001 867
     </entry>
@@ -1048,13 +914,7 @@
1048 914
       <provider selected="true" editor-type-id="text-editor">
1049 915
         <state vertical-scroll-proportion="0.0">
1050 916
           <caret line="0" column="21" selection-start-line="0" selection-start-column="21" selection-end-line="0" selection-end-column="21" />
1051
-          <folding>
1052
-            <element signature="imports" expanded="true" />
1053
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1054
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1055
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1056
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1057
-          </folding>
917
+          <folding />
1058 918
         </state>
1059 919
       </provider>
1060 920
     </entry>
@@ -1084,13 +944,6 @@
1084 944
         <state />
1085 945
       </provider>
1086 946
     </entry>
1087
-    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
1088
-      <provider selected="true" editor-type-id="text-editor">
1089
-        <state vertical-scroll-proportion="0.5719626">
1090
-          <caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
1091
-        </state>
1092
-      </provider>
1093
-    </entry>
1094 947
     <entry file="file://$PROJECT_DIR$/src/Categorie.java">
1095 948
       <provider selected="true" editor-type-id="text-editor">
1096 949
         <state vertical-scroll-proportion="0.0">
@@ -1098,23 +951,10 @@
1098 951
         </state>
1099 952
       </provider>
1100 953
     </entry>
1101
-    <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
1102
-      <provider selected="true" editor-type-id="text-editor">
1103
-        <state vertical-scroll-proportion="0.51657456">
1104
-          <caret line="11" column="44" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="44" />
1105
-          <folding />
1106
-        </state>
1107
-      </provider>
1108
-    </entry>
1109 954
     <entry file="file://$PROJECT_DIR$/src/GestionCategories.java">
1110 955
       <provider selected="true" editor-type-id="text-editor">
1111 956
         <state vertical-scroll-proportion="2.4738805">
1112 957
           <caret line="93" column="38" selection-start-line="93" selection-start-column="38" selection-end-line="93" selection-end-column="38" />
1113
-          <folding>
1114
-            <element signature="imports" expanded="false" />
1115
-            <element signature="e#2160#2161#0" expanded="false" />
1116
-            <element signature="e#2188#2189#0" expanded="false" />
1117
-          </folding>
1118 958
         </state>
1119 959
       </provider>
1120 960
     </entry>
@@ -1134,7 +974,6 @@
1134 974
       <provider selected="true" editor-type-id="text-editor">
1135 975
         <state vertical-scroll-proportion="0.46082088">
1136 976
           <caret line="52" column="26" selection-start-line="52" selection-start-column="26" selection-end-line="52" selection-end-column="26" />
1137
-          <folding />
1138 977
         </state>
1139 978
       </provider>
1140 979
     </entry>
@@ -1142,11 +981,6 @@
1142 981
       <provider selected="true" editor-type-id="text-editor">
1143 982
         <state vertical-scroll-proportion="0.0">
1144 983
           <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
1145
-          <folding>
1146
-            <element signature="imports" expanded="false" />
1147
-            <element signature="e#2627#2628#0" expanded="false" />
1148
-            <element signature="e#2653#2654#0" expanded="false" />
1149
-          </folding>
1150 984
         </state>
1151 985
       </provider>
1152 986
     </entry>
@@ -1154,26 +988,42 @@
1154 988
       <provider selected="true" editor-type-id="text-editor">
1155 989
         <state vertical-scroll-proportion="0.0">
1156 990
           <caret line="89" column="36" selection-start-line="89" selection-start-column="36" selection-end-line="89" selection-end-column="36" />
1157
-          <folding>
1158
-            <element signature="imports" expanded="false" />
1159
-            <element signature="e#2985#2986#0" expanded="false" />
1160
-            <element signature="e#3013#3014#0" expanded="false" />
1161
-          </folding>
1162 991
         </state>
1163 992
       </provider>
1164 993
     </entry>
1165
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
994
+    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
995
+      <provider selected="true" editor-type-id="text-editor">
996
+        <state vertical-scroll-proportion="0.20165746">
997
+          <caret line="6" column="40" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
998
+        </state>
999
+      </provider>
1000
+    </entry>
1001
+    <entry file="file://$PROJECT_DIR$/conf.xml">
1166 1002
       <provider selected="true" editor-type-id="text-editor">
1167
-        <state vertical-scroll-proportion="0.31716418">
1168
-          <caret line="17" column="31" selection-start-line="17" selection-start-column="31" selection-end-line="17" selection-end-column="31" />
1003
+        <state vertical-scroll-proportion="0.0">
1004
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
1169 1005
           <folding />
1170 1006
         </state>
1171 1007
       </provider>
1172 1008
     </entry>
1009
+    <entry file="file://$PROJECT_DIR$/src/ConfigBDD.java">
1010
+      <provider selected="true" editor-type-id="text-editor">
1011
+        <state vertical-scroll-proportion="0.60261196">
1012
+          <caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
1013
+        </state>
1014
+      </provider>
1015
+    </entry>
1173 1016
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1174 1017
       <provider selected="true" editor-type-id="text-editor">
1018
+        <state vertical-scroll-proportion="-0.29104477">
1019
+          <caret line="40" column="32" selection-start-line="40" selection-start-column="32" selection-end-line="40" selection-end-column="32" />
1020
+        </state>
1021
+      </provider>
1022
+    </entry>
1023
+    <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
1024
+      <provider selected="true" editor-type-id="text-editor">
1175 1025
         <state vertical-scroll-proportion="0.0">
1176
-          <caret line="39" column="74" selection-start-line="39" selection-start-column="74" selection-end-line="39" selection-end-column="74" />
1026
+          <caret line="105" column="143" selection-start-line="105" selection-start-column="143" selection-end-line="105" selection-end-column="143" />
1177 1027
           <folding>
1178 1028
             <element signature="imports" expanded="true" />
1179 1029
           </folding>
@@ -1183,37 +1033,33 @@
1183 1033
     <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1184 1034
       <provider selected="true" editor-type-id="text-editor">
1185 1035
         <state vertical-scroll-proportion="0.0">
1186
-          <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
1187
-          <folding>
1188
-            <element signature="imports" expanded="true" />
1189
-            <element signature="e#2002#2003#0" expanded="true" />
1190
-            <element signature="e#2034#2035#0" expanded="true" />
1191
-            <element signature="e#2062#2063#0" expanded="true" />
1192
-            <element signature="e#2102#2103#0" expanded="true" />
1193
-          </folding>
1036
+          <caret line="73" column="143" selection-start-line="73" selection-start-column="143" selection-end-line="73" selection-end-column="143" />
1037
+          <folding />
1194 1038
         </state>
1195 1039
       </provider>
1196 1040
     </entry>
1197
-    <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
1041
+    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1198 1042
       <provider selected="true" editor-type-id="text-editor">
1199 1043
         <state vertical-scroll-proportion="0.0">
1200
-          <caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
1201
-          <folding>
1202
-            <element signature="imports" expanded="true" />
1203
-          </folding>
1044
+          <caret line="584" column="26" selection-start-line="584" selection-start-column="19" selection-end-line="584" selection-end-column="26" />
1045
+          <folding />
1204 1046
         </state>
1205 1047
       </provider>
1206 1048
     </entry>
1207
-    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1049
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1050
+      <provider selected="true" editor-type-id="text-editor">
1051
+        <state vertical-scroll-proportion="0.0">
1052
+          <caret line="35" column="31" selection-start-line="35" selection-start-column="31" selection-end-line="35" selection-end-column="31" />
1053
+          <folding />
1054
+        </state>
1055
+      </provider>
1056
+    </entry>
1057
+    <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
1208 1058
       <provider selected="true" editor-type-id="text-editor">
1209
-        <state vertical-scroll-proportion="0.660221">
1210
-          <caret line="118" column="55" selection-start-line="118" selection-start-column="55" selection-end-line="118" selection-end-column="55" />
1059
+        <state vertical-scroll-proportion="0.06716418">
1060
+          <caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
1211 1061
           <folding>
1212 1062
             <element signature="imports" expanded="true" />
1213
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1214
-            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1215
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1216
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1217 1063
           </folding>
1218 1064
         </state>
1219 1065
       </provider>

BIN
java/out/production/java/ConnexionBDD.class Прегледај датотеку


BIN
java/out/production/java/InterfacePrincipale$1.class Прегледај датотеку


BIN
java/out/production/java/InterfacePrincipale$PanQuestionsListener.class Прегледај датотеку


BIN
java/out/production/java/InterfacePrincipale$PanReponsesListener.class Прегледај датотеку


BIN
java/out/production/java/MainAdminBddBurgerQuizz.class Прегледај датотеку


+ 90
- 0
java/src/ConfigBDD.java Прегледај датотеку

@@ -0,0 +1,90 @@
1
+import java.io.*;
2
+import java.util.Properties;
3
+
4
+public class ConfigBDD
5
+{
6
+	private Properties conf;
7
+
8
+	public ConfigBDD() {
9
+		conf = new Properties();
10
+	}
11
+
12
+	public boolean loadConf()
13
+	{
14
+		try
15
+		{
16
+			conf.loadFromXML(new FileInputStream("conf.xml"));
17
+			return true;
18
+		}
19
+		catch (IOException e)
20
+		{
21
+			loadDefaultConf();
22
+			saveConf();
23
+			e.printStackTrace();
24
+			return false;
25
+		}
26
+	}
27
+
28
+	public boolean saveConf()
29
+	{
30
+		try
31
+		{
32
+			conf.storeToXML(new FileOutputStream("conf.xml"), "Configuration de l'aplication de gestion du jeu BurgerQuizz");
33
+			return true;
34
+		}
35
+		catch (IOException e)
36
+		{
37
+			e.printStackTrace();
38
+			return false;
39
+		}
40
+	}
41
+
42
+	public void loadDefaultConf()
43
+	{
44
+		conf.setProperty("nomBdd", "burgerquizz");
45
+		conf.setProperty("port", "3306");
46
+		conf.setProperty("ip", "localhost");
47
+		conf.setProperty("login", "alain");
48
+		conf.setProperty("password", "chabat");
49
+	}
50
+
51
+	public String getNomBdd() {
52
+		return conf.getProperty("nomBdd");
53
+	}
54
+
55
+	public void setNomBdd(String nomBdd) {
56
+		conf.setProperty("nomBdd", nomBdd);
57
+	}
58
+
59
+	public int getPort() {
60
+		return Integer.parseInt(conf.getProperty("port"));
61
+	}
62
+
63
+	public void setPort(int port) {
64
+		conf.setProperty("port", String.valueOf(port));
65
+	}
66
+
67
+	public String getIp() {
68
+		return conf.getProperty("ip");
69
+	}
70
+
71
+	public void setIp(String ip) {
72
+		conf.setProperty("ip", ip);
73
+	}
74
+
75
+	public String getLogin() {
76
+		return conf.getProperty("login");
77
+	}
78
+
79
+	public void setLogin(String login) {
80
+		conf.setProperty("login", login);
81
+	}
82
+
83
+	public String getPassword() {
84
+		return conf.getProperty("password");
85
+	}
86
+
87
+	public void setPassword(String password) {
88
+		conf.setProperty("password", password);
89
+	}
90
+}

+ 9
- 6
java/src/ConnexionBDD.java Прегледај датотеку

@@ -6,15 +6,12 @@ import java.util.ArrayList;
6 6
 public class ConnexionBDD
7 7
 {
8 8
 	Connection connexionbdd;
9
-	String nomBdd;
10 9
 	GestionCategories gestionCategories;
11 10
 	GestionReponses gestionReponses;
12 11
 	GestionQuestions gestionQuestions;
13 12
 
14
-	public ConnexionBDD(String nomBdd, int port, String ip, String login, String password)
13
+	public ConnexionBDD()
15 14
 	{
16
-		this.nomBdd = nomBdd;
17
-
18 15
 		try
19 16
 		{
20 17
 			Class.forName("com.mysql.jdbc.Driver");
@@ -24,7 +21,10 @@ public class ConnexionBDD
24 21
 			e.printStackTrace();
25 22
 			System.exit(1);
26 23
 		}
24
+	}
27 25
 
26
+	public boolean connect(String nomBdd, int port, String ip, String login, String password)
27
+	{
28 28
 		try
29 29
 		{
30 30
 			String url = "jdbc:mysql://" + ip + ":" + port + "/" + nomBdd;
@@ -33,12 +33,15 @@ public class ConnexionBDD
33 33
 			gestionCategories = new GestionCategories(connexionbdd);
34 34
 			gestionReponses = new GestionReponses(connexionbdd);
35 35
 			gestionQuestions = new GestionQuestions(connexionbdd);
36
+
37
+			return true;
36 38
 		}
37 39
 		catch(SQLException e)
38 40
 		{
39 41
 			e.printStackTrace();
40
-			System.out.println("Erreur de conexion à la base de données");
41
-			System.exit(1);
42
+			System.out.println("Erreur de conexion à la base de données: " + e.getMessage());
43
+			return false;
44
+			//System.exit(1);
42 45
 		}
43 46
 	}
44 47
 

+ 58
- 9
java/src/ConnexionBddDialog.java Прегледај датотеку

@@ -16,19 +16,20 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
16 16
 	private JButton ok;
17 17
 	private JButton annuler;
18 18
 	private JButton defParams;
19
+	private JButton quitter;
19 20
 	private boolean modifEffectuees;
20 21
 
21
-	public ConnexionBddDialog(String nomBdd, int port, String ip, String login, String password, JFrame parent)
22
+	public ConnexionBddDialog(String nomBdd, int port, String ip, String login, String password, JFrame parent, boolean showExitButton)
22 23
 	{
23
-		super(parent, "Paramétres BDD", true);
24
+		super(parent, "Paramètres de connexion à la  base de données", true);
24 25
 		modifEffectuees = false;
25
-		createInterface(nomBdd, port, ip, login, password);
26
+		createInterface(nomBdd, port, ip, login, password, showExitButton);
26 27
 		pack();
27 28
 		setLocationRelativeTo(null);
28 29
 		setResizable(false);
29 30
 	}
30 31
 
31
-	private void createInterface(String defNomBdd, int defPort, String defIP, String defLogin, String defPassword)
32
+	private void createInterface(String defNomBdd, int defPort, String defIP, String defLogin, String defPassword, boolean showExitButton)
32 33
 	{
33 34
 		nomBdd = new JTextField(defNomBdd, 30);
34 35
 		port = new JFormattedTextField(NumberFormat.getInstance());
@@ -45,11 +46,13 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
45 46
 
46 47
 		ok = new JButton("OK");
47 48
 		annuler = new JButton("Annuler");
48
-		defParams = new JButton("Paramétres de connexion par défault");
49
+		defParams = new JButton("Paramètres de connexion par défaut");
50
+		quitter = new JButton("Quitter l'aplication");
49 51
 
50 52
 		ok.addActionListener(this);
51 53
 		annuler.addActionListener(this);
52 54
 		defParams.addActionListener(this);
55
+		quitter.addActionListener(this);
53 56
 
54 57
 		JPanel fieldPanel = new JPanel();
55 58
 		JPanel boutons = new JPanel();
@@ -66,9 +69,10 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
66 69
 		fieldPanel.add(new JLabel("Mot de passe utilisateur:"));
67 70
 		fieldPanel.add(password);
68 71
 
69
-		boutons.add(annuler);
72
+		if(!showExitButton)boutons.add(annuler);
70 73
 		boutons.add(defParams);
71 74
 		boutons.add(ok);
75
+		if(showExitButton)boutons.add(quitter);
72 76
 
73 77
 		getContentPane().add(fieldPanel, BorderLayout.CENTER);
74 78
 		getContentPane().add(boutons, BorderLayout.SOUTH);
@@ -80,9 +84,54 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
80 84
 		return modifEffectuees;
81 85
 	}
82 86
 
83
-	public void actionPerformed(ActionEvent actionEvent)
87
+	public void actionPerformed(ActionEvent e)
84 88
 	{
85
-		modifEffectuees = false;
86
-		setVisible(false);
89
+		if(e.getSource() == defParams)
90
+		{
91
+			nomBdd.setText("burgerquizz");
92
+			port.setValue(3306);
93
+			ip.setText("localhost");
94
+			login.setText("alain");
95
+			password.setText("chabat");
96
+		}
97
+		else if(e.getSource() == annuler)
98
+		{
99
+			modifEffectuees = false;
100
+			setVisible(false);
101
+		}
102
+		else if(e.getSource() == ok)
103
+		{
104
+			if(getNomBdd().isEmpty() || getIp().isEmpty() || getLogin().isEmpty())
105
+			{
106
+				JOptionPane.showMessageDialog(this, "Les champs ne doivent pas être vide.", "Champs non remplis", JOptionPane.WARNING_MESSAGE);
107
+				return;
108
+			}
109
+			modifEffectuees = true;
110
+			setVisible(false);
111
+		}
112
+		else if(e.getSource() == quitter)
113
+		{
114
+			System.exit(0);
115
+		}
116
+	}
117
+
118
+	public String getNomBdd() {
119
+		return nomBdd.getText();
120
+	}
121
+
122
+	public int getPort() {
123
+		return (int) port.getValue();
124
+	}
125
+
126
+	public String getIp() {
127
+		return ip.getText();
128
+	}
129
+
130
+	public String getLogin() {
131
+		return login.getText();
132
+	}
133
+
134
+	public String getPassword() {
135
+		return String.valueOf(password.getPassword());
87 136
 	}
88 137
 }

+ 59
- 23
java/src/InterfacePrincipale.java Прегледај датотеку

@@ -47,12 +47,15 @@ public class InterfacePrincipale extends JFrame
47 47
 
48 48
 	//objet bdd
49 49
 	private ConnexionBDD bdd;
50
+	private ConfigBDD configBDD;
50 51
 
51 52
 	public InterfacePrincipale()
52 53
 	{
53
-		ConnexionBddDialog cbddd = new ConnexionBddDialog("efr",85,"42:42:42:42","eflgr","fmr,grgerge", null);
54
-		cbddd.afficher();
55
-		bdd = new ConnexionBDD("burgerquizz", 3306, "localhost", "alain", "chabat");
54
+		configBDD = new ConfigBDD();
55
+		configBDD.loadConf();
56
+		bdd = new ConnexionBDD();
57
+
58
+		tryToConnect();
56 59
 
57 60
 		setTitle("Administration base de données de l'aplication BurgerQuizz");
58 61
 		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -105,21 +108,33 @@ public class InterfacePrincipale extends JFrame
105 108
 
106 109
 	private void createStatusBar()
107 110
 	{
108
-		statusBar = new JPanel(new BorderLayout());
111
+		statusBar = new JPanel(new BorderLayout(0,0));
109 112
 		statusText = new JLabel("Application demarrée, connexion à la base de donné effective. ");
110 113
 
111 114
 		Border border = BorderFactory.createMatteBorder(3,0,0,0, new Color(220,220,220));
112 115
 		statusBar.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10,70,5,70),border));
113 116
 
117
+		statusText.setHorizontalAlignment(SwingConstants.CENTER);
118
+
114 119
 		config = new Bouton("Configuration", setupImg);
115
-		config.setPreferredSize(new Dimension(250, 34));
120
+		config.setPreferredSize(new Dimension(200, 34));
116 121
 		JPanel p = new JPanel();
117
-		p.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
122
+		p.setLayout(new BorderLayout());
123
+		p.add(config, BorderLayout.CENTER);
124
+		p.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
118 125
 
119 126
 		statusBar.add(statusText, BorderLayout.CENTER);
120
-		p.add(config, BorderLayout.EAST);
121 127
 		statusBar.add(p, BorderLayout.EAST);
122
-		//statusBar.add(config, BorderLayout.EAST);
128
+
129
+		config.addActionListener(new ActionListener() {
130
+			public void actionPerformed(ActionEvent actionEvent) {
131
+				configureBDD(false);
132
+				tryToConnect();
133
+				listC.setListData(bdd.getListeCategorie().toArray());
134
+				listR.setListData(new Vector(0));
135
+				listQ.setListData(new Vector(0));
136
+			}
137
+		});
123 138
 	}
124 139
 
125 140
 	private void createPanelCategories()
@@ -277,6 +292,37 @@ public class InterfacePrincipale extends JFrame
277 292
 		pack();
278 293
 	}
279 294
 
295
+	public void configureBDD(boolean showExitButton)
296
+	{
297
+		ConnexionBddDialog cbddd = new ConnexionBddDialog(configBDD.getNomBdd(), configBDD.getPort(),
298
+				configBDD.getIp(), configBDD.getLogin(),
299
+				configBDD.getPassword(), null, showExitButton);
300
+		if(cbddd.afficher() == true)
301
+		{
302
+			configBDD.setNomBdd(cbddd.getNomBdd());
303
+			configBDD.setIp(cbddd.getIp());
304
+			configBDD.setPort(cbddd.getPort());
305
+			configBDD.setLogin(cbddd.getLogin());
306
+			configBDD.setPassword(cbddd.getPassword());
307
+
308
+			configBDD.saveConf();
309
+		}
310
+	}
311
+
312
+	private void tryToConnect()
313
+	{
314
+		boolean conOK = false;
315
+		do
316
+		{
317
+			conOK = bdd.connect(configBDD.getNomBdd(), configBDD.getPort(), configBDD.getIp(), configBDD.getLogin(), configBDD.getPassword());
318
+			if(conOK == false)
319
+			{
320
+				JOptionPane.showMessageDialog(this, "Impossible d'établir la connexion à la base de données.", "Erreur conexion base de données", JOptionPane.ERROR_MESSAGE);
321
+				configureBDD(true);
322
+			}
323
+		}while(!conOK);
324
+	}
325
+
280 326
 	private void reSelectCategorie(String newCatName)
281 327
 	{
282 328
 		Object[] tabObject = bdd.getListeCategorie().toArray();
@@ -345,9 +391,7 @@ public class InterfacePrincipale extends JFrame
345 391
 		{
346 392
 			if(e.getSource() == addC)
347 393
 			{
348
-				JOptionPane jop = new JOptionPane();
349
-
350
-				String catName = jop.showInputDialog(null,
394
+				String catName = JOptionPane.showInputDialog(null,
351 395
 						"Nom de la nouvelle categorie:",
352 396
 						"Nouvelle catégorie",
353 397
 						JOptionPane.QUESTION_MESSAGE);
@@ -369,8 +413,6 @@ public class InterfacePrincipale extends JFrame
369 413
 			}
370 414
 			else if(e.getSource() == delC)
371 415
 			{
372
-				JOptionPane jop = new JOptionPane();
373
-
374 416
 				Categorie c = (Categorie) listC.getSelectedValue();
375 417
 
376 418
 				if(c == null)
@@ -381,7 +423,7 @@ public class InterfacePrincipale extends JFrame
381 423
 
382 424
 				String categorieName = c.getNom();
383 425
 
384
-				if(jop.showConfirmDialog(null,"Voulez vous vraiment supprimer la catégorie " + categorieName + " ?\nCela supprimera aussi toute les reponses et questions associé à cette catégorie.", "Supression de catégorie", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
426
+				if(JOptionPane.showConfirmDialog(null, "Voulez vous vraiment supprimer la catégorie " + categorieName + " ?\nCela supprimera aussi toute les reponses et questions associé à cette catégorie.", "Supression de catégorie", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
385 427
 				{
386 428
 					bdd.deleteCategorie(categorieName);
387 429
 					listC.setListData(bdd.getListeCategorie().toArray());
@@ -399,11 +441,9 @@ public class InterfacePrincipale extends JFrame
399 441
 					return;
400 442
 				}
401 443
 
402
-				JOptionPane jop = new JOptionPane();
403
-
404 444
 				String oldCatName = c.getNom();
405 445
 
406
-				String newCatName = jop.showInputDialog(null,
446
+				String newCatName = JOptionPane.showInputDialog(null,
407 447
 						"Nouveau nom pour la categorie " + oldCatName + ":",
408 448
 						"Renomer catégorie",
409 449
 						JOptionPane.QUESTION_MESSAGE);
@@ -456,8 +496,6 @@ public class InterfacePrincipale extends JFrame
456 496
 			}
457 497
 			else if(e.getSource() == delR)
458 498
 			{
459
-				JOptionPane jop = new JOptionPane();
460
-
461 499
 				Reponses r = (Reponses) listR.getSelectedValue();
462 500
 
463 501
 				if(r == null)
@@ -469,7 +507,7 @@ public class InterfacePrincipale extends JFrame
469 507
 				String reponse1 = r.getReponse1();
470 508
 				String reponse2 = r.getReponse2();
471 509
 
472
-				if(jop.showConfirmDialog(null,"Voulez vous vraiment supprimer le jeu de réponses " + reponse1 + ", " + reponse2 + " ?\nCela supprimera aussi toutes les questions associé à cette catégorie.", "Supression de réponses", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
510
+				if(JOptionPane.showConfirmDialog(null,"Voulez vous vraiment supprimer le jeu de réponses " + reponse1 + ", " + reponse2 + " ?\nCela supprimera aussi toutes les questions associé à cette catégorie.", "Supression de réponses", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
473 511
 				{
474 512
 					bdd.deleteReponses(reponse1, reponse2);
475 513
 					listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray());
@@ -536,8 +574,6 @@ public class InterfacePrincipale extends JFrame
536 574
 			}
537 575
 			else if(e.getSource() == delQ)
538 576
 			{
539
-				JOptionPane jop = new JOptionPane();
540
-
541 577
 				Question q = (Question) listQ.getSelectedValue();
542 578
 
543 579
 				if(q == null)
@@ -546,7 +582,7 @@ public class InterfacePrincipale extends JFrame
546 582
 					return;
547 583
 				}
548 584
 
549
-				if(jop.showConfirmDialog(null,"Voulez vous vraiment supprimer la question " + q.getIntitule() + " ?", "Supression de question", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
585
+				if(JOptionPane.showConfirmDialog(null, "Voulez vous vraiment supprimer la question " + q.getIntitule() + " ?", "Supression de question", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
550 586
 				{
551 587
 					bdd.deleteQuestion(q.getIntitule(), q.getReponse1(), q.getReponse2());
552 588
 					listQ.setListData(bdd.getListeQuestions(q.getReponse1(), q.getReponse2()).toArray());

+ 1
- 0
java/src/MainAdminBddBurgerQuizz.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import javax.swing.*;
2
+import java.util.Enumeration;
2 3
 
3 4
 public class MainAdminBddBurgerQuizz
4 5
 {

+ 1
- 0
java/src/NouvelleQuestionDialog.java Прегледај датотеку

@@ -71,6 +71,7 @@ public class NouvelleQuestionDialog extends JDialog implements ActionListener
71 71
 		else if(e.getSource() == ok) {
72 72
 			if(intitule.getText().isEmpty())
73 73
 			{
74
+				JOptionPane.showMessageDialog(this, "Les champs ne doivent pas être vide.", "Champs non remplis", JOptionPane.WARNING_MESSAGE);
74 75
 				return;
75 76
 			}
76 77
 			mofidEffectues = true;

+ 2
- 1
java/src/NouvelleReponseDialog.java Прегледај датотеку

@@ -33,7 +33,7 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
33 33
 		rep1.setBackground(Color.WHITE);
34 34
 		rep2.setBackground(Color.WHITE);
35 35
 
36
-		ok = new JButton("OK");
36
+		ok = new JButton("OK",  UIManager.getIcon("OptionPane.errorIcon"));
37 37
 		annuler = new JButton("Annuler");
38 38
 		ok.addActionListener(this);
39 39
 		annuler.addActionListener(this);
@@ -86,6 +86,7 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
86 86
 		else if(e.getSource() == ok) {
87 87
 			if(rep1.getText().isEmpty() || rep2.getText().isEmpty())
88 88
 			{
89
+				JOptionPane.showMessageDialog(this, "Les champs ne doivent pas être vide.", "Champs non remplis", JOptionPane.WARNING_MESSAGE);
89 90
 				return;
90 91
 			}
91 92
 			mofidEffectues = true;