|
@@ -1,86 +0,0 @@
|
1
|
|
-
|
2
|
|
- * FullscreenWindow.java
|
3
|
|
- *
|
4
|
|
- *
|
5
|
|
- * Copyright 2011 Thomas Buck <xythobuz@me.com>
|
6
|
|
- * Copyright 2011 Max Nuding <max.nuding@gmail.com>
|
7
|
|
- * Copyright 2011 Felix Bäder <baeder.felix@gmail.com>
|
8
|
|
- *
|
9
|
|
- * This file is part of LED-Cube.
|
10
|
|
- *
|
11
|
|
- * LED-Cube is free software: you can redistribute it and/or modify
|
12
|
|
- * it under the terms of the GNU General Public License as published by
|
13
|
|
- * the Free Software Foundation, either version 3 of the License, or
|
14
|
|
- * (at your option) any later version.
|
15
|
|
- *
|
16
|
|
- * LED-Cube is distributed in the hope that it will be useful,
|
17
|
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18
|
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19
|
|
- * GNU General Public License for more details.
|
20
|
|
- *
|
21
|
|
- * You should have received a copy of the GNU General Public License
|
22
|
|
- * along with LED-Cube. If not, see <http:
|
23
|
|
- */
|
24
|
|
-
|
25
|
|
-
|
26
|
|
- * This class is responsible for displaying the 3D View of our Cube in fullscreen mode.
|
27
|
|
- *
|
28
|
|
- * @author Thomas Buck
|
29
|
|
- * @author Max Nuding
|
30
|
|
- * @author Felix Bäder
|
31
|
|
- * @version 1.0
|
32
|
|
- */
|
33
|
|
-
|
34
|
|
-
|
35
|
|
-import com.sun.j3d.utils.universe.*;
|
36
|
|
-import javax.media.j3d.*;
|
37
|
|
-import java.awt.*;
|
38
|
|
-import java.awt.event.*;
|
39
|
|
-import javax.swing.*;
|
40
|
|
-import javax.swing.event.*;
|
41
|
|
-import java.io.File;
|
42
|
|
-
|
43
|
|
-public class FullscreenWindow extends JFrame {
|
44
|
|
- private Container cp = getContentPane();
|
45
|
|
- private cubeWorker worker;
|
46
|
|
- private JButton exitButton;
|
47
|
|
- private Canvas3D canvas;
|
48
|
|
- private Led3D led;
|
49
|
|
- private int width;
|
50
|
|
- private int height;
|
51
|
|
- private Frame frame;
|
52
|
|
-
|
53
|
|
- public FullscreenWindow (cubeWorker cw, Canvas3D cv, Led3D ledview, Frame f) {
|
54
|
|
-
|
55
|
|
- this.setUndecorated(true);
|
56
|
|
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
57
|
|
- setSize(d);
|
58
|
|
- setLocation(0,0);
|
59
|
|
- cp.setLayout(null);
|
60
|
|
- setResizable(false);
|
61
|
|
-
|
62
|
|
- worker = cw;
|
63
|
|
- width = d.width;
|
64
|
|
- height = d.height;
|
65
|
|
- canvas = cv;
|
66
|
|
- led = ledview;
|
67
|
|
- frame = f;
|
68
|
|
- exitButton = new JButton("Exit Fullscreen");
|
69
|
|
- exitButton.setBounds(width-150, height-25, 150, 25);
|
70
|
|
- exitButton.addActionListener(new ActionListener() {
|
71
|
|
- public void actionPerformed(ActionEvent evt) {
|
72
|
|
- dispose();
|
73
|
|
- frame.ledView.leaveFullscreen();
|
74
|
|
- }
|
75
|
|
- });
|
76
|
|
-
|
77
|
|
- canvas.setBounds(0,0, width, height-30);
|
78
|
|
-
|
79
|
|
-
|
80
|
|
- cp.add(exitButton);
|
81
|
|
- cp.add(canvas);
|
82
|
|
-
|
83
|
|
- setVisible(true);
|
84
|
|
- }
|
85
|
|
-
|
86
|
|
-}
|