Browse Source

Added Fullscreen (kinda)

Fullscreen button, creates empty fullscreen JFrame
hutattedonmyarm 12 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
 	private JLabel frameLengthLabel = new JLabel();
75
 	private JLabel frameLengthLabel = new JLabel();
76
 	private JTextField frameLengthText = new JTextField();
76
 	private JTextField frameLengthText = new JTextField();
77
 	private JButton frameDuration = new JButton();
77
 	private JButton frameDuration = new JButton();
78
+    private JButton fullScreenButton = new JButton();
78
 	// Ende Attribute
79
 	// Ende Attribute
79
 
80
 
80
 	public cubeWorker worker = new cubeWorker();
81
 	public cubeWorker worker = new cubeWorker();
181
 			}
182
 			}
182
 		});
183
 		});
183
 		int frameWidth = 661;
184
 		int frameWidth = 661;
184
-		int frameHeight = 417;
185
+		int frameHeight = 440;
185
 		setSize(frameWidth, frameHeight);
186
 		setSize(frameWidth, frameHeight);
186
 		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
187
 		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
187
 		int x = (d.width - getSize().width) / 2;
188
 		int x = (d.width - getSize().width) / 2;
356
 		frameLengthText.setText("");
357
 		frameLengthText.setText("");
357
 		frameLengthText.setFont(new Font("Dialog", Font.PLAIN, 13));
358
 		frameLengthText.setFont(new Font("Dialog", Font.PLAIN, 13));
358
 		cp.add(frameLengthText);
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
 		frameDuration.setBounds(590, 184, 60, 24);
371
 		frameDuration.setBounds(590, 184, 60, 24);
361
 		frameDuration.setText("OK");
372
 		frameDuration.setText("OK");
386
 				}
397
 				}
387
 			}
398
 			}
388
 		});
399
 		});
400
+        
389
 
401
 
390
 		animScrollPane.setBounds(8, 264, 209, 121);
402
 		animScrollPane.setBounds(8, 264, 209, 121);
391
 		animList.setModel(animModel);
403
 		animList.setModel(animModel);
530
 	// Anfang Methoden
542
 	// Anfang Methoden
531
 
543
 
532
 	// Anfang Ereignisprozeduren
544
 	// Anfang Ereignisprozeduren
545
+	
546
+	public void enterFullscreen(ActionEvent evt) {
547
+		FullscreenWindow fw = new FullscreenWindow(worker);
548
+	}
549
+	
533
 	public void editA_ActionPerformed(ActionEvent evt) {
550
 	public void editA_ActionPerformed(ActionEvent evt) {
534
 
551
 
535
 		if (animList.getSelectedIndex() == -1) {
552
 		if (animList.getSelectedIndex() == -1) {

+ 26
- 0
CubeControl/FullscreenWindow.java View File

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
 
16
 
17
 # All java files to be compiled
17
 # All java files to be compiled
18
 # List so it works as target
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