kauron/estraba
Archived
1
0
Fork 0

dashboard redesign

This commit is contained in:
Jesús Vélez Palacios 2016-05-19 10:42:15 +02:00
parent 3c6b212101
commit 678b8a9bbd
5 changed files with 261 additions and 270 deletions

View file

@ -2,12 +2,6 @@ package es.kauron.estraba.controller;
import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXSnackbar; import com.jfoenix.controls.JFXSnackbar;
import com.lynden.gmapsfx.GoogleMapView;
import com.lynden.gmapsfx.javascript.object.GoogleMap;
import com.lynden.gmapsfx.javascript.object.LatLong;
import com.lynden.gmapsfx.javascript.object.MVCArray;
import com.lynden.gmapsfx.shapes.Polyline;
import com.lynden.gmapsfx.shapes.PolylineOptions;
import es.kauron.estraba.App; import es.kauron.estraba.App;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
@ -128,8 +122,8 @@ public class DashboardController implements Initializable {
@FXML @FXML
private Tab tabMap; private Tab tabMap;
@FXML //@FXML
private GoogleMapView mapView; //private GoogleMapView mapView;
@FXML @FXML
private JFXButton elevationButton; private JFXButton elevationButton;
@ -143,26 +137,29 @@ public class DashboardController implements Initializable {
@FXML @FXML
private JFXButton cadenceButton; private JFXButton cadenceButton;
@FXML
private LineChart<Double, Double> mapChart;
@FXML @FXML
private Tab tabGraph; private Tab tabGraph;
@FXML @FXML
private AreaChart<Number, Number> elevationChart; private AreaChart<Double, Double> elevationChart;
@FXML @FXML
private LineChart<Number, Number> speedChart; private LineChart<Double, Double> speedChart;
@FXML @FXML
private LineChart<Number, Number> hrChart; private LineChart<Double, Double> hrChart;
@FXML @FXML
private LineChart<Number, Number> cadenceChart; private LineChart<Double, Double> cadenceChart;
@FXML @FXML
private Tab tabSettings; private Tab tabSettings;
private JFXSnackbar snackbar; private JFXSnackbar snackbar;
private final double DISTANCE_EPSILON = 1; private final double DISTANCE_EPSILON = 10;
@Override @Override
public void initialize(URL location, ResourceBundle resources) { public void initialize(URL location, ResourceBundle resources) {
@ -179,12 +176,25 @@ public class DashboardController implements Initializable {
imgDate.setImage(new Image(App.class.getResourceAsStream("img/date.png"))); imgDate.setImage(new Image(App.class.getResourceAsStream("img/date.png")));
imgDistance.setImage(new Image(App.class.getResourceAsStream("img/distance.png"))); imgDistance.setImage(new Image(App.class.getResourceAsStream("img/distance.png")));
imgElevation.setImage(new Image(App.class.getResourceAsStream("img/elevation.png"))); imgElevation.setImage(new Image(App.class.getResourceAsStream("img/elevation.png")));
} }
@FXML @FXML
private void onMapButton(ActionEvent event){ private void onMapButton(ActionEvent event){
System.out.println(((JFXButton)event.getSource()).getId()); mapChart.getData().clear();
switch (((JFXButton)event.getSource()).getId()) {
case "elevationButton":
mapChart.setData(elevationChart.getData());
break;
case "speedButton":
mapChart.setData(speedChart.getData());
break;
case "hrButton":
mapChart.setData(hrChart.getData());
break;
case "cadenceButton":
mapChart.setData(cadenceChart.getData());
break;
}
} }
public void postinit() { public void postinit() {
@ -230,24 +240,44 @@ public class DashboardController implements Initializable {
+ App.GENERAL_BUNDLE.getString("unit.m")); + App.GENERAL_BUNDLE.getString("unit.m"));
// create charts data // create charts data
XYChart.Series<Number, Number> elevationChartData = new XYChart.Series<>(); XYChart.Series<Double, Double> elevationChartData = new XYChart.Series<>();
XYChart.Series<Number, Number> speedChartData = new XYChart.Series<>(); XYChart.Series<Double, Double> speedChartData = new XYChart.Series<>();
XYChart.Series<Number, Number> hrChartData = new XYChart.Series<>(); XYChart.Series<Double, Double> hrChartData = new XYChart.Series<>();
XYChart.Series<Number, Number> cadenceChartData = new XYChart.Series<>(); XYChart.Series<Double, Double> cadenceChartData = new XYChart.Series<>();
MVCArray pathArray = new MVCArray(); // MVCArray pathArray = new MVCArray();
// traverse the chunks // traverse the chunks
ObservableList<Chunk> chunks = track.getChunks(); ObservableList<Chunk> chunks = track.getChunks();
double currentDistance = 0.0; double currentDistance = 0.0;
double currentHeight = 0.0;
for (Chunk chunk : chunks) { for (Chunk chunk : chunks) {
System.err.println(chunk.getDistance());
currentDistance += chunk.getDistance(); currentDistance += chunk.getDistance();
if (chunk.getDistance() < DISTANCE_EPSILON) continue; if (chunk.getDistance() < DISTANCE_EPSILON) continue;
currentHeight += chunk.getAscent() - chunk.getDescend();
pathArray.push(new LatLong(chunk.getLastPoint().getLatitude(), chunk.getLastPoint().getLongitude())); // pathArray.push(new LatLong(chunk.getLastPoint().getLatitude(), chunk.getLastPoint().getLongitude()));
elevationChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getAscent())); elevationChartData.getData().add(new XYChart.Data<>(currentDistance, currentHeight));
speedChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getSpeed())); speedChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getSpeed()));
hrChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getAvgHeartRate())); hrChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getAvgHeartRate()));
cadenceChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getAvgCadence())); cadenceChartData.getData().add(new XYChart.Data<>(currentDistance, chunk.getAvgCadence()));
String zone;
if (chunk.getAvgHeartRate() > 170) zone = "Zone 4";
else if (chunk.getAvgHeartRate() > 150) zone = "Zone 3";
else if (chunk.getAvgHeartRate() > 130) zone = "Zone 2";
else if (chunk.getAvgHeartRate() > 110) zone = "Zone 1";
else zone = "Zone 0";
boolean pieFound = false;
for (PieChart.Data d : zoneChart.getData()){
if (d.getName().equals(zone)) {
pieFound = true;
d.setPieValue(d.getPieValue() + 1);
}
}
if (!pieFound) zoneChart.getData().add( new PieChart.Data(zone, 1) );
} }
// populate the charts // populate the charts
@ -257,13 +287,13 @@ public class DashboardController implements Initializable {
cadenceChart.getData().add(cadenceChartData); cadenceChart.getData().add(cadenceChartData);
// populate and render the map // populate and render the map
GoogleMap map = mapView.createMap(); //GoogleMap map = mapView.createMap();
map.addMapShape(new Polyline( //map.addMapShape(new Polyline(
new PolylineOptions() // new PolylineOptions()
.path(pathArray) // .path(pathArray)
.strokeColor("red") // .strokeColor("red")
.strokeWeight(2)) // .strokeWeight(2))
); //);
} }
@ -282,9 +312,9 @@ public class DashboardController implements Initializable {
if (gpx != null) { if (gpx != null) {
loadTrack(new TrackData(new Track(gpx.getTrk().get(0)))); loadTrack(new TrackData(new Track(gpx.getTrk().get(0))));
snackbar.show("GPX file: " + name + "successfully loaded", 3000); //snackbar.show("GPX file: " + name + "successfully loaded", 3000);
} else { } else {
snackbar.show("Error loading GPX file: " + name, 3000); //snackbar.show("Error loading GPX file: " + name, 3000);
} }
} }

View file

@ -2,11 +2,9 @@
<?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXTabPane?> <?import com.jfoenix.controls.JFXTabPane?>
<?import com.lynden.gmapsfx.GoogleMapView?>
<?import java.lang.String?> <?import java.lang.String?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.chart.AreaChart?> <?import javafx.scene.chart.AreaChart?>
<?import javafx.scene.chart.CategoryAxis?>
<?import javafx.scene.chart.LineChart?> <?import javafx.scene.chart.LineChart?>
<?import javafx.scene.chart.NumberAxis?> <?import javafx.scene.chart.NumberAxis?>
<?import javafx.scene.chart.PieChart?> <?import javafx.scene.chart.PieChart?>
@ -19,389 +17,333 @@
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="root" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane fx:id="root" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.estraba.controller.DashboardController">
fx:controller="es.kauron.estraba.controller.DashboardController"> <JFXTabPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1000.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<JFXTabPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1000.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<Tab fx:id="tabDashboard" styleClass=".estraba.dashboard" text="%tab.dashboard"> <Tab fx:id="tabDashboard" styleClass=".estraba.dashboard" text="%tab.dashboard">
<VBox prefHeight="200.0" prefWidth="100.0"> <VBox prefHeight="200.0" prefWidth="100.0">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<Label fx:id="labelMotivationUpper" alignment="CENTER" focusTraversable="false" <Label fx:id="labelMotivationUpper" alignment="CENTER" focusTraversable="false" maxWidth="1.7976931348623157E308" text="%label.motivation">
maxWidth="1.7976931348623157E308" text="%label.motivation">
<font> <font>
<Font name="Roboto" size="56.0"/> <Font name="Roboto" size="56.0" />
</font> </font>
<VBox.margin> <VBox.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</VBox.margin> </VBox.margin>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.motivation"/> <String fx:value=".estraba.dashboard.motivation" />
<String fx:value=".estraba.dashboard.motivation.upper"/> <String fx:value=".estraba.dashboard.motivation.upper" />
</styleClass> </styleClass>
</Label> </Label>
<HBox prefHeight="360.0" prefWidth="800.0" VBox.vgrow="ALWAYS"> <HBox prefHeight="360.0" prefWidth="800.0" VBox.vgrow="ALWAYS">
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
<VBox minHeight="360.0" minWidth="300.0" prefHeight="300.0"> <VBox minHeight="360.0" minWidth="300.0" prefHeight="300.0">
<HBox.margin> <HBox.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</HBox.margin> </HBox.margin>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> <ImageView fx:id="imgHR" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
<ImageView fx:id="imgHR" fitHeight="100.0" fitWidth="100.0" <Image url="@../img/hr.png" />
pickOnBounds="true" preserveRatio="true"
styleClass=".estraba.dashboard.icon">
<Image url="@../img/hr.png"/>
</ImageView> </ImageView>
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.hr">
text="%label.hr">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.label"/> <String fx:value=".estraba.dashboard.label" />
<String fx:value=".estraba.dashboard.label.HR"/> <String fx:value=".estraba.dashboard.label.HR" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueHRAvg" alignment="CENTER" <Label fx:id="valueHRAvg" alignment="CENTER" maxWidth="1.7976931348623157E308" text="92 bpm" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="92 bpm"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.avghr"/> <String fx:value=".estraba.dashboard.value.avghr" />
</styleClass> </styleClass>
</Label> </Label>
<HBox> <HBox>
<Label fx:id="valueHRMin" alignment="CENTER_RIGHT" <Label fx:id="valueHRMin" alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="60bpm" HBox.hgrow="ALWAYS">
maxWidth="1.7976931348623157E308" text="60bpm"
HBox.hgrow="ALWAYS">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.minhr"/> <String fx:value=".estraba.dashboard.value.minhr" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueHRMax" layoutX="10.0" layoutY="10.0" <Label fx:id="valueHRMax" layoutX="10.0" layoutY="10.0" maxWidth="1.7976931348623157E308" text="100bpm" HBox.hgrow="ALWAYS">
maxWidth="1.7976931348623157E308" text="100bpm"
HBox.hgrow="ALWAYS">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.maxhr"/> <String fx:value=".estraba.dashboard.value.maxhr" />
</styleClass> </styleClass>
</Label> </Label>
</HBox> </HBox>
</VBox> </VBox>
</HBox> </HBox>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> <ImageView fx:id="imgSpeed" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
<ImageView fx:id="imgSpeed" fitHeight="100.0" fitWidth="100.0" <Image url="@../img/speed.png" />
pickOnBounds="true" preserveRatio="true"
styleClass=".estraba.dashboard.icon">
<Image url="@../img/speed.png"/>
</ImageView> </ImageView>
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.speed">
text="%label.speed">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.label"/> <String fx:value=".estraba.dashboard.label" />
<String fx:value=".estraba.dashboard.label.HR"/> <String fx:value=".estraba.dashboard.label.HR" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueSpeedAvg" alignment="CENTER" <Label fx:id="valueSpeedAvg" alignment="CENTER" maxWidth="1.7976931348623157E308" text="35 Km/h" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="35 Km/h"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.avgspeed"/> <String fx:value=".estraba.dashboard.value.avgspeed" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueSpeedMax" alignment="CENTER" <Label fx:id="valueSpeedMax" alignment="CENTER" maxWidth="1.7976931348623157E308" text="56 Km/h">
maxWidth="1.7976931348623157E308" text="56 Km/h">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.maxspeed"/> <String fx:value=".estraba.dashboard.value.maxspeed" />
</styleClass> </styleClass>
</Label> </Label>
</VBox> </VBox>
</HBox> </HBox>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
prefHeight="90.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> <ImageView fx:id="imgCadence" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
<ImageView fx:id="imgCadence" fitHeight="100.0" fitWidth="100.0" <Image url="@../img/cadence.png" />
pickOnBounds="true" preserveRatio="true"
styleClass=".estraba.dashboard.icon">
<Image url="@../img/cadence.png"/>
</ImageView> </ImageView>
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.cadence">
text="%label.cadence">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.label"/> <String fx:value=".estraba.dashboard.label" />
<String fx:value=".estraba.dashboard.label.HR"/> <String fx:value=".estraba.dashboard.label.HR" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueCadenceAvg" alignment="CENTER" <Label fx:id="valueCadenceAvg" alignment="CENTER" maxWidth="1.7976931348623157E308" text="90 Hz" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="90 Hz"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.avgcadence"/> <String fx:value=".estraba.dashboard.value.avgcadence" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueCadenceMax" alignment="CENTER" <Label fx:id="valueCadenceMax" alignment="CENTER" maxWidth="1.7976931348623157E308" text="152 Hz">
maxWidth="1.7976931348623157E308" text="152 Hz">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.maxcadence"/> <String fx:value=".estraba.dashboard.value.maxcadence" />
</styleClass> </styleClass>
</Label> </Label>
</VBox> </VBox>
</HBox> </HBox>
</VBox> </VBox>
<PieChart fx:id="zoneChart" labelsVisible="false" legendVisible="false" minHeight="-Infinity" <PieChart fx:id="zoneChart" labelsVisible="false" legendVisible="true" minHeight="-Infinity" minWidth="-Infinity" prefHeight="300.0" prefWidth="360.0" HBox.hgrow="ALWAYS">
minWidth="-Infinity" prefHeight="300.0" prefWidth="360.0" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets/>
</HBox.margin>
</PieChart> </PieChart>
<VBox layoutX="15.0" layoutY="15.0" minHeight="360.0" minWidth="300.0" prefHeight="300.0"> <VBox layoutX="15.0" layoutY="15.0" minHeight="360.0" minWidth="300.0" prefHeight="300.0">
<HBox alignment="CENTER" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" <HBox alignment="CENTER" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS"
VBox.vgrow="ALWAYS">
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label fx:id="valueDate" alignment="CENTER" layoutX="10.0" layoutY="97.0" <Label fx:id="valueDate" alignment="CENTER" layoutX="10.0" layoutY="97.0" maxWidth="1.7976931348623157E308" text="Wednesday, 18 May 2016">
maxWidth="1.7976931348623157E308" text="Wednesday, 18 May 2016">
<padding> <padding>
<Insets left="5.0" right="5.0" top="5.0"/> <Insets left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
</styleClass> </styleClass>
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
</Label> </Label>
<Label fx:id="valueTime" alignment="CENTER" layoutX="10.0" layoutY="30.0" <Label fx:id="valueTime" alignment="CENTER" layoutX="10.0" layoutY="30.0" maxWidth="1.7976931348623157E308" text="17:00:14">
maxWidth="1.7976931348623157E308" text="17:00:14">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueActiveTime" alignment="CENTER" <Label fx:id="valueActiveTime" alignment="CENTER" maxWidth="1.7976931348623157E308" text="4:37:42" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="4:37:42"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.activetime"/> <String fx:value=".estraba.dashboard.value.activetime" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueTotalTime" alignment="CENTER" <Label fx:id="valueTotalTime" alignment="CENTER" maxWidth="1.7976931348623157E308" text="of 5:00:00">
maxWidth="1.7976931348623157E308" text="of 5:00:00">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.totaltime"/> <String fx:value=".estraba.dashboard.value.totaltime" />
</styleClass> </styleClass>
</Label> </Label>
</VBox> </VBox>
<ImageView fx:id="imgDate" fitHeight="100.0" fitWidth="100.0" <ImageView fx:id="imgDate" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
pickOnBounds="true" preserveRatio="true" <Image url="@../img/date.png" />
styleClass=".estraba.dashboard.icon">
<Image url="@../img/date.png"/>
</ImageView> </ImageView>
</HBox> </HBox>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label maxWidth="1.7976931348623157E308" text="%label.distance"> <Label maxWidth="1.7976931348623157E308" text="%label.distance">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.label"/> <String fx:value=".estraba.dashboard.label" />
<String fx:value=".estraba.dashboard.label.HR"/> <String fx:value=".estraba.dashboard.label.HR" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueDistance" alignment="CENTER" <Label fx:id="valueDistance" alignment="CENTER" maxWidth="1.7976931348623157E308" text="46714 m" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="46714 m"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.distance"/> <String fx:value=".estraba.dashboard.value.distance" />
</styleClass> </styleClass>
</Label> </Label>
</VBox> </VBox>
<ImageView fx:id="imgDistance" fitHeight="100.0" fitWidth="100.0" <ImageView fx:id="imgDistance" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
pickOnBounds="true" preserveRatio="true" <Image url="@../img/distance.png" />
styleClass=".estraba.dashboard.icon">
<Image url="@../img/distance.png"/>
</ImageView> </ImageView>
</HBox> </HBox>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
<VBox alignment="CENTER" HBox.hgrow="ALWAYS"> <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
<Label maxWidth="1.7976931348623157E308" text="%label.elevation"> <Label maxWidth="1.7976931348623157E308" text="%label.elevation">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.label"/> <String fx:value=".estraba.dashboard.label" />
<String fx:value=".estraba.dashboard.label.HR"/> <String fx:value=".estraba.dashboard.label.HR" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueElevation" alignment="CENTER" <Label fx:id="valueElevation" alignment="CENTER" maxWidth="1.7976931348623157E308" text="3166 m" textAlignment="CENTER">
maxWidth="1.7976931348623157E308" text="3166 m"
textAlignment="CENTER">
<font> <font>
<Font size="30.0"/> <Font size="30.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.main"/> <String fx:value=".estraba.dashboard.value.main" />
<String fx:value=".estraba.dashboard.value.elevation"/> <String fx:value=".estraba.dashboard.value.elevation" />
</styleClass> </styleClass>
</Label> </Label>
<HBox> <HBox>
<Label fx:id="valueAscent" alignment="CENTER_RIGHT" <Label fx:id="valueAscent" alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="+ 2053m" HBox.hgrow="ALWAYS">
maxWidth="1.7976931348623157E308" text="+ 2053m"
HBox.hgrow="ALWAYS">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.ascent"/> <String fx:value=".estraba.dashboard.value.ascent" />
</styleClass> </styleClass>
</Label> </Label>
<Label fx:id="valueDescent" layoutX="10.0" layoutY="10.0" <Label fx:id="valueDescent" layoutX="10.0" layoutY="10.0" maxWidth="1.7976931348623157E308" text="- 1113 m" HBox.hgrow="ALWAYS">
maxWidth="1.7976931348623157E308" text="- 1113 m"
HBox.hgrow="ALWAYS">
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<font> <font>
<Font name="Roboto" size="13.0"/> <Font name="Roboto" size="13.0" />
</font> </font>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.value"/> <String fx:value=".estraba.dashboard.value" />
<String fx:value=".estraba.dashboard.value.sub"/> <String fx:value=".estraba.dashboard.value.sub" />
<String fx:value=".estraba.dashboard.value.descent"/> <String fx:value=".estraba.dashboard.value.descent" />
</styleClass> </styleClass>
</Label> </Label>
</HBox> </HBox>
</VBox> </VBox>
<ImageView fx:id="imgElevation" fitHeight="100.0" fitWidth="100.0" <ImageView fx:id="imgElevation" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
pickOnBounds="true" preserveRatio="true" <Image url="@../img/climb.png" />
styleClass=".estraba.dashboard.icon">
<Image url="@../img/climb.png"/>
</ImageView> </ImageView>
</HBox> </HBox>
</VBox> </VBox>
</HBox> </HBox>
<Label fx:id="labelMotivationLower" alignment="CENTER" focusTraversable="false" <Label fx:id="labelMotivationLower" alignment="CENTER" focusTraversable="false" maxWidth="1.7976931348623157E308" text="%label.motivation">
maxWidth="1.7976931348623157E308" text="%label.motivation">
<font> <font>
<Font name="Roboto" size="56.0"/> <Font name="Roboto" size="56.0" />
</font> </font>
<VBox.margin> <VBox.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</VBox.margin> </VBox.margin>
<styleClass> <styleClass>
<String fx:value=".estraba.dashboard.motivation"/> <String fx:value=".estraba.dashboard.motivation" />
<String fx:value=".estraba.dashboard.motivation.lower"/> <String fx:value=".estraba.dashboard.motivation.lower" />
</styleClass> </styleClass>
</Label> </Label>
</VBox> </VBox>
@ -409,61 +351,50 @@
<Tab fx:id="tabMap" text="%tab.map"> <Tab fx:id="tabMap" text="%tab.map">
<VBox> <VBox>
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<GoogleMapView fx:id="mapView"/> <!-- <GoogleMapView fx:id="mapView"/> -->
<HBox maxHeight="-Infinity" minHeight="-Infinity" prefHeight="128.0"> <HBox maxHeight="-Infinity" minHeight="-Infinity" prefHeight="128.0">
<VBox> <VBox>
<JFXButton fx:id="elevationButton" minHeight="-Infinity" minWidth="-Infinity" <JFXButton fx:id="elevationButton" minHeight="-Infinity" minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0" prefWidth="32.0">
onAction="#onMapButton" prefHeight="32.0" prefWidth="32.0">
<graphic> <graphic>
<ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
preserveRatio="true"/>
</graphic> </graphic>
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
</JFXButton> </JFXButton>
<JFXButton fx:id="speedButton" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" <JFXButton fx:id="speedButton" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0" prefWidth="32.0">
minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0"
prefWidth="32.0">
<graphic> <graphic>
<ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
preserveRatio="true"/>
</graphic> </graphic>
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
</JFXButton> </JFXButton>
<JFXButton fx:id="hrButton" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" <JFXButton fx:id="hrButton" layoutX="10.0" layoutY="10.0" minHeight="-Infinity" minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0" prefWidth="32.0">
minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0"
prefWidth="32.0">
<graphic> <graphic>
<ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
preserveRatio="true"/>
</graphic> </graphic>
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
</JFXButton> </JFXButton>
<JFXButton fx:id="cadenceButton" layoutX="10.0" layoutY="42.0" minHeight="-Infinity" <JFXButton fx:id="cadenceButton" layoutX="10.0" layoutY="42.0" minHeight="-Infinity" minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0" prefWidth="32.0">
minWidth="-Infinity" onAction="#onMapButton" prefHeight="32.0"
prefWidth="32.0">
<graphic> <graphic>
<ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
preserveRatio="true"/>
</graphic> </graphic>
<VBox.margin> <VBox.margin>
<Insets/> <Insets />
</VBox.margin> </VBox.margin>
</JFXButton> </JFXButton>
</VBox> </VBox>
<LineChart HBox.hgrow="ALWAYS"> <LineChart fx:id="mapChart" HBox.hgrow="ALWAYS">
<xAxis> <xAxis>
<CategoryAxis side="BOTTOM"/> <NumberAxis side="BOTTOM" />
</xAxis> </xAxis>
<yAxis> <yAxis>
<NumberAxis side="LEFT"/> <NumberAxis side="LEFT" />
</yAxis> </yAxis>
</LineChart> </LineChart>
</HBox> </HBox>
@ -472,44 +403,44 @@
<Tab fx:id="tabGraph" text="%tab.graph"> <Tab fx:id="tabGraph" text="%tab.graph">
<VBox> <VBox>
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
<AreaChart fx:id="elevationChart" minHeight="100.0"> <AreaChart fx:id="elevationChart" minHeight="100.0">
<xAxis> <xAxis>
<CategoryAxis side="BOTTOM"/> <NumberAxis side="BOTTOM" />
</xAxis> </xAxis>
<yAxis> <yAxis>
<NumberAxis side="LEFT"/> <NumberAxis side="LEFT" />
</yAxis> </yAxis>
</AreaChart> </AreaChart>
<LineChart fx:id="speedChart" minHeight="100.0"> <LineChart fx:id="speedChart" minHeight="100.0">
<xAxis> <xAxis>
<CategoryAxis/> <NumberAxis />
</xAxis> </xAxis>
<yAxis> <yAxis>
<NumberAxis side="LEFT"/> <NumberAxis side="LEFT" />
</yAxis> </yAxis>
</LineChart> </LineChart>
<LineChart fx:id="hrChart" minHeight="100.0"> <LineChart fx:id="hrChart" minHeight="100.0">
<xAxis> <xAxis>
<CategoryAxis side="BOTTOM"/> <NumberAxis side="BOTTOM" />
</xAxis> </xAxis>
<yAxis> <yAxis>
<NumberAxis side="LEFT"/> <NumberAxis side="LEFT" />
</yAxis> </yAxis>
</LineChart> </LineChart>
<LineChart fx:id="cadenceChart" minHeight="100.0"> <LineChart fx:id="cadenceChart" minHeight="100.0">
<xAxis> <xAxis>
<CategoryAxis side="BOTTOM"/> <NumberAxis side="BOTTOM" />
</xAxis> </xAxis>
<yAxis> <yAxis>
<NumberAxis side="LEFT"/> <NumberAxis side="LEFT" />
</yAxis> </yAxis>
</LineChart> </LineChart>
</VBox> </VBox>
</Tab> </Tab>
<Tab fx:id="tabSettings" text="%tab.settings"> <Tab fx:id="tabSettings" text="%tab.settings">
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"/> <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
</Tab> </Tab>
</JFXTabPane> </JFXTabPane>
</AnchorPane> </AnchorPane>

View file

@ -1,5 +1,15 @@
label.cadence=Cadence
label.distance=Distance
label.elevation=Elevation
label.hr=Heart rate
label.motivation=Welcome! label.motivation=Welcome!
label.speed=Speed
tab.dashboard=Dashboard tab.dashboard=Dashboard
tab.graph=Stats tab.graph=Stats
tab.map=Your Route tab.map=Your Route
tab.settings=Settings tab.settings=Settings
time.of=of
unit.bpm=\ bpm
unit.hz=\ Hz
unit.kmph=\ kmph
unit.m=\ m

View file

@ -1,5 +1,15 @@
label.cadence=Cadencia
label.distance=Distancia
label.elevation=Elevacion
label.hr=YOLO
label.motivation=¡Benvinguts! label.motivation=¡Benvinguts!
label.speed=Speed
tab.dashboard=Sumari tab.dashboard=Sumari
tab.graph=Estadístiques tab.graph=Estadístiques
tab.map=La teva ruta tab.map=La teva ruta
tab.settings=Ajustos tab.settings=Ajustos
time.of=de
unit.bpm=\ ppm
unit.hz=\ Hz
unit.kmph=\ kmph
unit.m=\ m

View file

@ -1,5 +1,15 @@
label.cadence=Cadencia
label.distance=Distancia
label.elevation=Elevacion
label.hr=Pulsaciónes
label.motivation=¡Bienvenido! label.motivation=¡Bienvenido!
label.speed=Velocidad
tab.dashboard=Resúmen tab.dashboard=Resúmen
tab.graph=Estadísticas tab.graph=Estadísticas
tab.map=Tu ruta tab.map=Tu ruta
tab.settings=Ajustes tab.settings=Ajustes
time.of=de
unit.bpm=\ ppm
unit.hz=\ Hz
unit.kmph=\ kmph
unit.m=\ m