Browse Source

++ gestion reponsesV4

PCYoshi 9 years ago
parent
commit
b752e3320b

+ 149
- 103
java/.idea/workspace.xml View File

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

BIN
java/out/production/java/ConnexionBDD.class View File


BIN
java/out/production/java/GestionQuestions.class View File


BIN
java/out/production/java/InterfacePrincipale$PanQuestionsListener.class View File


BIN
java/out/production/java/InterfacePrincipale$PanReponsesListener.class View File


+ 5
- 0
java/src/ConnexionBDD.java View File

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

+ 20
- 0
java/src/GestionQuestions.java View File

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

+ 30
- 4
java/src/InterfacePrincipale.java View File

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

+ 86
- 0
java/src/NouvelleQuestionDialog.java View File

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

+ 4
- 4
java/src/NouvelleReponseDialog.java View File

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