fixed paths, fixed some FXML mistakes, added icons to Initialize (not yet working)
|
|
@ -50,7 +50,7 @@ public class App extends Application {
|
|||
@Override
|
||||
public void start(Stage stage) throws Exception {
|
||||
FXMLLoader loader = new FXMLLoader(
|
||||
App.class.getResource("fxml/App.fxml"), GENERAL_BUNDLE);
|
||||
App.class.getResource("fxml/Dashboard.fxml"), GENERAL_BUNDLE);
|
||||
Parent root = loader.load();
|
||||
stage.getIcons().add(new Image(App.class.getResource("img/icon.png").toString()));
|
||||
stage.setTitle("ESTRABA");
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package es.kauron.estraba.controller;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXListView;
|
||||
import com.jfoenix.controls.JFXTabPane;
|
||||
import com.lynden.gmapsfx.GoogleMapView;
|
||||
import es.kauron.estraba.App;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.chart.AreaChart;
|
||||
import javafx.scene.chart.LineChart;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
|
@ -17,6 +23,9 @@ import java.util.ResourceBundle;
|
|||
|
||||
public class DashboardController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private JFXTabPane root;
|
||||
|
||||
@FXML
|
||||
private Tab tabDashboard;
|
||||
|
||||
|
|
@ -29,26 +38,42 @@ public class DashboardController implements Initializable {
|
|||
@FXML
|
||||
private JFXListView<?> mapSummary;
|
||||
|
||||
@FXML
|
||||
private JFXButton elevationButton;
|
||||
|
||||
@FXML
|
||||
private JFXButton speedButton;
|
||||
|
||||
@FXML
|
||||
private JFXButton hrButton;
|
||||
|
||||
@FXML
|
||||
private JFXButton cadenceButton;
|
||||
|
||||
@FXML
|
||||
private Tab tabGraph;
|
||||
|
||||
@FXML
|
||||
private AreaChart<?, ?> elevationChart;
|
||||
private AreaChart<Double, Double> elevationChart;
|
||||
|
||||
@FXML
|
||||
private LineChart<?, ?> speedChart;
|
||||
private LineChart<Double, Double> speedChart;
|
||||
|
||||
@FXML
|
||||
private LineChart<?, ?> hrChart;
|
||||
private LineChart<Double, Double> hrChart;
|
||||
|
||||
@FXML
|
||||
private LineChart<?, ?> cadenceChart;
|
||||
private LineChart<Double, Double> cadenceChart;
|
||||
|
||||
@FXML
|
||||
private Tab tabSettings;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
elevationButton.setGraphic(new ImageView(new Image(App.class.getResourceAsStream("img/elevation.png"))));
|
||||
speedButton.setGraphic(new ImageView(new Image(App.class.getResourceAsStream("img/speed.png"))));
|
||||
hrButton.setGraphic(new ImageView(new Image(App.class.getResourceAsStream("img/hr.png"))));
|
||||
cadenceButton.setGraphic(new ImageView(new Image(App.class.getResourceAsStream("img/cadence.png"))));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
116
src/main/resources/es/kauron/estraba/fxml/Dashboard.fxml
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import com.jfoenix.controls.JFXListView?>
|
||||
<?import com.jfoenix.controls.JFXTabPane?>
|
||||
<?import com.lynden.gmapsfx.GoogleMapView?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.chart.AreaChart?>
|
||||
<?import javafx.scene.chart.CategoryAxis?>
|
||||
<?import javafx.scene.chart.LineChart?>
|
||||
<?import javafx.scene.chart.NumberAxis?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<JFXTabPane fx:id="root" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<tabs>
|
||||
<Tab fx:id="tabDashboard" text="%tab.dashboard">
|
||||
<content>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<Label alignment="CENTER" text="%label.welcome" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<font>
|
||||
<Font name="Roboto" size="50.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children></AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab fx:id="tabMap" text="%tab.map">
|
||||
<content>
|
||||
<VBox>
|
||||
<children>
|
||||
<HBox VBox.vgrow="ALWAYS">
|
||||
<children>
|
||||
<GoogleMapView fx:id="mapView" HBox.hgrow="ALWAYS" />
|
||||
<JFXListView fx:id="mapSummary" minWidth="100.0" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox minHeight="128.0" prefHeight="0.0">
|
||||
<children>
|
||||
<VBox prefHeight="200.0" prefWidth="100.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<JFXButton fx:id="elevationButton" minHeight="32.0" minWidth="32.0" />
|
||||
<JFXButton fx:id="speedButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" />
|
||||
<JFXButton fx:id="hrButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" />
|
||||
<JFXButton fx:id="cadenceButton" layoutX="10.0" layoutY="42.0" minHeight="32.0" minWidth="32.0" />
|
||||
</children>
|
||||
</VBox>
|
||||
<LineChart minHeight="100.0" prefWidth="9999.0">
|
||||
<xAxis>
|
||||
<CategoryAxis side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab fx:id="tabGraph" text="\%tab.graph">
|
||||
<content>
|
||||
<VBox>
|
||||
<children>
|
||||
<AreaChart fx:id="elevationChart" minHeight="100.0">
|
||||
<xAxis>
|
||||
<CategoryAxis side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</AreaChart>
|
||||
<LineChart fx:id="speedChart" minHeight="100.0">
|
||||
<xAxis>
|
||||
<CategoryAxis side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
<LineChart fx:id="hrChart" minHeight="100.0">
|
||||
<xAxis>
|
||||
<CategoryAxis side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
<LineChart fx:id="cadenceChart" minHeight="100.0">
|
||||
<xAxis>
|
||||
<CategoryAxis side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab fx:id="tabSettings" text="%tab.settings">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
</JFXTabPane>
|
||||
BIN
src/main/resources/es/kauron/estraba/img/cadence.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/resources/es/kauron/estraba/img/climb.png
Normal file
|
After Width: | Height: | Size: 922 B |
BIN
src/main/resources/es/kauron/estraba/img/date.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/es/kauron/estraba/img/distance.png
Normal file
|
After Width: | Height: | Size: 822 B |
BIN
src/main/resources/es/kauron/estraba/img/downclimb.png
Normal file
|
After Width: | Height: | Size: 857 B |
BIN
src/main/resources/es/kauron/estraba/img/elevation.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/es/kauron/estraba/img/hr.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/main/resources/es/kauron/estraba/img/icon.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/es/kauron/estraba/img/speed.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/resources/es/kauron/estraba/img/speedmax.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
BIN
src/main/resources/es/kauron/estraba/img/timeexercise.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/main/resources/es/kauron/estraba/img/timespan.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
label.welcome=Welcome!
|
||||
tab.dashboard=Dashboard
|
||||
tab.graph=Stats
|
||||
tab.map=Your Route
|
||||
tab.settings=Settings
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
label.welcome=¡Benvinguts!
|
||||
tab.dashboard=Sumari
|
||||
tab.graph=Estadístiques
|
||||
tab.map=La teva ruta
|
||||
tab.settings=Ajustos
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
label.welcome=¡Bienvenido!
|
||||
tab.dashboard=Resúmen
|
||||
tab.graph=Estadísticas
|
||||
tab.map=Tu ruta
|
||||
tab.settings=Ajustes
|
||||