Added side pane to GUI and resize to 1280x960

#story[426]
This commit is contained in:
zyt10
2017-03-22 11:46:39 +13:00
parent 00f9cc4698
commit 44b5b0b771
4 changed files with 33 additions and 7 deletions
@@ -124,8 +124,8 @@ public class CanvasController {
/**
* Draws a boat with given (x, y) position in the given color
*
* @param x
* @param y
* @param lat
* @param lon
* @param color
*/
private void drawBoat(double lat, double lon, Color color) {
+1 -1
View File
@@ -6,7 +6,7 @@
<?import javafx.scene.layout.*?>
<AnchorPane 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">
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="960.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<GridPane layoutX="444.0" layoutY="256.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
+1 -1
View File
@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>
<AnchorPane fx:id="window" 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.Controller">
<AnchorPane fx:id="window" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="960.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.controllers.Controller">
<children>
<fx:include source="RaceView.fxml" fx:id="raceView"/>
</children>
+29 -3
View File
@@ -1,13 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.canvas.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.canvas.Canvas?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane 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>
<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>
</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>
</AnchorPane>
</GridPane>