This commit is contained in:
Michael Rausch
2017-03-22 14:39:37 +13:00
3 changed files with 36 additions and 5 deletions
@@ -33,6 +33,8 @@ import java.util.List;
* Modified by Haoming Yin (hyi25) on 20/3/2017. * Modified by Haoming Yin (hyi25) on 20/3/2017.
*/ */
public class CanvasController { public class CanvasController {
@FXML
private Canvas canvas;
private Race race; private Race race;
private GraphicsContext gc; private GraphicsContext gc;
@@ -40,9 +42,9 @@ public class CanvasController {
private final double ORIGIN_LAT = 32.320504; private final double ORIGIN_LAT = 32.320504;
private final double ORIGIN_LON = -64.857063; private final double ORIGIN_LON = -64.857063;
private final double VIEW_CORNER_LAT = 32.280808;
private final double VIEW_CORNER_LON = -64.858401;
@FXML
private Canvas canvas;
@FXML @FXML
private AnchorPane contentAnchorPane; private AnchorPane contentAnchorPane;
-1
View File
@@ -4,7 +4,6 @@
<?import java.lang.*?> <?import java.lang.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane fx:id="contentPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.MasterViewController"> <AnchorPane fx:id="contentPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.MasterViewController">
<children> <children>
<!--<fx:include source="RaceView.fxml" fx:id="raceView"/>--> <!--<fx:include source="RaceView.fxml" fx:id="raceView"/>-->
+32 -2
View File
@@ -1,13 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import java.lang.*?> <?import java.lang.*?>
<?import javafx.scene.canvas.*?> <?import javafx.scene.canvas.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.canvas.Canvas?> <?import javafx.scene.canvas.Canvas?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<<<<<<< HEAD
<AnchorPane fx:id="contentAnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.CanvasController"> <AnchorPane fx:id="contentAnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.CanvasController">
=======
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.CanvasController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="220.0" minWidth="220.0" prefWidth="273.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="1007.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="320.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="320.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="320.0" vgrow="SOMETIMES" />
</rowConstraints>
>>>>>>> 29a0b236703d61e4553cda97e470d1125587cfde
<children> <children>
<Canvas fx:id="canvas" height="1080.0" width="1920.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="960.0" prefWidth="1280.0" style="-fx-background-color: lightblue;" GridPane.columnIndex="1" GridPane.rowSpan="3">
<children>
<Canvas fx:id="canvas" height="960.0" style="-fx-background-color: Aqua;" width="1007.0" />
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" GridPane.rowSpan="3">
<children>
<Label layoutX="11.0" layoutY="259.0" text="Team Position" />
<Label layoutX="11.0" layoutY="617.0" text="Race Log" />
<Label layoutX="13.0" layoutY="432.0" text="Annotation toggle" />
<Label layoutX="11.0" layoutY="14.0" text="Timer" />
<Label layoutX="11.0" layoutY="88.0" text="Wind direction" />
<Button layoutX="18.0" layoutY="468.0" mnemonicParsing="false" text="Button" />
<TextArea editable="false" layoutX="11.0" layoutY="640.0" prefHeight="306.0" prefWidth="200.0" />
<TextArea editable="false" layoutX="11.0" layoutY="280.0" prefHeight="141.0" prefWidth="200.0" />
</children>
</AnchorPane>
</children>
</GridPane>