|
@@ -77,6 +77,7 @@ public class Frame extends JFrame implements ListSelectionListener {
|
77
|
77
|
private JButton frameDuration = new JButton();
|
78
|
78
|
private JButton fullScreenButton = new JButton();
|
79
|
79
|
private JButton playAnimation = new JButton();
|
|
80
|
+ private JButton exitButton;
|
80
|
81
|
// Ende Attribute
|
81
|
82
|
|
82
|
83
|
public cubeWorker worker = new cubeWorker();
|
|
@@ -369,6 +370,16 @@ public class Frame extends JFrame implements ListSelectionListener {
|
369
|
370
|
}
|
370
|
371
|
});
|
371
|
372
|
|
|
373
|
+ exitButton = new JButton("Exit Fullscreen");
|
|
374
|
+ exitButton.setBounds(Toolkit.getDefaultToolkit().getScreenSize().width-300, Toolkit.getDefaultToolkit().getScreenSize().height-80, 150, 25);
|
|
375
|
+ cp.add(exitButton);
|
|
376
|
+ exitButton.addActionListener(new ActionListener() {
|
|
377
|
+ public void actionPerformed(ActionEvent evt) {
|
|
378
|
+ exitFullscreen();
|
|
379
|
+ }
|
|
380
|
+ });
|
|
381
|
+
|
|
382
|
+
|
372
|
383
|
playAnimation.setText("Play");
|
373
|
384
|
playAnimation.setBounds(344, 390, 147, 25);
|
374
|
385
|
playAnimation.setFont(new Font("Dialog", Font.PLAIN, 13));
|
|
@@ -576,9 +587,30 @@ public class Frame extends JFrame implements ListSelectionListener {
|
576
|
587
|
|
577
|
588
|
public void enterFullscreen(ActionEvent evt) {
|
578
|
589
|
ledView.enterFullscreen();
|
579
|
|
- FullscreenWindow fw = new FullscreenWindow(worker, cubeCanvas, ledView, this);
|
|
590
|
+ //FullscreenWindow fw = new FullscreenWindow(worker, cubeCanvas, ledView, this);
|
|
591
|
+ setLocation(0,0);
|
|
592
|
+ setSize(700, 700);
|
|
593
|
+ int w = Toolkit.getDefaultToolkit().getScreenSize().width;
|
|
594
|
+ int h = Toolkit.getDefaultToolkit().getScreenSize().height;
|
|
595
|
+ System.out.println(w);
|
|
596
|
+ System.out.println(h);
|
|
597
|
+ setSize(w-5, h-30);
|
|
598
|
+ //setSize(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height);
|
|
599
|
+ //Y U NO WORK????
|
|
600
|
+ cubeCanvas.setBounds(0,0,Toolkit.getDefaultToolkit().getScreenSize().width-5, Toolkit.getDefaultToolkit().getScreenSize().height-80);
|
580
|
601
|
|
581
|
602
|
}
|
|
603
|
+ public void exitFullscreen(){
|
|
604
|
+ //661, 440
|
|
605
|
+ setLocation(0,0);
|
|
606
|
+ setSize(661, 440);
|
|
607
|
+ ledView.leaveFullscreen();
|
|
608
|
+ cubeCanvas.setBounds(8,8, 250,250);
|
|
609
|
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
|
610
|
+ int x = (d.width - getSize().width) / 2;
|
|
611
|
+ int y = (d.height - getSize().height) / 2;
|
|
612
|
+ setLocation(x, y);
|
|
613
|
+ }
|
582
|
614
|
|
583
|
615
|
public void editA_ActionPerformed(ActionEvent evt) {
|
584
|
616
|
|