Commit cb1c90ae authored by Simeon Christoffersen's avatar Simeon Christoffersen
Browse files

initial commit

parent 2fa3717b
......@@ -11,11 +11,11 @@ import java.io.IOException;
/**
* JavaFX App
*/
public class App extends Application {
public class CalcApp extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(this.getClass().getResource("App.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(this.getClass().getResource("Calc.fxml"));
Parent parent = fxmlLoader.load();
stage.setScene(new Scene(parent));
stage.show();
......
......@@ -10,11 +10,11 @@ import javafx.scene.control.Label;
import javafx.scene.control.Labeled;
import javafx.scene.control.ListView;
public class AppController {
public class CalcController {
private Calc calc;
public AppController() {
public CalcController() {
calc = new Calc(0.0, 0.0, 0.0);
}
......
......@@ -5,7 +5,7 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<GridPane xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="app.AppController"
<GridPane xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="app.CalcController"
alignment="CENTER" hgap="10.0" vgap="10.0" >
<ListView fx:id="operandsView" prefHeight="80.0"
......
......@@ -24,12 +24,12 @@ import org.testfx.matcher.control.LabeledMatchers;
*/
public class AppTest extends ApplicationTest {
private AppController controller;
private CalcController controller;
private Parent root;
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(this.getClass().getResource("App.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(this.getClass().getResource("Calc.fxml"));
root = fxmlLoader.load();
controller = fxmlLoader.getController();
stage.setScene(new Scene(root));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment