ADD:: test fxml+controller

This commit is contained in:
mlwauben
2019-03-28 23:11:58 +01:00
parent 7267a73cbe
commit c62e4719ea
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package greenify.client.controller;
import greenify.client.rest.UserService;
import javafx.fxml.FXML;
import javafx.scene.image.ImageView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
/**
* Class that controls the achievements fxml file (the GUI Screen).
*/
@Controller
public class AchievementsTestController {
@Autowired
UserService userService;
@FXML
private ImageView achievpic1;
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="greenify.client.controller.AchievementsTestController">
<children>
<ImageView fx:id="achievpic1" fitHeight="98.0" fitWidth="75.0" layoutX="179.0" layoutY="153.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../achiev1pic.jpg" />
</image>
</ImageView>
<Text layoutX="177.0" layoutY="149.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Tom Dumoulin" />
</children>
</AnchorPane>