瀏覽代碼

modification parametre operationelle

PCYoshi 9 年之前
父節點
當前提交
8bb37aadb2

+ 282
- 98
java/.idea/workspace.xml 查看文件

@@ -7,6 +7,14 @@
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="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/ConfigBDD.java" />
11
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" />
12
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$1.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$1.class" />
13
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
14
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
15
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
16
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBddDialog.java" afterPath="$PROJECT_DIR$/src/ConnexionBddDialog.java" />
17
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
10 18
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
11 19
     </list>
12 20
     <ignored path="java.iws" />
@@ -29,72 +37,98 @@
29 37
   </component>
30 38
   <component name="FileEditorManager">
31 39
     <leaf>
32
-      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="true">
40
+      <file leaf-file-name="InterfacePrincipale.java" pinned="false" current-in-tab="false">
33 41
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
34 42
           <provider selected="true" editor-type-id="text-editor">
35
-            <state vertical-scroll-proportion="0.63323784">
36
-              <caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
43
+            <state vertical-scroll-proportion="0.0">
44
+              <caret line="302" column="63" selection-start-line="302" selection-start-column="63" selection-end-line="302" selection-end-column="63" />
37 45
               <folding>
38
-                <element signature="e#3561#3779#0" expanded="true" />
39
-                <element signature="e#3778#3779#0" expanded="true" />
46
+                <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
47
+                <element signature="e#3838#3952#0" expanded="true" />
48
+                <element signature="e#3951#3952#0" expanded="true" />
49
+                <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
50
+                <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
51
+                <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
52
+                <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
53
+                <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
54
+                <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
55
+                <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
56
+                <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
57
+                <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
58
+                <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
59
+                <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
60
+                <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
61
+                <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
62
+                <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
63
+                <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
64
+                <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
65
+                <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
40 66
               </folding>
41 67
             </state>
42 68
           </provider>
43 69
         </entry>
44 70
       </file>
45
-      <file leaf-file-name="MainAdminBddBurgerQuizz.java" pinned="false" current-in-tab="false">
46
-        <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
71
+      <file leaf-file-name="ConfigBDD.java" pinned="false" current-in-tab="false">
72
+        <entry file="file://$PROJECT_DIR$/src/ConfigBDD.java">
47 73
           <provider selected="true" editor-type-id="text-editor">
48 74
             <state vertical-scroll-proportion="0.0">
49
-              <caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
50
-              <folding />
75
+              <caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
76
+              <folding>
77
+                <element signature="imports" expanded="true" />
78
+                <element signature="e#120#121#0" expanded="true" />
79
+                <element signature="e#150#151#0" expanded="true" />
80
+                <element signature="e#900#901#0" expanded="true" />
81
+                <element signature="e#940#941#0" expanded="true" />
82
+                <element signature="e#981#982#0" expanded="true" />
83
+                <element signature="e#1022#1023#0" expanded="true" />
84
+                <element signature="e#1047#1048#0" expanded="true" />
85
+                <element signature="e#1103#1104#0" expanded="true" />
86
+                <element signature="e#1137#1138#0" expanded="true" />
87
+                <element signature="e#1190#1191#0" expanded="true" />
88
+                <element signature="e#1216#1217#0" expanded="true" />
89
+                <element signature="e#1252#1253#0" expanded="true" />
90
+                <element signature="e#1285#1286#0" expanded="true" />
91
+                <element signature="e#1318#1319#0" expanded="true" />
92
+                <element signature="e#1347#1348#0" expanded="true" />
93
+                <element signature="e#1386#1387#0" expanded="true" />
94
+                <element signature="e#1425#1426#0" expanded="true" />
95
+                <element signature="e#1464#1465#0" expanded="true" />
96
+                <element signature="e#1496#1497#0" expanded="true" />
97
+                <element signature="e#1538#1539#0" expanded="true" />
98
+                <element signature="e#1583#1584#0" expanded="true" />
99
+                <element signature="e#1628#1629#0" expanded="true" />
100
+              </folding>
51 101
             </state>
52 102
           </provider>
53 103
         </entry>
54 104
       </file>
55
-      <file leaf-file-name="ConnexionBddDialog.java" pinned="false" current-in-tab="false">
56
-        <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
105
+      <file leaf-file-name="MainAdminBddBurgerQuizz.java" pinned="false" current-in-tab="false">
106
+        <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
57 107
           <provider selected="true" editor-type-id="text-editor">
58 108
             <state vertical-scroll-proportion="0.0">
59
-              <caret line="96" column="8" selection-start-line="96" selection-start-column="8" selection-end-line="96" selection-end-column="8" />
60
-              <folding>
61
-                <element signature="imports" expanded="true" />
62
-                <element signature="e#2720#2721#0" expanded="true" />
63
-                <element signature="e#2750#2751#0" expanded="true" />
64
-                <element signature="e#2775#2776#0" expanded="true" />
65
-                <element signature="e#2810#2811#0" expanded="true" />
66
-                <element signature="e#2836#2837#0" expanded="true" />
67
-                <element signature="e#2862#2863#0" expanded="true" />
68
-                <element signature="e#2891#2892#0" expanded="true" />
69
-                <element signature="e#2920#2921#0" expanded="true" />
70
-                <element signature="e#2952#2953#0" expanded="true" />
71
-                <element signature="e#3004#3005#0" expanded="true" />
72
-              </folding>
109
+              <caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
110
+              <folding />
73 111
             </state>
74 112
           </provider>
75 113
         </entry>
76 114
       </file>
77
-      <file leaf-file-name="NouvelleQuestionDialog.java" pinned="false" current-in-tab="false">
78
-        <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
115
+      <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
116
+        <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
79 117
           <provider selected="true" editor-type-id="text-editor">
80 118
             <state vertical-scroll-proportion="0.0">
81
-              <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
119
+              <caret line="43" column="14" selection-start-line="43" selection-start-column="14" selection-end-line="43" selection-end-column="14" />
82 120
               <folding>
83 121
                 <element signature="imports" expanded="true" />
84
-                <element signature="e#2002#2003#0" expanded="true" />
85
-                <element signature="e#2034#2035#0" expanded="true" />
86
-                <element signature="e#2062#2063#0" expanded="true" />
87
-                <element signature="e#2102#2103#0" expanded="true" />
88 122
               </folding>
89 123
             </state>
90 124
           </provider>
91 125
         </entry>
92 126
       </file>
93
-      <file leaf-file-name="ConnexionBDD.java" pinned="false" current-in-tab="false">
94
-        <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
127
+      <file leaf-file-name="ConnexionBddDialog.java" pinned="false" current-in-tab="true">
128
+        <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
95 129
           <provider selected="true" editor-type-id="text-editor">
96
-            <state vertical-scroll-proportion="0.0">
97
-              <caret line="39" column="74" selection-start-line="39" selection-start-column="74" selection-end-line="39" selection-end-column="74" />
130
+            <state vertical-scroll-proportion="0.36567163">
131
+              <caret line="73" column="24" selection-start-line="73" selection-start-column="24" selection-end-line="73" selection-end-column="24" />
98 132
               <folding>
99 133
                 <element signature="imports" expanded="true" />
100 134
               </folding>
@@ -132,14 +166,16 @@
132 166
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
133 167
         <option value="$PROJECT_DIR$/src/Question.java" />
134 168
         <option value="$PROJECT_DIR$/src/GestionReponses.java" />
135
-        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
136 169
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
137 170
         <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
138 171
         <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
139
-        <option value="$PROJECT_DIR$/src/ConnexionBddDialog.java" />
140 172
         <option value="$PROJECT_DIR$/src/Bouton.java" />
141 173
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
174
+        <option value="$PROJECT_DIR$/src/configBDD.java" />
175
+        <option value="$PROJECT_DIR$/src/ConfigBDD.java" />
176
+        <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
142 177
         <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
178
+        <option value="$PROJECT_DIR$/src/ConnexionBddDialog.java" />
143 179
       </list>
144 180
     </option>
145 181
   </component>
@@ -260,6 +296,7 @@
260 296
     <panes>
261 297
       <pane id="Scratches" />
262 298
       <pane id="PackagesPane" />
299
+      <pane id="Scope" />
263 300
       <pane id="ProjectPane">
264 301
         <subPane>
265 302
           <PATH>
@@ -294,7 +331,6 @@
294 331
           </PATH>
295 332
         </subPane>
296 333
       </pane>
297
-      <pane id="Scope" />
298 334
     </panes>
299 335
   </component>
300 336
   <component name="PropertiesComponent">
@@ -625,7 +661,13 @@
625 661
       <option name="project" value="LOCAL" />
626 662
       <updated>1433351854490</updated>
627 663
     </task>
628
-    <option name="localTasksCounter" value="24" />
664
+    <task id="LOCAL-00024" summary="amelioration diverse concernant la boite de dialogue des parametres">
665
+      <created>1433352072706</created>
666
+      <option name="number" value="00024" />
667
+      <option name="project" value="LOCAL" />
668
+      <updated>1433352072706</updated>
669
+    </task>
670
+    <option name="localTasksCounter" value="25" />
629 671
     <servers />
630 672
   </component>
631 673
   <component name="TodoView">
@@ -639,7 +681,7 @@
639 681
   </component>
640 682
   <component name="ToolWindowManager">
641 683
     <frame x="-1" y="27" width="1368" height="712" extended-state="6" />
642
-    <editor active="false" />
684
+    <editor active="true" />
643 685
     <layout>
644 686
       <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" />
645 687
       <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" />
@@ -650,7 +692,7 @@
650 692
       <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" />
651 693
       <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" />
652 694
       <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" />
653
-      <window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32864675" sideWeight="0.49695587" order="10" side_tool="false" content_ui="tabs" />
695
+      <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" />
654 696
       <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" />
655 697
       <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" />
656 698
       <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" />
@@ -662,8 +704,8 @@
662 704
       <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" />
663 705
       <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" />
664 706
       <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" />
665
-      <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" />
666 707
       <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" />
708
+      <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" />
667 709
     </layout>
668 710
   </component>
669 711
   <component name="Vcs.Log.UiProperties">
@@ -712,20 +754,6 @@
712 754
     <option name="FILTER_TARGETS" value="false" />
713 755
   </component>
714 756
   <component name="editorHistoryManager">
715
-    <entry file="file://$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java">
716
-      <provider selected="true" editor-type-id="text-editor">
717
-        <state vertical-scroll-proportion="0.0">
718
-          <caret line="8" column="75" selection-start-line="8" selection-start-column="75" selection-end-line="8" selection-end-column="75" />
719
-        </state>
720
-      </provider>
721
-    </entry>
722
-    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
723
-      <provider selected="true" editor-type-id="text-editor">
724
-        <state vertical-scroll-proportion="0.0">
725
-          <caret line="11" column="73" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="73" />
726
-        </state>
727
-      </provider>
728
-    </entry>
729 757
     <entry file="file://$PROJECT_DIR$/mcd.png">
730 758
       <provider selected="true" editor-type-id="images">
731 759
         <state />
@@ -741,8 +769,26 @@
741 769
         <state vertical-scroll-proportion="0.0">
742 770
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
743 771
           <folding>
744
-            <element signature="e#3561#3779#0" expanded="true" />
745
-            <element signature="e#3778#3779#0" expanded="true" />
772
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
773
+            <element signature="e#3838#3952#0" expanded="true" />
774
+            <element signature="e#3951#3952#0" expanded="true" />
775
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
776
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
777
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
778
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
779
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
780
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
781
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
782
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
783
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
784
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
785
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
786
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
787
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
788
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
789
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
790
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
791
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
746 792
           </folding>
747 793
         </state>
748 794
       </provider>
@@ -776,8 +822,26 @@
776 822
         <state vertical-scroll-proportion="0.0">
777 823
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
778 824
           <folding>
779
-            <element signature="e#3561#3779#0" expanded="true" />
780
-            <element signature="e#3778#3779#0" expanded="true" />
825
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
826
+            <element signature="e#3838#3952#0" expanded="true" />
827
+            <element signature="e#3951#3952#0" expanded="true" />
828
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
829
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
830
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
831
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
832
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
833
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
834
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
835
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
836
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
837
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
838
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
839
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
840
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
841
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
842
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
843
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
844
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
781 845
           </folding>
782 846
         </state>
783 847
       </provider>
@@ -811,8 +875,26 @@
811 875
         <state vertical-scroll-proportion="0.0">
812 876
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
813 877
           <folding>
814
-            <element signature="e#3561#3779#0" expanded="true" />
815
-            <element signature="e#3778#3779#0" expanded="true" />
878
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
879
+            <element signature="e#3838#3952#0" expanded="true" />
880
+            <element signature="e#3951#3952#0" expanded="true" />
881
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
882
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
883
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
884
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
885
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
886
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
887
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
888
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
889
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
890
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
891
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
892
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
893
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
894
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
895
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
896
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
897
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
816 898
           </folding>
817 899
         </state>
818 900
       </provider>
@@ -846,8 +928,26 @@
846 928
         <state vertical-scroll-proportion="0.0">
847 929
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
848 930
           <folding>
849
-            <element signature="e#3561#3779#0" expanded="true" />
850
-            <element signature="e#3778#3779#0" expanded="true" />
931
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
932
+            <element signature="e#3838#3952#0" expanded="true" />
933
+            <element signature="e#3951#3952#0" expanded="true" />
934
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
935
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
936
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
937
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
938
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
939
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
940
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
941
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
942
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
943
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
944
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
945
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
946
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
947
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
948
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
949
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
950
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
851 951
           </folding>
852 952
         </state>
853 953
       </provider>
@@ -881,8 +981,26 @@
881 981
         <state vertical-scroll-proportion="0.0">
882 982
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
883 983
           <folding>
884
-            <element signature="e#3561#3779#0" expanded="true" />
885
-            <element signature="e#3778#3779#0" expanded="true" />
984
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
985
+            <element signature="e#3838#3952#0" expanded="true" />
986
+            <element signature="e#3951#3952#0" expanded="true" />
987
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
988
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
989
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
990
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
991
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
992
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
993
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
994
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
995
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
996
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
997
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
998
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
999
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1000
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1001
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1002
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
1003
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
886 1004
           </folding>
887 1005
         </state>
888 1006
       </provider>
@@ -937,8 +1055,26 @@
937 1055
         <state vertical-scroll-proportion="0.0">
938 1056
           <caret line="0" column="21" selection-start-line="0" selection-start-column="21" selection-end-line="0" selection-end-column="21" />
939 1057
           <folding>
940
-            <element signature="e#3561#3779#0" expanded="true" />
941
-            <element signature="e#3778#3779#0" expanded="true" />
1058
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1059
+            <element signature="e#3838#3952#0" expanded="true" />
1060
+            <element signature="e#3951#3952#0" expanded="true" />
1061
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1062
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
1063
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
1064
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1065
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1066
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
1067
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
1068
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
1069
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
1070
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1071
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1072
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1073
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1074
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1075
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1076
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
1077
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
942 1078
           </folding>
943 1079
         </state>
944 1080
       </provider>
@@ -1025,46 +1161,36 @@
1025 1161
         </state>
1026 1162
       </provider>
1027 1163
     </entry>
1028
-    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1164
+    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1029 1165
       <provider selected="true" editor-type-id="text-editor">
1030 1166
         <state vertical-scroll-proportion="0.0">
1031
-          <caret line="39" column="74" selection-start-line="39" selection-start-column="74" selection-end-line="39" selection-end-column="74" />
1167
+          <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
1032 1168
           <folding>
1033
-            <element signature="imports" expanded="true" />
1169
+            <element signature="imports" expanded="false" />
1170
+            <element signature="e#2002#2003#0" expanded="false" />
1171
+            <element signature="e#2034#2035#0" expanded="false" />
1172
+            <element signature="e#2062#2063#0" expanded="false" />
1173
+            <element signature="e#2102#2103#0" expanded="false" />
1034 1174
           </folding>
1035 1175
         </state>
1036 1176
       </provider>
1037 1177
     </entry>
1038
-    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1178
+    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
1039 1179
       <provider selected="true" editor-type-id="text-editor">
1040
-        <state vertical-scroll-proportion="0.0">
1041
-          <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
1180
+        <state vertical-scroll-proportion="0.20165746">
1181
+          <caret line="6" column="40" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
1042 1182
           <folding>
1043 1183
             <element signature="imports" expanded="true" />
1044
-            <element signature="e#2002#2003#0" expanded="true" />
1045
-            <element signature="e#2034#2035#0" expanded="true" />
1046
-            <element signature="e#2062#2063#0" expanded="true" />
1047
-            <element signature="e#2102#2103#0" expanded="true" />
1048 1184
           </folding>
1049 1185
         </state>
1050 1186
       </provider>
1051 1187
     </entry>
1052
-    <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
1188
+    <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1053 1189
       <provider selected="true" editor-type-id="text-editor">
1054 1190
         <state vertical-scroll-proportion="0.0">
1055
-          <caret line="96" column="8" selection-start-line="96" selection-start-column="8" selection-end-line="96" selection-end-column="8" />
1191
+          <caret line="43" column="14" selection-start-line="43" selection-start-column="14" selection-end-line="43" selection-end-column="14" />
1056 1192
           <folding>
1057 1193
             <element signature="imports" expanded="true" />
1058
-            <element signature="e#2720#2721#0" expanded="true" />
1059
-            <element signature="e#2750#2751#0" expanded="true" />
1060
-            <element signature="e#2775#2776#0" expanded="true" />
1061
-            <element signature="e#2810#2811#0" expanded="true" />
1062
-            <element signature="e#2836#2837#0" expanded="true" />
1063
-            <element signature="e#2862#2863#0" expanded="true" />
1064
-            <element signature="e#2891#2892#0" expanded="true" />
1065
-            <element signature="e#2920#2921#0" expanded="true" />
1066
-            <element signature="e#2952#2953#0" expanded="true" />
1067
-            <element signature="e#3004#3005#0" expanded="true" />
1068 1194
           </folding>
1069 1195
         </state>
1070 1196
       </provider>
@@ -1077,23 +1203,81 @@
1077 1203
         </state>
1078 1204
       </provider>
1079 1205
     </entry>
1080
-    <entry file="file://$PROJECT_DIR$/src/Bouton.java">
1206
+    <entry file="file://$PROJECT_DIR$/conf.xml">
1081 1207
       <provider selected="true" editor-type-id="text-editor">
1082
-        <state vertical-scroll-proportion="0.20165746">
1083
-          <caret line="6" column="40" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
1208
+        <state vertical-scroll-proportion="0.0">
1209
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
1210
+          <folding />
1211
+        </state>
1212
+      </provider>
1213
+    </entry>
1214
+    <entry file="file://$PROJECT_DIR$/src/ConfigBDD.java">
1215
+      <provider selected="true" editor-type-id="text-editor">
1216
+        <state vertical-scroll-proportion="0.0">
1217
+          <caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
1084 1218
           <folding>
1085 1219
             <element signature="imports" expanded="true" />
1220
+            <element signature="e#120#121#0" expanded="true" />
1221
+            <element signature="e#150#151#0" expanded="true" />
1222
+            <element signature="e#900#901#0" expanded="true" />
1223
+            <element signature="e#940#941#0" expanded="true" />
1224
+            <element signature="e#981#982#0" expanded="true" />
1225
+            <element signature="e#1022#1023#0" expanded="true" />
1226
+            <element signature="e#1047#1048#0" expanded="true" />
1227
+            <element signature="e#1103#1104#0" expanded="true" />
1228
+            <element signature="e#1137#1138#0" expanded="true" />
1229
+            <element signature="e#1190#1191#0" expanded="true" />
1230
+            <element signature="e#1216#1217#0" expanded="true" />
1231
+            <element signature="e#1252#1253#0" expanded="true" />
1232
+            <element signature="e#1285#1286#0" expanded="true" />
1233
+            <element signature="e#1318#1319#0" expanded="true" />
1234
+            <element signature="e#1347#1348#0" expanded="true" />
1235
+            <element signature="e#1386#1387#0" expanded="true" />
1236
+            <element signature="e#1425#1426#0" expanded="true" />
1237
+            <element signature="e#1464#1465#0" expanded="true" />
1238
+            <element signature="e#1496#1497#0" expanded="true" />
1239
+            <element signature="e#1538#1539#0" expanded="true" />
1240
+            <element signature="e#1583#1584#0" expanded="true" />
1241
+            <element signature="e#1628#1629#0" expanded="true" />
1086 1242
           </folding>
1087 1243
         </state>
1088 1244
       </provider>
1089 1245
     </entry>
1090 1246
     <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1091 1247
       <provider selected="true" editor-type-id="text-editor">
1092
-        <state vertical-scroll-proportion="0.63323784">
1093
-          <caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
1248
+        <state vertical-scroll-proportion="0.0">
1249
+          <caret line="302" column="63" selection-start-line="302" selection-start-column="63" selection-end-line="302" selection-end-column="63" />
1094 1250
           <folding>
1095
-            <element signature="e#3561#3779#0" expanded="true" />
1096
-            <element signature="e#3778#3779#0" expanded="true" />
1251
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1252
+            <element signature="e#3838#3952#0" expanded="true" />
1253
+            <element signature="e#3951#3952#0" expanded="true" />
1254
+            <element signature="method#createPanelCategories#0;class#InterfacePrincipale#0" expanded="false" />
1255
+            <element signature="method#createPanelReponses#0;class#InterfacePrincipale#0" expanded="false" />
1256
+            <element signature="method#createPanelQuestion#0;class#InterfacePrincipale#0" expanded="false" />
1257
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1258
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1259
+            <element signature="method#reSelectCategorie#0;class#InterfacePrincipale#0" expanded="false" />
1260
+            <element signature="method#reSelectReponses#0;class#InterfacePrincipale#0" expanded="false" />
1261
+            <element signature="method#reSelectQuestion#0;class#InterfacePrincipale#0" expanded="false" />
1262
+            <element signature="method#getCategorieList#0;class#InterfacePrincipale#0" expanded="false" />
1263
+            <element signature="class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1264
+            <element signature="method#actionPerformed#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1265
+            <element signature="method#valueChanged#0;class#PanCategoriesListener#0;class#InterfacePrincipale#0" expanded="false" />
1266
+            <element signature="class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1267
+            <element signature="method#actionPerformed#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1268
+            <element signature="method#valueChanged#0;class#PanReponsesListener#0;class#InterfacePrincipale#0" expanded="false" />
1269
+            <element signature="class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
1270
+            <element signature="method#actionPerformed#0;class#PanQuestionsListener#0;class#InterfacePrincipale#0" expanded="false" />
1271
+          </folding>
1272
+        </state>
1273
+      </provider>
1274
+    </entry>
1275
+    <entry file="file://$PROJECT_DIR$/src/ConnexionBddDialog.java">
1276
+      <provider selected="true" editor-type-id="text-editor">
1277
+        <state vertical-scroll-proportion="0.36567163">
1278
+          <caret line="73" column="24" selection-start-line="73" selection-start-column="24" selection-end-line="73" selection-end-column="24" />
1279
+          <folding>
1280
+            <element signature="imports" expanded="true" />
1097 1281
           </folding>
1098 1282
         </state>
1099 1283
       </provider>

二進制
java/out/production/java/ConnexionBDD.class 查看文件


二進制
java/out/production/java/InterfacePrincipale$1.class 查看文件


二進制
java/out/production/java/InterfacePrincipale$PanQuestionsListener.class 查看文件


二進制
java/out/production/java/InterfacePrincipale$PanReponsesListener.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
+}

+ 8
- 5
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 42
 			System.out.println("Erreur de conexion à la base de données");
41
-			System.exit(1);
43
+			return false;
44
+			//System.exit(1);
42 45
 		}
43 46
 	}
44 47
 

+ 18
- 5
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 24
 		super(parent, "Paramétres BDD", 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());
@@ -46,10 +47,12 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
46 47
 		ok = new JButton("OK");
47 48
 		annuler = new JButton("Annuler");
48 49
 		defParams = new JButton("Paramétres de connexion par défault");
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);
@@ -90,11 +94,20 @@ public class ConnexionBddDialog extends JDialog implements ActionListener
90 94
 			login.setText("alain");
91 95
 			password.setText("chabat");
92 96
 		}
93
-		else
97
+		else if(e.getSource() == annuler)
94 98
 		{
95 99
 			modifEffectuees = false;
96 100
 			setVisible(false);
97 101
 		}
102
+		else if(e.getSource() == ok)
103
+		{
104
+			modifEffectuees = true;
105
+			setVisible(false);
106
+		}
107
+		else if(e.getSource() == quitter)
108
+		{
109
+			System.exit(0);
110
+		}
98 111
 	}
99 112
 
100 113
 	public String getNomBdd() {

+ 32
- 3
java/src/InterfacePrincipale.java 查看文件

@@ -47,10 +47,23 @@ 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
-		bdd = new ConnexionBDD("burgerquizz", 3306, "localhost", "alain", "chabat");
54
+		configBDD = new ConfigBDD();
55
+		configBDD.loadConf();
56
+		bdd = new ConnexionBDD();
57
+
58
+		boolean conOK = false;
59
+		do
60
+		{
61
+			conOK = bdd.connect(configBDD.getNomBdd(), configBDD.getPort(), configBDD.getIp(), configBDD.getLogin(), configBDD.getPassword());
62
+			if(conOK == false)
63
+			{
64
+				configureBDD(true);
65
+			}
66
+		}while(!conOK);
54 67
 
55 68
 		setTitle("Administration base de données de l'aplication BurgerQuizz");
56 69
 		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -123,8 +136,7 @@ public class InterfacePrincipale extends JFrame
123 136
 
124 137
 		config.addActionListener(new ActionListener() {
125 138
 			public void actionPerformed(ActionEvent actionEvent) {
126
-				ConnexionBddDialog cbddd = new ConnexionBddDialog("efr",85,"42:42:42:42","eflgr","fmr,grgerge", null);
127
-				cbddd.afficher();
139
+				configureBDD(false);
128 140
 			}
129 141
 		});
130 142
 	}
@@ -284,6 +296,23 @@ public class InterfacePrincipale extends JFrame
284 296
 		pack();
285 297
 	}
286 298
 
299
+	public void configureBDD(boolean showExitButton)
300
+	{
301
+		ConnexionBddDialog cbddd = new ConnexionBddDialog(configBDD.getNomBdd(), configBDD.getPort(),
302
+				configBDD.getIp(), configBDD.getLogin(),
303
+				configBDD.getPassword(), null, showExitButton);
304
+		if(cbddd.afficher() == true)
305
+		{
306
+			configBDD.setNomBdd(cbddd.getNomBdd());
307
+			configBDD.setIp(cbddd.getIp());
308
+			configBDD.setPort(cbddd.getPort());
309
+			configBDD.setLogin(cbddd.getLogin());
310
+			configBDD.setPassword(cbddd.getPassword());
311
+
312
+			configBDD.saveConf();
313
+		}
314
+	}
315
+
287 316
 	private void reSelectCategorie(String newCatName)
288 317
 	{
289 318
 		Object[] tabObject = bdd.getListeCategorie().toArray();