Revision 15461

View differences:

import/ext3D/branches/ext3D_v1.1/extAnimationGUI/src/com/iver/ai2/animationgui/gui/AnimationContol3D.java
83 83

  
84 84
	private String buttonPath;
85 85

  
86
	private double globalTime;
86
	private double globalTime = 10;
87 87

  
88 88
	private AnimationPlayer animationPlayer;
89 89

  
......
184 184
		this.setPreferredSize(new Dimension(width, height));
185 185
		this.setSize(new Dimension(width, height));
186 186
		
187
		textosegs.setText("10");
187
		textosegs.setText(Double.toString(globalTime));
188 188
	}
189 189

  
190 190
	private JLabel getLabelMode() {
......
333 333
	 *      logic events of pressed buttons.
334 334
	 */
335 335
	public void actionPerformed(ActionEvent arg0) {
336
		// TODO Auto-generated method stub
337 336
		String actionCommand = arg0.getActionCommand();
338 337
		if (actionCommand.equals("PLAY")) { // play pressed
339
			// pulsadoPlay = true;
340
			// if(pulsadoPause == true){
341
			// pulsadoPause = false;
342
			// image1 = new ImageIcon(buttonPath+"pause.png");
343
			// buttonIcon1.setIcon(image1);
344
			// }
345
			// image = new ImageIcon(buttonPath+"playon.png");
346
			// buttonIcon.setIcon(image);
347
			// //System.out.println("pinchado boton de play");
348
			// JOptionPane.showMessageDialog(null,
349
			// "Estas viendo la animacion.......",
350
			// "Alertas de prueba",
351
			// JOptionPane.WARNING_MESSAGE);
352
			// if (AP == null)
353
			// AP = new AnimationPlayer();
338
			// Setting up the player state
354 339
			this.animationPlayer
355 340
					.setAnimationPlayerState(AnimationPlayer.ANIMATION_STOP);
356 341
			this.animationPlayer.setGlobalTime(globalTime);
357 342
			this.animationPlayer.setAnimationMode(animationMode);
343
			this.animationPlayer.setAnimationFrequency(90);
358 344
			this.animationPlayer.play();
359 345
		} else if (actionCommand.equals("PAUSE")) { // pause pressed
360
			// if (pulsadoPlay == true) {
361
			// pulsadoPlay = false;
362
			// pulsadoPause = true;
363
			// image = new ImageIcon(buttonPath + "play.png");
364
			// buttonIcon.setIcon(image);
365
			// image1 = new ImageIcon(buttonPath + "pauseon.png");
366
			// buttonIcon1.setIcon(image1);
367
			// // System.out.println("pinchado boton de play");
368
			// JOptionPane.showMessageDialog(null,
369
			// "Has pausado la animacion.......", "Alertas de prueba",
370
			// JOptionPane.WARNING_MESSAGE);
371
			// }
372 346
			this.animationPlayer.pause();
373 347
		} else if (actionCommand.equals("STOP")) {
374
			// && ((pulsadoPlay == true) || pulsadoPause == true)) { // stop
375
			// // pressed
376
			// if (pulsadoPlay == true)
377
			// pulsadoPlay = false;
378
			// else if (pulsadoPause = true)
379
			// pulsadoPause = false;
380
			// // System.out.println("pinchado boton de play");
381
			// image = new ImageIcon(buttonPath + "play.png");
382
			// image1 = new ImageIcon(buttonPath + "pause.png");
383
			// buttonIcon1.setIcon(image1);
384
			// buttonIcon.setIcon(image);
385
			// JOptionPane.showMessageDialog(null,
386
			// "Has parado la animacion.......", "Alertas de prueba",
387
			// JOptionPane.WARNING_MESSAGE);
388 348
			animationPlayer.stop();
389

  
390 349
		} else if (actionCommand.equals("REC")) {
391 350
			image = new ImageIcon(buttonPath + "play.png");
392 351
			buttonIcon.setIcon(image);

Also available in: Unified diff