Ver código fonte

Fixed fullscreen rendering...

… almost...
hutattedonmyarm 13 anos atrás
pai
commit
2cf784967c

+ 3
- 2
CubeControl/Frame.java Ver arquivo

@@ -36,7 +36,7 @@ public class Frame extends JFrame implements ListSelectionListener {
36 36
 	private GraphicsConfiguration gConfig = SimpleUniverse
37 37
 			.getPreferredConfiguration();
38 38
 	private Canvas3D cubeCanvas = new Canvas3D(gConfig);
39
-	private Led3D ledView = new Led3D(cubeCanvas);
39
+	public Led3D ledView = new Led3D(cubeCanvas);
40 40
 
41 41
 	// Anfang Attribute
42 42
 	private JButton editA = new JButton();
@@ -545,7 +545,8 @@ public class Frame extends JFrame implements ListSelectionListener {
545 545
 	
546 546
 	public void enterFullscreen(ActionEvent evt) {
547 547
 		ledView.enterFullscreen();
548
-		FullscreenWindow fw = new FullscreenWindow(worker, cubeCanvas, ledView);
548
+		FullscreenWindow fw = new FullscreenWindow(worker, cubeCanvas, ledView, this);
549
+	
549 550
 	}
550 551
 	
551 552
 	public void editA_ActionPerformed(ActionEvent evt) {

+ 5
- 3
CubeControl/FullscreenWindow.java Ver arquivo

@@ -48,8 +48,9 @@ public class FullscreenWindow extends JFrame {
48 48
 	private Led3D led;
49 49
 	private int width;
50 50
 	private int height;
51
+	private Frame frame;
51 52
 	
52
-	public FullscreenWindow (cubeWorker cw, Canvas3D cv, Led3D ledview) {
53
+	public FullscreenWindow (cubeWorker cw, Canvas3D cv, Led3D ledview, Frame f) {
53 54
 		//Basic layout stuff
54 55
 		this.setUndecorated(true);
55 56
 		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
@@ -63,12 +64,13 @@ public class FullscreenWindow extends JFrame {
63 64
 		height = d.height;
64 65
 		canvas = cv;
65 66
 		led = ledview;
67
+		frame = f;
66 68
 		exitButton = new JButton("Exit Fullscreen");
67 69
 		exitButton.setBounds(width-150, height-25, 150, 25);
68 70
 		exitButton.addActionListener(new ActionListener() {
69 71
 			public void actionPerformed(ActionEvent evt) {
70 72
 				dispose();
71
-				led.leaveFullscreen();
73
+				frame.ledView.leaveFullscreen();
72 74
 			}
73 75
 		});
74 76
 		
@@ -81,4 +83,4 @@ public class FullscreenWindow extends JFrame {
81 83
 		setVisible(true);
82 84
 	}
83 85
 
84
-}
86
+}

+ 1
- 0
CubeControl/Led3D.java Ver arquivo

@@ -277,6 +277,7 @@ public class Led3D {
277 277
 		if(group.indexOfChild(fullscreenBackground) != -1) {
278 278
 			group.removeChild(fullscreenBackground);
279 279
 		}
280
+		background = createBackground();
280 281
 		group.addChild(background);
281 282
 		universe.addBranchGraph(group);
282 283
 		

Carregando…
Cancelar
Salvar