blob: b0bac7e4a6c4d7397545709a2a5075598df2a27a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/**
* Java File for the MainWindow Controller.
*/
package de.fhswf.in.inf.java2.aufgabe02;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
/**
* The controller for the MainWindow FXML.
*
* @author $Author: $
* @version $Revision: $, $Date: $ UTC
*/
public class MainWindow extends BorderPane
{
@FXML
private Button button1;
@FXML
private Button button2;
@FXML
private Button button3;
@FXML
private StackPane sPane;
/**
* Constructor empty on purpose.
*
*/
public MainWindow()
{
}
/**
* Connects the CardChangeEvent and the Buttons.
*
*/
@FXML
private void initialize()
{
button1
.setOnAction(new CardChangeEvent(sPane.getChildren(), "Panel 1"));
button2
.setOnAction(new CardChangeEvent(sPane.getChildren(), "Panel 2"));
button3
.setOnAction(new CardChangeEvent(sPane.getChildren(), "Panel 3"));
}
}
|