| 
				
			 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				 package InterfaceGraphique; 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				3
			 | 
			
			
				+import GestionErreurs.BDDException; 
			 | 
		
	
		
			
			| 
				3
			 | 
			
				4
			 | 
			
			
				 import InterfaceGraphique.DialogBoxes.ConnexionBddDialog; 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				5
			 | 
			
			
				 import InterfaceGraphique.DialogBoxes.NouvelleQuestionDialog; 
			 | 
		
	
		
			
			| 
				5
			 | 
			
				6
			 | 
			
			
				 import InterfaceGraphique.DialogBoxes.NouvelleReponseDialog; 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -60,6 +61,11 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				61
			 | 
			
			
				 	private ConnexionBDD bdd; 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				62
			 | 
			
			
				 	private ConfigBDD configBDD; 
			 | 
		
	
		
			
			| 
				62
			 | 
			
				63
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				64
			 | 
			
			
				+	//cst couleur 
			 | 
		
	
		
			
			| 
				
			 | 
			
				65
			 | 
			
			
				+	private static final Color ERROR_COLOR = Color.RED; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				66
			 | 
			
			
				+	private static final Color INFO_COLOR = Color.CYAN; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				67
			 | 
			
			
				+	private static final Color NORMAL_COLOR = Color.BLACK; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				68
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				69
			 | 
			
			
				 	public InterfacePrincipale() 
			 | 
		
	
		
			
			| 
				64
			 | 
			
				70
			 | 
			
			
				 	{ 
			 | 
		
	
		
			
			| 
				65
			 | 
			
				71
			 | 
			
			
				 		configBDD = new ConfigBDD(); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -73,10 +79,10 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				79
			 | 
			
			
				 		setLayout(new BorderLayout()); 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				80
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				75
			 | 
			
				81
			 | 
			
			
				 		loadImgBouton(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				82
			 | 
			
			
				+		createStatusBar(); 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				83
			 | 
			
			
				 		createPanelCategories(); 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				84
			 | 
			
			
				 		createPanelReponses(); 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				85
			 | 
			
			
				 		createPanelQuestion(); 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				
			 | 
			
			
				-		createStatusBar(); 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				86
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				81
			 | 
			
				87
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				82
			 | 
			
				88
			 | 
			
			
				 		JSplitPane sp2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,panReponses,panQuestions); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -120,7 +126,6 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				120
			 | 
			
				126
			 | 
			
			
				 	private void createStatusBar() 
			 | 
		
	
		
			
			| 
				121
			 | 
			
				127
			 | 
			
			
				 	{ 
			 | 
		
	
		
			
			| 
				122
			 | 
			
				128
			 | 
			
			
				 		statusBar = new JPanel(new BorderLayout(0,0)); 
			 | 
		
	
		
			
			| 
				123
			 | 
			
				
			 | 
			
			
				-		statusText = new JLabel("Application demarrée, connexion à la base de donné effective. "); 
			 | 
		
	
		
			
			| 
				124
			 | 
			
				129
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				125
			 | 
			
				130
			 | 
			
			
				 		Border border = BorderFactory.createMatteBorder(3,0,0,0, new Color(220,220,220)); 
			 | 
		
	
		
			
			| 
				126
			 | 
			
				131
			 | 
			
			
				 		statusBar.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10,70,5,70),border)); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -141,9 +146,17 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				141
			 | 
			
				146
			 | 
			
			
				 			public void actionPerformed(ActionEvent actionEvent) { 
			 | 
		
	
		
			
			| 
				142
			 | 
			
				147
			 | 
			
			
				 				configureBDD(false); 
			 | 
		
	
		
			
			| 
				143
			 | 
			
				148
			 | 
			
			
				 				tryToConnect(); 
			 | 
		
	
		
			
			| 
				144
			 | 
			
				
			 | 
			
			
				-				listC.setListData(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				145
			 | 
			
				
			 | 
			
			
				-				listR.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				146
			 | 
			
				
			 | 
			
			
				-				listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				149
			 | 
			
			
				+				try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				150
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				151
			 | 
			
			
				+					listC.setListData(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				152
			 | 
			
			
				+					listR.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				153
			 | 
			
			
				+					listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				154
			 | 
			
			
				+					setStatusText("Connexion à la base de données établie."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				155
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				156
			 | 
			
			
				+				catch (BDDException e) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				157
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				158
			 | 
			
			
				+					setStatusText(e.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				159
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				147
			 | 
			
				160
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				148
			 | 
			
				161
			 | 
			
			
				 		}); 
			 | 
		
	
		
			
			| 
				149
			 | 
			
				162
			 | 
			
			
				 	} 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -155,7 +168,16 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				168
			 | 
			
			
				 		delC = new Bouton("Supprimer la catégorie", delImg); 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				169
			 | 
			
			
				 		editC = new Bouton("Modifier la catégorie", editImg); 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				170
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				158
			 | 
			
				
			 | 
			
			
				-		listC = new JList(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				171
			 | 
			
			
				+		try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				172
			 | 
			
			
				+		{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				173
			 | 
			
			
				+			listC = new JList(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				174
			 | 
			
			
				+			setStatusText("Application demarrée, connexion à la base de données initiée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				175
			 | 
			
			
				+		} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				176
			 | 
			
			
				+		catch (BDDException e) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				177
			 | 
			
			
				+		{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				178
			 | 
			
			
				+			setStatusText(e.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				179
			 | 
			
			
				+		} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				180
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				159
			 | 
			
				181
			 | 
			
			
				 		JScrollPane sp = new JScrollPane(listC, 
			 | 
		
	
		
			
			| 
				160
			 | 
			
				182
			 | 
			
			
				 				JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, 
			 | 
		
	
		
			
			| 
				161
			 | 
			
				183
			 | 
			
			
				 				JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -340,7 +362,13 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				340
			 | 
			
				362
			 | 
			
			
				 		statusText.setText(message); 
			 | 
		
	
		
			
			| 
				341
			 | 
			
				363
			 | 
			
			
				 	} 
			 | 
		
	
		
			
			| 
				342
			 | 
			
				364
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				343
			 | 
			
				
			 | 
			
			
				-	private void reSelectCategorie(String newCatName) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				365
			 | 
			
			
				+	private void setStatusText(String message) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				366
			 | 
			
			
				+	{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				367
			 | 
			
			
				+		statusText.setForeground(NORMAL_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				368
			 | 
			
			
				+		statusText.setText(message); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				369
			 | 
			
			
				+	} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				370
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				371
			 | 
			
			
				+	private void reSelectCategorie(String newCatName) throws BDDException 
			 | 
		
	
		
			
			| 
				344
			 | 
			
				372
			 | 
			
			
				 	{ 
			 | 
		
	
		
			
			| 
				345
			 | 
			
				373
			 | 
			
			
				 		Object[] tabObject = bdd.getListeCategorie().toArray(); 
			 | 
		
	
		
			
			| 
				346
			 | 
			
				374
			 | 
			
			
				 		Categorie[] tabCategorie = Arrays.copyOf(tabObject, tabObject.length, Categorie[].class); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -356,7 +384,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				356
			 | 
			
				384
			 | 
			
			
				 		} 
			 | 
		
	
		
			
			| 
				357
			 | 
			
				385
			 | 
			
			
				 	} 
			 | 
		
	
		
			
			| 
				358
			 | 
			
				386
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				359
			 | 
			
				
			 | 
			
			
				-	private void reSelectReponses(String rep1, String rep2) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				387
			 | 
			
			
				+	private void reSelectReponses(String rep1, String rep2) throws BDDException 
			 | 
		
	
		
			
			| 
				360
			 | 
			
				388
			 | 
			
			
				 	{ 
			 | 
		
	
		
			
			| 
				361
			 | 
			
				389
			 | 
			
			
				 		Object[] tabObject = bdd.getListeReponses(listC.getSelectedValue().toString()).toArray(); 
			 | 
		
	
		
			
			| 
				362
			 | 
			
				390
			 | 
			
			
				 		Reponses[] tabReponses = Arrays.copyOf(tabObject, tabObject.length, Reponses[].class); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -372,7 +400,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				372
			 | 
			
				400
			 | 
			
			
				 		} 
			 | 
		
	
		
			
			| 
				373
			 | 
			
				401
			 | 
			
			
				 	} 
			 | 
		
	
		
			
			| 
				374
			 | 
			
				402
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				375
			 | 
			
				
			 | 
			
			
				-	private void reSelectQuestion(String intitule) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				403
			 | 
			
			
				+	private void reSelectQuestion(String intitule) throws BDDException 
			 | 
		
	
		
			
			| 
				376
			 | 
			
				404
			 | 
			
			
				 	{ 
			 | 
		
	
		
			
			| 
				377
			 | 
			
				405
			 | 
			
			
				 		Reponses r = (Reponses) listR.getSelectedValue(); 
			 | 
		
	
		
			
			| 
				378
			 | 
			
				406
			 | 
			
			
				 		Object[] tabObject = bdd.getListeQuestions(r.getReponse1(), r.getReponse2()).toArray(); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -419,13 +447,21 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				419
			 | 
			
				447
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				420
			 | 
			
				448
			 | 
			
			
				 				else if(catName.isEmpty()) 
			 | 
		
	
		
			
			| 
				421
			 | 
			
				449
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				422
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Une categorie ne peut porter un nom vide."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				450
			 | 
			
			
				+					setStatusText("Une categorie ne peut porter un nom vide.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				423
			 | 
			
				451
			 | 
			
			
				 					return ; 
			 | 
		
	
		
			
			| 
				424
			 | 
			
				452
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				425
			 | 
			
				453
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				426
			 | 
			
				
			 | 
			
			
				-				bdd.createCategorie(catName); 
			 | 
		
	
		
			
			| 
				427
			 | 
			
				
			 | 
			
			
				-				reSelectCategorie(catName); 
			 | 
		
	
		
			
			| 
				428
			 | 
			
				
			 | 
			
			
				-				listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				454
			 | 
			
			
				+				try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				455
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				456
			 | 
			
			
				+					bdd.createCategorie(catName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				457
			 | 
			
			
				+					reSelectCategorie(catName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				458
			 | 
			
			
				+					listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				459
			 | 
			
			
				+					setStatusText("La catégorie " + catName + " à bien été créée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				460
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				461
			 | 
			
			
				+				catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				462
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				463
			 | 
			
			
				+					setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				464
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				429
			 | 
			
				465
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				430
			 | 
			
				466
			 | 
			
			
				 			else if(e.getSource() == delC) 
			 | 
		
	
		
			
			| 
				431
			 | 
			
				467
			 | 
			
			
				 			{ 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -433,7 +469,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				433
			 | 
			
				469
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				434
			 | 
			
				470
			 | 
			
			
				 				if(c == null) 
			 | 
		
	
		
			
			| 
				435
			 | 
			
				471
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				436
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner une categorie."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				472
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner une categorie.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				437
			 | 
			
				473
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				438
			 | 
			
				474
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				439
			 | 
			
				475
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -441,10 +477,18 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				441
			 | 
			
				477
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				442
			 | 
			
				478
			 | 
			
			
				 				if(JOptionPane.showConfirmDialog(null, "Voulez vous vraiment supprimer la catégorie " + categorieName + " ?\nCela supprimera aussi toute les reponses et questions associé à cette catégorie.", "Supression de catégorie", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) 
			 | 
		
	
		
			
			| 
				443
			 | 
			
				479
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				444
			 | 
			
				
			 | 
			
			
				-					bdd.deleteCategorie(categorieName); 
			 | 
		
	
		
			
			| 
				445
			 | 
			
				
			 | 
			
			
				-					listC.setListData(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				446
			 | 
			
				
			 | 
			
			
				-					listR.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				447
			 | 
			
				
			 | 
			
			
				-					listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				480
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				481
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				482
			 | 
			
			
				+						bdd.deleteCategorie(categorieName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				483
			 | 
			
			
				+						listC.setListData(bdd.getListeCategorie().toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				484
			 | 
			
			
				+						listR.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				485
			 | 
			
			
				+						listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				486
			 | 
			
			
				+						setStatusText("La catégorie " + categorieName + "à bien été suprimée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				487
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				488
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				489
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				490
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				491
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				448
			 | 
			
				492
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				449
			 | 
			
				493
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				450
			 | 
			
				494
			 | 
			
			
				 			else if(e.getSource() == editC) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -453,7 +497,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				453
			 | 
			
				497
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				454
			 | 
			
				498
			 | 
			
			
				 				if(c == null) 
			 | 
		
	
		
			
			| 
				455
			 | 
			
				499
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				456
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner une categorie."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				500
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner une categorie.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				457
			 | 
			
				501
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				458
			 | 
			
				502
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				459
			 | 
			
				503
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -470,12 +514,20 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				470
			 | 
			
				514
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				471
			 | 
			
				515
			 | 
			
			
				 				else if(newCatName.isEmpty()) 
			 | 
		
	
		
			
			| 
				472
			 | 
			
				516
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				473
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Une categorie ne peut porter un nom vide."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				517
			 | 
			
			
				+					setStatusText("Une categorie ne peut porter un nom vide.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				474
			 | 
			
				518
			 | 
			
			
				 					return ; 
			 | 
		
	
		
			
			| 
				475
			 | 
			
				519
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				476
			 | 
			
				520
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				477
			 | 
			
				
			 | 
			
			
				-				bdd.renameCategorie(oldCatName, newCatName); 
			 | 
		
	
		
			
			| 
				478
			 | 
			
				
			 | 
			
			
				-				reSelectCategorie(newCatName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				521
			 | 
			
			
				+				try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				522
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				523
			 | 
			
			
				+					bdd.renameCategorie(oldCatName, newCatName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				524
			 | 
			
			
				+					reSelectCategorie(newCatName); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				525
			 | 
			
			
				+					setStatusText("La catégorie " + oldCatName + " à bien été renomée en " + newCatName + "."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				526
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				527
			 | 
			
			
				+				catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				528
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				529
			 | 
			
			
				+					setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				530
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				479
			 | 
			
				531
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				480
			 | 
			
				532
			 | 
			
			
				 		} 
			 | 
		
	
		
			
			| 
				481
			 | 
			
				533
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -483,8 +535,15 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				483
			 | 
			
				535
			 | 
			
			
				 		{ 
			 | 
		
	
		
			
			| 
				484
			 | 
			
				536
			 | 
			
			
				 			if(!listC.isSelectionEmpty()) 
			 | 
		
	
		
			
			| 
				485
			 | 
			
				537
			 | 
			
			
				 			{ 
			 | 
		
	
		
			
			| 
				486
			 | 
			
				
			 | 
			
			
				-				listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray()); 
			 | 
		
	
		
			
			| 
				487
			 | 
			
				
			 | 
			
			
				-				listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				538
			 | 
			
			
				+				try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				539
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				540
			 | 
			
			
				+					listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				541
			 | 
			
			
				+					listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				542
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				543
			 | 
			
			
				+				catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				544
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				545
			 | 
			
			
				+					setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				546
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				488
			 | 
			
				547
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				489
			 | 
			
				548
			 | 
			
			
				 		} 
			 | 
		
	
		
			
			| 
				490
			 | 
			
				549
			 | 
			
			
				 	} 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -495,7 +554,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				495
			 | 
			
				554
			 | 
			
			
				 		{ 
			 | 
		
	
		
			
			| 
				496
			 | 
			
				555
			 | 
			
			
				 			if(listC.isSelectionEmpty()) 
			 | 
		
	
		
			
			| 
				497
			 | 
			
				556
			 | 
			
			
				 			{ 
			 | 
		
	
		
			
			| 
				498
			 | 
			
				
			 | 
			
			
				-				statusText.setText("Veuillez selectioner une catégorie."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				557
			 | 
			
			
				+				setStatusText("Veuillez selectioner une catégorie.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				499
			 | 
			
				558
			 | 
			
			
				 				return; 
			 | 
		
	
		
			
			| 
				500
			 | 
			
				559
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				501
			 | 
			
				560
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -505,8 +564,16 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				505
			 | 
			
				564
			 | 
			
			
				 				if(nrd.afficher() == true) 
			 | 
		
	
		
			
			| 
				506
			 | 
			
				565
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				507
			 | 
			
				566
			 | 
			
			
				 					String catName = listC.getSelectedValue().toString(); 
			 | 
		
	
		
			
			| 
				508
			 | 
			
				
			 | 
			
			
				-					bdd.createReponses(catName, nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				509
			 | 
			
				
			 | 
			
			
				-					reSelectReponses(nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				567
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				568
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				569
			 | 
			
			
				+						bdd.createReponses(catName, nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				570
			 | 
			
			
				+						reSelectReponses(nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				571
			 | 
			
			
				+						setStatusText("Le jeu de réponse à bien été créé."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				572
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				573
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				574
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				575
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				576
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				510
			 | 
			
				577
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				511
			 | 
			
				578
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				512
			 | 
			
				579
			 | 
			
			
				 			else if(e.getSource() == delR) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -515,7 +582,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				515
			 | 
			
				582
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				516
			 | 
			
				583
			 | 
			
			
				 				if(r == null) 
			 | 
		
	
		
			
			| 
				517
			 | 
			
				584
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				518
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner un jeu de réponses."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				585
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner un jeu de réponses.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				519
			 | 
			
				586
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				520
			 | 
			
				587
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				521
			 | 
			
				588
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -524,9 +591,17 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				524
			 | 
			
				591
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				525
			 | 
			
				592
			 | 
			
			
				 				if(JOptionPane.showConfirmDialog(null,"Voulez vous vraiment supprimer le jeu de réponses " + reponse1 + ", " + reponse2 + " ?\nCela supprimera aussi toutes les questions associé à cette catégorie.", "Supression de réponses", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) 
			 | 
		
	
		
			
			| 
				526
			 | 
			
				593
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				527
			 | 
			
				
			 | 
			
			
				-					bdd.deleteReponses(reponse1, reponse2); 
			 | 
		
	
		
			
			| 
				528
			 | 
			
				
			 | 
			
			
				-					listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray()); 
			 | 
		
	
		
			
			| 
				529
			 | 
			
				
			 | 
			
			
				-					listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				594
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				595
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				596
			 | 
			
			
				+						bdd.deleteReponses(reponse1, reponse2); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				597
			 | 
			
			
				+						listR.setListData(bdd.getListeReponses(listC.getSelectedValue().toString()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				598
			 | 
			
			
				+						listQ.setListData(new Vector(0)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				599
			 | 
			
			
				+						setStatusText("Le jeu de réponse à bien été suprimé."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				600
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				601
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				602
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				603
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				604
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				530
			 | 
			
				605
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				531
			 | 
			
				606
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				532
			 | 
			
				607
			 | 
			
			
				 			else if(e.getSource() == editR) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -535,7 +610,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				535
			 | 
			
				610
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				536
			 | 
			
				611
			 | 
			
			
				 				if(r == null) 
			 | 
		
	
		
			
			| 
				537
			 | 
			
				612
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				538
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner un jeu de réponses."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				613
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner un jeu de réponses.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				539
			 | 
			
				614
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				540
			 | 
			
				615
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				541
			 | 
			
				616
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -546,9 +621,17 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				546
			 | 
			
				621
			 | 
			
			
				 				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Modification jeu de réponses", reponse1, reponse2, catName, getCategorieList(), null); 
			 | 
		
	
		
			
			| 
				547
			 | 
			
				622
			 | 
			
			
				 				if(nrd.afficher() == true) 
			 | 
		
	
		
			
			| 
				548
			 | 
			
				623
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				549
			 | 
			
				
			 | 
			
			
				-					bdd.modifyReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				550
			 | 
			
				
			 | 
			
			
				-					reSelectCategorie(nrd.getCat()); 
			 | 
		
	
		
			
			| 
				551
			 | 
			
				
			 | 
			
			
				-					reSelectReponses(nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				624
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				625
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				626
			 | 
			
			
				+						bdd.modifyReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				627
			 | 
			
			
				+						reSelectCategorie(nrd.getCat()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				628
			 | 
			
			
				+						reSelectReponses(nrd.getRep1(), nrd.getRep2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				629
			 | 
			
			
				+						setStatusText("Le jeu de réponse à bien été modifié."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				630
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				631
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				632
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				633
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				634
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				552
			 | 
			
				635
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				553
			 | 
			
				636
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				554
			 | 
			
				637
			 | 
			
			
				 		} 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -558,7 +641,14 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				558
			 | 
			
				641
			 | 
			
			
				 			if(!listR.isSelectionEmpty()) 
			 | 
		
	
		
			
			| 
				559
			 | 
			
				642
			 | 
			
			
				 			{ 
			 | 
		
	
		
			
			| 
				560
			 | 
			
				643
			 | 
			
			
				 				Reponses r = (Reponses) listR.getSelectedValue(); 
			 | 
		
	
		
			
			| 
				561
			 | 
			
				
			 | 
			
			
				-				listQ.setListData(bdd.getListeQuestions(r.getReponse1(), r.getReponse2()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				644
			 | 
			
			
				+				try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				645
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				646
			 | 
			
			
				+					listQ.setListData(bdd.getListeQuestions(r.getReponse1(), r.getReponse2()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				647
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				648
			 | 
			
			
				+				catch (BDDException e) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				649
			 | 
			
			
				+				{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				650
			 | 
			
			
				+					setStatusText(e.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				651
			 | 
			
			
				+				} 
			 | 
		
	
		
			
			| 
				562
			 | 
			
				652
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				563
			 | 
			
				653
			 | 
			
			
				 		} 
			 | 
		
	
		
			
			| 
				564
			 | 
			
				654
			 | 
			
			
				 	} 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -569,7 +659,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				569
			 | 
			
				659
			 | 
			
			
				 		{ 
			 | 
		
	
		
			
			| 
				570
			 | 
			
				660
			 | 
			
			
				 			if(listR.isSelectionEmpty()) 
			 | 
		
	
		
			
			| 
				571
			 | 
			
				661
			 | 
			
			
				 			{ 
			 | 
		
	
		
			
			| 
				572
			 | 
			
				
			 | 
			
			
				-				statusText.setText("Veuillez selectioner une sous-catégorie."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				662
			 | 
			
			
				+				setStatusText("Veuillez selectioner une sous-catégorie.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				573
			 | 
			
				663
			 | 
			
			
				 				return; 
			 | 
		
	
		
			
			| 
				574
			 | 
			
				664
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				575
			 | 
			
				665
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -581,8 +671,16 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				581
			 | 
			
				671
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				582
			 | 
			
				672
			 | 
			
			
				 				if(nqd.afficher() == true) 
			 | 
		
	
		
			
			| 
				583
			 | 
			
				673
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				584
			 | 
			
				
			 | 
			
			
				-					bdd.createQuestion(nqd.getIntitule(), r.getReponse1(), r.getReponse2(), nqd.getReponse()); 
			 | 
		
	
		
			
			| 
				585
			 | 
			
				
			 | 
			
			
				-					reSelectQuestion(nqd.getIntitule()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				674
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				675
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				676
			 | 
			
			
				+						bdd.createQuestion(nqd.getIntitule(), r.getReponse1(), r.getReponse2(), nqd.getReponse()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				677
			 | 
			
			
				+						reSelectQuestion(nqd.getIntitule()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				678
			 | 
			
			
				+						setStatusText("La question à bien été créée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				679
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				680
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				681
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				682
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				683
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				586
			 | 
			
				684
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				587
			 | 
			
				685
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				588
			 | 
			
				686
			 | 
			
			
				 			else if(e.getSource() == delQ) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -591,14 +689,22 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				591
			 | 
			
				689
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				592
			 | 
			
				690
			 | 
			
			
				 				if(q == null) 
			 | 
		
	
		
			
			| 
				593
			 | 
			
				691
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				594
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner une question."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				692
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner une question.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				595
			 | 
			
				693
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				596
			 | 
			
				694
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				597
			 | 
			
				695
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				598
			 | 
			
				696
			 | 
			
			
				 				if(JOptionPane.showConfirmDialog(null, "Voulez vous vraiment supprimer la question " + q.getIntitule() + " ?", "Supression de question", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) 
			 | 
		
	
		
			
			| 
				599
			 | 
			
				697
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				600
			 | 
			
				
			 | 
			
			
				-					bdd.deleteQuestion(q.getIntitule(), q.getReponse1(), q.getReponse2()); 
			 | 
		
	
		
			
			| 
				601
			 | 
			
				
			 | 
			
			
				-					listQ.setListData(bdd.getListeQuestions(q.getReponse1(), q.getReponse2()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				698
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				699
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				700
			 | 
			
			
				+						bdd.deleteQuestion(q.getIntitule(), q.getReponse1(), q.getReponse2()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				701
			 | 
			
			
				+						listQ.setListData(bdd.getListeQuestions(q.getReponse1(), q.getReponse2()).toArray()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				702
			 | 
			
			
				+						setStatusText("La question à bien été suprimée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				703
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				704
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				705
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				706
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				707
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				602
			 | 
			
				708
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				603
			 | 
			
				709
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				604
			 | 
			
				710
			 | 
			
			
				 			else if(e.getSource() == editQ) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -606,7 +712,7 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				606
			 | 
			
				712
			 | 
			
			
				 				Question q = (Question) listQ.getSelectedValue(); 
			 | 
		
	
		
			
			| 
				607
			 | 
			
				713
			 | 
			
			
				 				if(q == null) 
			 | 
		
	
		
			
			| 
				608
			 | 
			
				714
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				609
			 | 
			
				
			 | 
			
			
				-					statusText.setText("Veuiller d'abord selectionner une question."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				715
			 | 
			
			
				+					setStatusText("Veuiller d'abord selectionner une question.", INFO_COLOR); 
			 | 
		
	
		
			
			| 
				610
			 | 
			
				716
			 | 
			
			
				 					return; 
			 | 
		
	
		
			
			| 
				611
			 | 
			
				717
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				612
			 | 
			
				718
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -615,9 +721,17 @@ public class InterfacePrincipale extends JFrame 
			 | 
		
	
		
			
			| 
				615
			 | 
			
				721
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				616
			 | 
			
				722
			 | 
			
			
				 				if(nqd.afficher() == true) 
			 | 
		
	
		
			
			| 
				617
			 | 
			
				723
			 | 
			
			
				 				{ 
			 | 
		
	
		
			
			| 
				618
			 | 
			
				
			 | 
			
			
				-					bdd.modifyQuestion(q.getIntitule(), nqd.getIntitule(), 
			 | 
		
	
		
			
			| 
				619
			 | 
			
				
			 | 
			
			
				-							q.getReponse1(), q.getReponse2(), nqd.getReponse()); 
			 | 
		
	
		
			
			| 
				620
			 | 
			
				
			 | 
			
			
				-					reSelectQuestion(nqd.getIntitule()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				724
			 | 
			
			
				+					try 
			 | 
		
	
		
			
			| 
				
			 | 
			
				725
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				726
			 | 
			
			
				+						bdd.modifyQuestion(q.getIntitule(), nqd.getIntitule(), 
			 | 
		
	
		
			
			| 
				
			 | 
			
				727
			 | 
			
			
				+								q.getReponse1(), q.getReponse2(), nqd.getReponse()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				728
			 | 
			
			
				+						reSelectQuestion(nqd.getIntitule()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				729
			 | 
			
			
				+						setStatusText("La question à bien été modifiée."); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				730
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				731
			 | 
			
			
				+					catch (BDDException ex) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				732
			 | 
			
			
				+					{ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				733
			 | 
			
			
				+						setStatusText(ex.getMessage(), ERROR_COLOR); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				734
			 | 
			
			
				+					} 
			 | 
		
	
		
			
			| 
				621
			 | 
			
				735
			 | 
			
			
				 				} 
			 | 
		
	
		
			
			| 
				622
			 | 
			
				736
			 | 
			
			
				 			} 
			 | 
		
	
		
			
			| 
				623
			 | 
			
				737
			 | 
			
			
				 		} 
			 |