Browse Source

AjoutBoutonInstallation

Joao Conceicao Nunes 3 years ago
parent
commit
602280f8fc

BIN
Images/Install_Wiimote/1.PNG View File


BIN
Images/Install_Wiimote/2.PNG View File


BIN
Images/Install_Wiimote/3.PNG View File


BIN
Images/Install_Wiimote/4.PNG View File


BIN
Images/Install_Wiimote/5.PNG View File


BIN
bin/Application1/Fenetre.class View File


BIN
bin/Application1/carte$1.class View File


BIN
bin/Application1/carte.class View File


+ 2
- 0
src/Application1/Fenetre.java View File

@@ -145,6 +145,8 @@ public class Fenetre  extends JFrame implements ActionListener{
145 145
 	    		
146 146
 	    	}
147 147
 	    });
148
+	    
149
+	    
148 150
 		
149 151
 		
150 152
 		//Affichage 

+ 80
- 30
src/Application1/carte.java View File

@@ -4,6 +4,8 @@ import java.awt.Color;
4 4
 import java.awt.Graphics;
5 5
 import java.awt.GridLayout;
6 6
 import java.awt.Image;
7
+import java.awt.event.ActionEvent;
8
+import java.awt.event.ActionListener;
7 9
 import java.io.File;
8 10
 import java.io.IOException;
9 11
 import java.util.concurrent.TimeUnit;
@@ -140,26 +142,66 @@ public class carte extends JPanel{
140 142
 			
141 143
 		}
142 144
 		else if (i==3) {
145
+
143 146
 			//Initialitsation
144 147
 			TextPanel cadran1;
145
-			ImagePanel cadran2;
146
-			TextPanel cadran3;
148
+			TextPanel cadran2;
149
+			ImagePanel cadran3;
147 150
 			TextPanel cadran4;
148 151
 			GridLayout g= new GridLayout(2,2);
149 152
 			g.setHgap(10);
150 153
 			g.setVgap(10);
151 154
 			setLayout(g);
152 155
 			
156
+			//Cadran 1 
157
+			taille = 17; //taille police
158
+			cadran1 = new TextPanel(taille);
159
+			
160
+			
161
+			
162
+			cadran1.setBorder(compound);
163
+			cadran1.AjouterParagraph(" Pour utiliser notre application, il faut disposer de Revit ainsi que GrassHopper et le plugin installé. \n");
164
+			cadran1.AjouterParagraph("\n");
165
+			cadran1.AjouterParagraph(" De plus, l'ordinateur doit disposer d'une connexion Bluetooth.  \n");
166
+			cadran1.setEditable(false);
167
+			
168
+			//Cadran 2 
169
+			taille = 17; //taille police
170
+			cadran2 = new TextPanel(taille);
171
+		
172
+			cadran2.setBorder(compound);
173
+			cadran2.AjouterParagraph(" Si vous possèdez tout les prérequis précédants, vous pouvez installer GlovePie et Trinus. \n");
174
+			cadran2.AjouterParagraph("\n");
175
+			
176
+			//Cadran 3
177
+			cadran3 = new ImagePanel("test.png");
178
+			cadran3.setBorder(compound);
179
+			
180
+			//Cadran 4 
181
+			taille = 17; //taille police
182
+			cadran4 = new TextPanel(taille);
183
+		
184
+			cadran4.setBorder(compound);
185
+			cadran4.AjouterParagraph("Si vous avez déjà fait l'installation, vous pouvez cliquer sur LANCER VR pour passer directement à la réalité virtuelle.");
186
+			
187
+			
188
+			//Ajouter les cadrans
189
+			add(cadran1);
190
+			add(cadran2);
191
+			add(cadran3);
192
+			add(cadran4);
153 193
 			
154 194
 			
155 195
 		}
156 196
 		else if (i==4) {
157 197
 			
158 198
 			//Initialitsation
159
-			TextPanel cadran1;
199
+			JPanel cadran1;
160 200
 			ImagePanel cadran2;
161 201
 			ImagePanel cadran3;
162 202
 			ImagePanel cadran4;
203
+			TextPanel Texte;
204
+			JButton BoutonInstallation = new JButton("Commencer l'instalation");
163 205
 			GridLayout g= new GridLayout(2,2);
164 206
 			g.setHgap(10);
165 207
 			g.setVgap(10);
@@ -167,17 +209,22 @@ public class carte extends JPanel{
167 209
 			
168 210
 			//Cadran 1 
169 211
 			taille = 15; //taille police
170
-			cadran1 = new TextPanel(taille);
171
-			
172
-			
173
-			
212
+			cadran1 = new JPanel();
174 213
 			cadran1.setBorder(compound);
175
-			cadran1.AjouterParagraph("       \n");
176
-			cadran1.AjouterParagraph(" L'installation du logiciel Trinus est nécessaire pour le bon fonctionnement"
214
+			Texte = new TextPanel(taille);
215
+			Texte.AjouterParagraph("       \n");
216
+			Texte.AjouterParagraph(" L'installation du logiciel Trinus est nécessaire pour le bon fonctionnement"
177 217
 					+ "de notre système.");
178
-			cadran1.AjouterParagraph("L'installation va se lancer automatiquement. "
218
+			Texte.AjouterParagraph("L'installation va se lancer automatiquement. "
179 219
 					+ "Vous devez accepter et suivre les étapes décrites sur les images suivantes.");
180
-			cadran1.setEditable(false);
220
+			Texte.setEditable(false);
221
+					
222
+			GridLayout glb = new GridLayout(1,2);
223
+			cadran1.setLayout(glb);
224
+
225
+			cadran1.add(Texte);
226
+			cadran1.add(BoutonInstallation);
227
+			
181 228
 			
182 229
 			
183 230
 			//Cadran 2
@@ -197,6 +244,24 @@ public class carte extends JPanel{
197 244
 			add(cadran3);
198 245
 			add(cadran4);
199 246
 			
247
+			BoutonInstallation.addActionListener(new ActionListener() {
248
+		    	public void actionPerformed(ActionEvent event) {
249
+		    		//Lancement du panneau de configuration
250
+					
251
+					Runtime rt = Runtime.getRuntime();
252
+					try {
253
+						rt.exec(new String[] {"cmd.exe","/c","start","control"});
254
+						
255
+					}catch (IOException e) {
256
+						e.printStackTrace();
257
+					}
258
+		    		
259
+		    		
260
+		    		
261
+		    		
262
+		    	}
263
+		    });
264
+			
200 265
 			
201 266
 			
202 267
 				
@@ -267,12 +332,12 @@ public class carte extends JPanel{
267 332
 			
268 333
 			
269 334
 			//Cadran 3 
270
-			cadran3 = new ImagePanel("Images/Install_Wiimote/2.png");
335
+			cadran3 = new ImagePanel("Images/Install_Wiimote/3.png");
271 336
 			cadran3.setBorder(compound);
272 337
 			
273 338
 			
274 339
 			//Cadran 4 
275
-			cadran4 = new ImagePanel("Images/Install_Wiimote/3.png");
340
+			cadran4 = new ImagePanel("Images/Install_Wiimote/4.png");
276 341
 			cadran4.setBorder(compound);
277 342
 			
278 343
 			
@@ -282,15 +347,7 @@ public class carte extends JPanel{
282 347
 			add(cadran3);
283 348
 			add(cadran4);
284 349
 			
285
-			//Lancement du panneau de configuration
286 350
 			
287
-			Runtime rt = Runtime.getRuntime();
288
-			try {
289
-				rt.exec(new String[] {"cmd.exe","/c","start","control"});
290
-				
291
-			}catch (IOException e) {
292
-				e.printStackTrace();
293
-			}
294 351
 			
295 352
 		
296 353
 	}
@@ -306,13 +363,7 @@ public class carte extends JPanel{
306 363
 			g.setVgap(10);
307 364
 			setLayout(g);
308 365
 			
309
-			
310
-			//Cadran 1 
311
-			cadran1 = new ImagePanel("Images/Install_Wiimote/4.png");
312
-			
313
-			//Cadran 2
314
-			
315
-			cadran2 = new ImagePanel("Images/Install_Wiimote/5.png");
366
+	
316 367
 			
317 368
 			
318 369
 			
@@ -354,8 +405,7 @@ public class carte extends JPanel{
354 405
 			
355 406
 			
356 407
 			//Ajout Cadran
357
-			add(cadran1);
358
-			add(cadran2);
408
+			
359 409
 			add(cadran3);
360 410
 			add(cadran4);
361 411
 			

Loading…
Cancel
Save