Add acitivitySummary to GUI

This commit is contained in:
cugurlu
2019-03-31 15:26:06 +02:00
parent 8e11ecbcf4
commit 32c9713835

View File

@@ -1,17 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.chart.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.chart.PieChart?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
@@ -57,121 +52,225 @@
</children></AnchorPane>
<AnchorPane fx:id="activitiesPane" layoutX="214.0" prefHeight="703.0" prefWidth="820.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="214.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text fill="#002c0c" layoutX="101.0" layoutY="74.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Available Activities" AnchorPane.leftAnchor="60.0" AnchorPane.topAnchor="40.0">
<Text fill="#002c0c" layoutX="101.0" layoutY="74.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Activity Summary" AnchorPane.leftAnchor="60.0" AnchorPane.topAnchor="40.0">
<font>
<Font size="30.0" />
</font>
</Text>
<Pane layoutX="20.0" layoutY="93.0" prefHeight="471.0" prefWidth="280.0" style="-fx-background-color: #f4fff4;">
<Label alignment="CENTER" layoutX="20.0" layoutY="100.0" prefHeight="32.0" prefWidth="255.0" text="Get Started!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="20.0" layoutY="130.0" prefHeight="142.0" prefWidth="255.0" style="-fx-background-color: #f4fff4;">
<children>
<Button fx:id="veganMealButton" layoutX="60.0" layoutY="55.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Eating a vegetarian meal" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="localProduceButton" layoutX="71.0" layoutY="100.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Buying local produce" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="bikeButton" layoutX="48.0" layoutY="145.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Using a bike instead of a car" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="publicTransportButton" layoutX="18.0" layoutY="190.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Using public transport instead of a car" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="temperatureButton" layoutX="31.0" layoutY="235.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Lowering your home temperature" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
<Button fx:id="solarPanelButton" layoutX="68.0" layoutY="280.0" mnemonicParsing="false" style="-fx-background-color: #009623; -fx-border-radius: 25px;" text="Installing solar panels" textFill="#e0ffe1">
<font>
<Font size="14.0" />
</font>
</Button>
</children>
</Pane>
<Pane layoutX="310.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
<children>
<Text layoutX="11.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Done recently" textAlignment="CENTER">
<font>
<Font size="21.0" />
</font>
</Text>
<Label fx:id="veganMealCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="55.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="peopleNumber" layoutX="190.0" layoutY="70.0" prefHeight="40.0" prefWidth="62.0" />
<Label layoutX="14.0" layoutY="16.0" prefHeight="40.0" prefWidth="154.0" text="Number of people">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="localProduceCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="100.0" prefHeight="30.0" prefWidth="115.0" text="0">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="bikeCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="145.0" prefHeight="30.0" prefWidth="115.0" text="0">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="publicTransportCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="190.0" prefHeight="30.0" prefWidth="115.0" text="0">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="temperatureCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="235.0" prefHeight="30.0" prefWidth="115.0" text="0">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="solarPanelCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="280.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="income" layoutX="190.0" layoutY="16.0" prefHeight="40.0" prefWidth="62.0" />
<Label layoutX="14.0" layoutY="70.0" prefHeight="40.0" prefWidth="154.0" text="Household income">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</Pane>
<Pane layoutX="470.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
<Label alignment="CENTER" layoutX="20.0" layoutY="275.0" prefHeight="32.0" prefWidth="255.0" text="Home!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="20.0" layoutY="307.0" prefHeight="342.0" prefWidth="255.0" style="-fx-background-color: #f4fff4;">
<children>
<Text layoutX="15.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Done in total">
<font>
<Font size="21.0" />
</font>
</Text>
<Label fx:id="totalVeganMealCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="55.0" prefHeight="30.0" prefWidth="115.0" text="0">
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="26.0" prefHeight="40.0" prefWidth="149.0" text="Electricity usage">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalLocalProduceCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="100.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="electricityUsage" layoutX="190.0" layoutY="26.0" prefHeight="40.0" prefWidth="62.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="74.0" prefHeight="40.0" prefWidth="149.0" text="\% of clean energy prog.">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="cleanEnergy" layoutX="190.0" layoutY="74.0" prefHeight="40.0" prefWidth="62.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="122.0" prefHeight="40.0" prefWidth="149.0" text="Natural gas usage">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalBikeCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="145.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="naturalGasUsage" layoutX="190.0" layoutY="122.0" prefHeight="40.0" prefWidth="62.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="168.0" prefHeight="40.0" prefWidth="149.0" text="Heating oil usage">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalPublicTransportCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="190.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="heatingOilUsage" layoutX="190.0" layoutY="168.0" prefHeight="40.0" prefWidth="62.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="216.0" prefHeight="40.0" prefWidth="149.0" text="Water usage">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalTemperatureCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="235.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="waterUsage" layoutX="190.0" layoutY="216.0" prefHeight="40.0" prefWidth="62.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="264.0" prefHeight="40.0" prefWidth="149.0" text="Living space area">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalSolarPanelCounter" alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="280.0" prefHeight="30.0" prefWidth="115.0" text="0">
<TextField fx:id="livingSpace" layoutX="190.0" layoutY="264.0" prefHeight="40.0" prefWidth="62.0" />
</children>
</Pane>
<Label alignment="CENTER" layoutX="290.0" layoutY="100.0" prefHeight="32.0" prefWidth="230.0" text="Travel!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="290.0" layoutY="130.0" prefHeight="342.0" prefWidth="230.0" style="-fx-background-color: #f4fff4;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="11.0" prefHeight="27.0" prefWidth="149.0" text="Gasoline miles">
<font>
<Font size="18.0" />
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="gasolineMiles" layoutX="170.0" layoutY="11.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="55.0" prefHeight="27.0" prefWidth="149.0" text="Gasoline mpg">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="gasolineMpg" layoutX="170.0" layoutY="55.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="99.0" prefHeight="27.0" prefWidth="149.0" text="Diesel miles">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="dieselMiles" layoutX="170.0" layoutY="99.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="143.0" prefHeight="27.0" prefWidth="149.0" text="Diesel mpg">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="dieselMpg" layoutX="170.0" layoutY="143.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="187.0" prefHeight="27.0" prefWidth="149.0" text="Electric miles">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="electricMiles" layoutX="170.0" layoutY="187.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="231.0" prefHeight="27.0" prefWidth="149.0" text="Electric mpg">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="electricMpg" layoutX="170.0" layoutY="231.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="275.0" prefHeight="27.0" prefWidth="149.0" text="Public transportation">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="publicTransportation" layoutX="170.0" layoutY="275.0" prefHeight="27.0" prefWidth="50.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="319.0" prefHeight="27.0" prefWidth="149.0" text="Air plane">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="airPlane" layoutX="170.0" layoutY="319.0" prefHeight="27.0" prefWidth="50.0" />
</children>
</Pane>
<Label alignment="CENTER" layoutX="290.0" layoutY="488.0" prefHeight="32.0" prefWidth="230.0" text="Shopping!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="290.0" layoutY="520.0" prefHeight="129.0" prefWidth="230.0" style="-fx-background-color: #f4fff4;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="11.0" prefHeight="59.0" prefWidth="115.0" text="Goods &#10;shopping" textAlignment="CENTER">
<font>
<Font size="16.0" />
</font>
</Label>
<TextField fx:id="goodShopping" layoutX="146.0" layoutY="18.0" prefHeight="40.0" prefWidth="70.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="75.0" prefHeight="59.0" prefWidth="115.0" text="Services &#10;shopping" textAlignment="CENTER">
<font>
<Font size="16.0" />
</font>
</Label>
<TextField fx:id="serviceShopping" layoutX="146.0" layoutY="80.0" prefHeight="40.0" prefWidth="70.0" />
</children>
</Pane>
<Label alignment="CENTER" layoutX="545.0" layoutY="100.0" prefHeight="32.0" prefWidth="255.0" text="Food!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="545.0" layoutY="130.0" prefHeight="342.0" prefWidth="255.0" style="-fx-background-color: #f4fff4;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="26.0" prefHeight="46.0" prefWidth="115.0" text="Meat fish eggs">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="meat" layoutX="150.0" layoutY="26.0" prefHeight="46.0" prefWidth="70.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="90.0" prefHeight="46.0" prefWidth="115.0" text="Grains/baked &#10;foods" textAlignment="CENTER">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="grains" layoutX="150.0" layoutY="90.0" prefHeight="46.0" prefWidth="70.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="154.0" prefHeight="46.0" prefWidth="115.0" text="Dairy">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="dairy" layoutX="150.0" layoutY="154.0" prefHeight="46.0" prefWidth="70.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="218.0" prefHeight="46.0" prefWidth="115.0" text="Fruits vegetables">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="fruits" layoutX="150.0" layoutY="218.0" prefHeight="46.0" prefWidth="70.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="282.0" prefHeight="46.0" prefWidth="115.0" text="Snacks drinks">
<font>
<Font size="14.0" />
</font>
</Label>
<TextField fx:id="snacks" layoutX="150.0" layoutY="282.0" prefHeight="46.0" prefWidth="70.0" />
</children>
</Pane>
<Label alignment="CENTER" layoutX="545.0" layoutY="488.0" prefHeight="32.0" prefWidth="255.0" text="Extras!" textAlignment="CENTER" textFill="#741010">
<font>
<Font name="System Bold Italic" size="18.0" />
</font>
</Label>
<Pane layoutX="545.0" layoutY="520.0" prefHeight="129.0" prefWidth="255.0" style="-fx-background-color: #f4fff4;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="7.0" prefHeight="27.0" prefWidth="183.0" text="Buying local produce">
<font>
<Font size="14.0" />
</font>
</Label>
<CheckBox fx:id="localProduce" layoutX="195.0" layoutY="7.0" mnemonicParsing="false" prefHeight="27.0" prefWidth="55.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="18.0" layoutY="39.0" prefHeight="27.0" prefWidth="183.0" text="Using bike">
<font>
<Font size="14.0" />
</font>
</Label>
<CheckBox fx:id="bike" layoutX="195.0" layoutY="39.0" mnemonicParsing="false" prefHeight="27.0" prefWidth="55.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="20.0" layoutY="71.0" prefHeight="27.0" prefWidth="183.0" text="Lowering the temperature">
<font>
<Font size="14.0" />
</font>
</Label>
<CheckBox fx:id="loweringTemp" layoutX="195.0" layoutY="71.0" mnemonicParsing="false" prefHeight="27.0" prefWidth="55.0" />
<Label alignment="CENTER" contentDisplay="CENTER" layoutX="20.0" layoutY="103.0" prefHeight="27.0" prefWidth="183.0" text="Installing solar panels">
<font>
<Font size="14.0" />
</font>
</Label>
<CheckBox fx:id="solarPanels" layoutX="195.0" layoutY="103.0" mnemonicParsing="false" prefHeight="27.0" prefWidth="55.0" />
</children>
</Pane>
</children></AnchorPane>
@@ -275,16 +374,16 @@
</graphic>
</Button>
<TableView fx:id="globalLeaderboard" layoutX="56.0" layoutY="220.0" prefHeight="333.0" prefWidth="200.0">
<columns>
<TableColumn fx:id="globalUser" prefWidth="75.0" text="User" />
<TableColumn fx:id="globalScore" prefWidth="124.0" text="Score" />
</columns>
<columns>
<TableColumn fx:id="globalUser" prefWidth="75.0" text="User" />
<TableColumn fx:id="globalScore" prefWidth="124.0" text="Score" />
</columns>
</TableView>
<TableView fx:id="friendLeaderboard" layoutX="302.0" layoutY="220.0" prefHeight="333.0" prefWidth="200.0">
<columns>
<TableColumn fx:id="friendUser" prefWidth="75.0" text="User" />
<TableColumn fx:id="friendScore" prefWidth="124.0" text="Score" />
</columns>
<columns>
<TableColumn fx:id="friendUser" prefWidth="75.0" text="User" />
<TableColumn fx:id="friendScore" prefWidth="124.0" text="Score" />
</columns>
</TableView>
<Label layoutX="69.0" layoutY="177.0" prefHeight="46.0" prefWidth="187.0" text="Global Leaderboard" textAlignment="CENTER" textFill="#5f1616">
<font>