Browse Source

Added Fullscreen (kinda)

Fullscreen button, creates empty fullscreen JFrame
hutattedonmyarm 13 years ago
parent
commit
25d51e537f
5 changed files with 45 additions and 2 deletions
  1. BIN
      .DS_Store
  2. BIN
      CubeControl/.DS_Store
  3. 18
    1
      CubeControl/Frame.java
  4. 26
    0
      CubeControl/FullscreenWindow.java
  5. 1
    1
      CubeControl/makefile

BIN
.DS_Store View File


BIN
CubeControl/.DS_Store View File


+ 18
- 1
CubeControl/Frame.java View File

@@ -75,6 +75,7 @@ public class Frame extends JFrame implements ListSelectionListener {
75 75
 	private JLabel frameLengthLabel = new JLabel();
76 76
 	private JTextField frameLengthText = new JTextField();
77 77
 	private JButton frameDuration = new JButton();
78
+    private JButton fullScreenButton = new JButton();
78 79
 	// Ende Attribute
79 80
 
80 81
 	public cubeWorker worker = new cubeWorker();
@@ -181,7 +182,7 @@ public class Frame extends JFrame implements ListSelectionListener {
181 182
 			}
182 183
 		});
183 184
 		int frameWidth = 661;
184
-		int frameHeight = 417;
185
+		int frameHeight = 440;
185 186
 		setSize(frameWidth, frameHeight);
186 187
 		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
187 188
 		int x = (d.width - getSize().width) / 2;
@@ -356,6 +357,16 @@ public class Frame extends JFrame implements ListSelectionListener {
356 357
 		frameLengthText.setText("");
357 358
 		frameLengthText.setFont(new Font("Dialog", Font.PLAIN, 13));
358 359
 		cp.add(frameLengthText);
360
+		
361
+		fullScreenButton.setText("Fullscreen");
362
+		fullScreenButton.setBounds(504, 390, 147, 25);
363
+		fullScreenButton.setFont(new Font("Dialog", Font.PLAIN, 13));
364
+		cp.add(fullScreenButton);
365
+		fullScreenButton.addActionListener(new ActionListener() {
366
+			public void actionPerformed(ActionEvent evt) {
367
+				enterFullscreen(evt);
368
+			}
369
+		});
359 370
 
360 371
 		frameDuration.setBounds(590, 184, 60, 24);
361 372
 		frameDuration.setText("OK");
@@ -386,6 +397,7 @@ public class Frame extends JFrame implements ListSelectionListener {
386 397
 				}
387 398
 			}
388 399
 		});
400
+        
389 401
 
390 402
 		animScrollPane.setBounds(8, 264, 209, 121);
391 403
 		animList.setModel(animModel);
@@ -530,6 +542,11 @@ public class Frame extends JFrame implements ListSelectionListener {
530 542
 	// Anfang Methoden
531 543
 
532 544
 	// Anfang Ereignisprozeduren
545
+	
546
+	public void enterFullscreen(ActionEvent evt) {
547
+		FullscreenWindow fw = new FullscreenWindow(worker);
548
+	}
549
+	
533 550
 	public void editA_ActionPerformed(ActionEvent evt) {
534 551
 
535 552
 		if (animList.getSelectedIndex() == -1) {

+ 26
- 0
CubeControl/FullscreenWindow.java View File

@@ -0,0 +1,26 @@
1
+import com.sun.j3d.utils.universe.*;
2
+import javax.media.j3d.*;
3
+import java.awt.*;
4
+import java.awt.event.*;
5
+import javax.swing.*;
6
+import javax.swing.event.*;
7
+import java.io.File;
8
+
9
+public class FullscreenWindow extends JFrame {
10
+	private Container cp = getContentPane();
11
+	private cubeWorker worker;
12
+	
13
+	public FullscreenWindow (cubeWorker cw) {
14
+		//Basic layout stuff
15
+		this.setUndecorated(true);
16
+		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
17
+		setSize(d);
18
+		setLocation(0,0);
19
+		cp.setLayout(null);
20
+		setResizable(false);
21
+		
22
+		worker = cw;
23
+		
24
+		setVisible(true);
25
+	}
26
+}

+ 1
- 1
CubeControl/makefile View File

@@ -16,7 +16,7 @@ endif
16 16
 
17 17
 # All java files to be compiled
18 18
 # List so it works as target
19
-JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java
19
+JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java FullscreenWindow.java
20 20
 
21 21
 # --------------------------------------
22 22
 

Loading…
Cancel
Save