ADD:: test fxml+controller
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
18
src/Client/src/main/resources/fxml/achievementstest.fxml
Normal file
18
src/Client/src/main/resources/fxml/achievementstest.fxml
Normal 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>
|
||||||
Reference in New Issue
Block a user