|
@@ -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
|
+}
|