cleanliness + minor fixes + copyright
This commit is contained in:
		
					parent
					
						
							
								99b7743934
							
						
					
				
			
			
				commit
				
					
						74bb277cf2
					
				
			
		
					 13 changed files with 297 additions and 59 deletions
				
			
		
							
								
								
									
										2
									
								
								pom.xml
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -21,6 +21,7 @@
 | 
			
		|||
  ~ THE SOFTWARE.
 | 
			
		||||
  ~
 | 
			
		||||
  ~ If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
  ~
 | 
			
		||||
  -->
 | 
			
		||||
 | 
			
		||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
| 
						 | 
				
			
			@ -127,6 +128,7 @@
 | 
			
		|||
                            <version>1.0</version>
 | 
			
		||||
                            <packaging>jar</packaging>
 | 
			
		||||
                                <file>${basedir}/lib/jGPX.jar</file>
 | 
			
		||||
                            <javadoc>${basedir}/lib/jGPX_javadoc.zip</javadoc>
 | 
			
		||||
                        </configuration>
 | 
			
		||||
                    </execution>
 | 
			
		||||
                </executions>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,6 +20,7 @@
 | 
			
		|||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package es.kauron.estraba;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,31 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 * in the Software without restriction, including without limitation the rights
 | 
			
		||||
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
 * copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
 * furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included in
 | 
			
		||||
 * all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package es.kauron.estraba.controller;
 | 
			
		||||
 | 
			
		||||
import com.jfoenix.controls.JFXButton;
 | 
			
		||||
import com.jfoenix.controls.JFXSnackbar;
 | 
			
		||||
import com.jfoenix.controls.JFXSpinner;
 | 
			
		||||
import com.lynden.gmapsfx.GoogleMapView;
 | 
			
		||||
import com.lynden.gmapsfx.MapComponentInitializedListener;
 | 
			
		||||
| 
						 | 
				
			
			@ -66,8 +90,6 @@ public class DashboardController implements Initializable, MapComponentInitializ
 | 
			
		|||
    @FXML
 | 
			
		||||
    private LineChart<Double, Double> speedChart, hrChart, cadenceChart, mapChart;
 | 
			
		||||
 | 
			
		||||
    private JFXSnackbar snackbar;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void initialize(URL location, ResourceBundle resources) {
 | 
			
		||||
        // populate map icons
 | 
			
		||||
| 
						 | 
				
			
			@ -83,8 +105,6 @@ public class DashboardController implements Initializable, MapComponentInitializ
 | 
			
		|||
        imgDate.setImage(new Image(App.class.getResourceAsStream("img/date.png")));
 | 
			
		||||
        imgDistance.setImage(new Image(App.class.getResourceAsStream("img/distance.png")));
 | 
			
		||||
        imgElevation.setImage(new Image(App.class.getResourceAsStream("img/elevation.png")));
 | 
			
		||||
 | 
			
		||||
        snackbar = new JFXSnackbar();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @FXML
 | 
			
		||||
| 
						 | 
				
			
			@ -105,15 +125,11 @@ public class DashboardController implements Initializable, MapComponentInitializ
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void postInit(DataBundle bundle) {
 | 
			
		||||
        snackbar.registerSnackbarContainer(root);
 | 
			
		||||
        loadTrack(bundle);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private String randomMotivation() {
 | 
			
		||||
        return App.GENERAL_BUNDLE.getString("label.welcome");
 | 
			
		||||
    }
 | 
			
		||||
    private void loadTrack(DataBundle bundle) {
 | 
			
		||||
 | 
			
		||||
    public void load(DataBundle bundle) {
 | 
			
		||||
        valueHRAvg.setText(bundle.HRAvg);
 | 
			
		||||
        valueHRMax.setText(bundle.HRMax);
 | 
			
		||||
        valueHRMin.setText(bundle.HRMin);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 * in the Software without restriction, including without limitation the rights
 | 
			
		||||
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
 * copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
 * furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included in
 | 
			
		||||
 * all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package es.kauron.estraba.controller;
 | 
			
		||||
 | 
			
		||||
import com.jfoenix.controls.JFXButton;
 | 
			
		||||
| 
						 | 
				
			
			@ -19,8 +44,10 @@ import javafx.scene.layout.AnchorPane;
 | 
			
		|||
import javafx.stage.FileChooser;
 | 
			
		||||
import javafx.stage.Stage;
 | 
			
		||||
 | 
			
		||||
import java.awt.*;
 | 
			
		||||
import java.io.File;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.net.URI;
 | 
			
		||||
import java.net.URL;
 | 
			
		||||
import java.util.ResourceBundle;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -68,8 +95,7 @@ public class SplashController implements Initializable{
 | 
			
		|||
        Thread th = new Thread(new Task<DataBundle>() {
 | 
			
		||||
            @Override
 | 
			
		||||
            protected DataBundle call() throws Exception {
 | 
			
		||||
                DataBundle db = DataBundle.loadFrom(file);
 | 
			
		||||
                return db;
 | 
			
		||||
                return DataBundle.loadFrom(file);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override
 | 
			
		||||
| 
						 | 
				
			
			@ -79,10 +105,10 @@ public class SplashController implements Initializable{
 | 
			
		|||
                if (bundle == null) errorLoading();
 | 
			
		||||
                FXMLLoader loader = new FXMLLoader(
 | 
			
		||||
                        App.class.getResource("fxml/Dashboard.fxml"), App.GENERAL_BUNDLE);
 | 
			
		||||
                Parent parent = null;
 | 
			
		||||
                Parent parent;
 | 
			
		||||
                try {
 | 
			
		||||
                    parent = loader.load();
 | 
			
		||||
                    loader.<DashboardController>getController().postInit(bundle);
 | 
			
		||||
                    loader.<DashboardController>getController().load(bundle);
 | 
			
		||||
                    ((Stage) root.getScene().getWindow()).setScene(new Scene(parent));
 | 
			
		||||
                } catch (IOException e) {
 | 
			
		||||
                    errorLoading();
 | 
			
		||||
| 
						 | 
				
			
			@ -97,8 +123,16 @@ public class SplashController implements Initializable{
 | 
			
		|||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void initialize(URL location, ResourceBundle resources) {
 | 
			
		||||
        imgLogo.setImage(new Image(App.class.getResourceAsStream("img/strava-transparent.png")));
 | 
			
		||||
        imgLogo.setImage(new Image(App.class.getResourceAsStream("img/header.png")));
 | 
			
		||||
        snackbar = new JFXSnackbar();
 | 
			
		||||
 | 
			
		||||
        imgLogo.setOnMouseClicked(e -> {
 | 
			
		||||
            try {
 | 
			
		||||
                Desktop.getDesktop().browse(URI.create("https://www.github.com/kauron/estraba"));
 | 
			
		||||
            } catch (IOException ioe) {
 | 
			
		||||
                ioe.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void errorLoading() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 * in the Software without restriction, including without limitation the rights
 | 
			
		||||
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
 * copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
 * furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included in
 | 
			
		||||
 * all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package es.kauron.estraba.model;
 | 
			
		||||
 | 
			
		||||
import es.kauron.estraba.App;
 | 
			
		||||
| 
						 | 
				
			
			@ -30,17 +55,6 @@ public class DataBundle {
 | 
			
		|||
    public ObservableList<PieChart.Data> pieData;
 | 
			
		||||
    public ObservableList<Chunk> chunks;
 | 
			
		||||
 | 
			
		||||
    public static DataBundle loadFrom(File file) throws Exception {
 | 
			
		||||
        JAXBElement<Object> jaxbElement;
 | 
			
		||||
        JAXBContext jaxbContext = JAXBContext.newInstance(GpxType.class, TrackPointExtensionT.class);
 | 
			
		||||
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
 | 
			
		||||
        jaxbElement = (JAXBElement<Object>) unmarshaller.unmarshal(file);
 | 
			
		||||
        GpxType gpx = (GpxType) jaxbElement.getValue();
 | 
			
		||||
 | 
			
		||||
        if (gpx == null) throw new Exception();
 | 
			
		||||
        return new DataBundle(new TrackData(new Track(gpx.getTrk().get(0))));
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    private DataBundle(TrackData track) {
 | 
			
		||||
 | 
			
		||||
        HRAvg = track.getAverageHeartrate() + App.GENERAL_BUNDLE.getString("unit.bpm");
 | 
			
		||||
| 
						 | 
				
			
			@ -67,8 +81,8 @@ public class DataBundle {
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        elevation = (int)(track.getTotalAscent() - track.getTotalDescend()) + App.GENERAL_BUNDLE.getString("unit.m");
 | 
			
		||||
        ascent = (int)track.getTotalAscent() + App.GENERAL_BUNDLE.getString("unit.m");
 | 
			
		||||
        descent = (int)track.getTotalDescend() + App.GENERAL_BUNDLE.getString("unit.m");
 | 
			
		||||
        ascent = "+ " + (int) track.getTotalAscent() + App.GENERAL_BUNDLE.getString("unit.m");
 | 
			
		||||
        descent = "- " + (int) track.getTotalDescend() + App.GENERAL_BUNDLE.getString("unit.m");
 | 
			
		||||
 | 
			
		||||
        // traverse the chunks
 | 
			
		||||
        chunks = track.getChunks();
 | 
			
		||||
| 
						 | 
				
			
			@ -108,4 +122,15 @@ public class DataBundle {
 | 
			
		|||
            if (!pieFound) pieData.add( new PieChart.Data(zone, 1) );
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static DataBundle loadFrom(File file) throws Exception {
 | 
			
		||||
        JAXBElement<Object> jaxbElement;
 | 
			
		||||
        JAXBContext jaxbContext = JAXBContext.newInstance(GpxType.class, TrackPointExtensionT.class);
 | 
			
		||||
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
 | 
			
		||||
        jaxbElement = (JAXBElement<Object>) unmarshaller.unmarshal(file);
 | 
			
		||||
        GpxType gpx = (GpxType) jaxbElement.getValue();
 | 
			
		||||
 | 
			
		||||
        if (gpx == null) throw new Exception();
 | 
			
		||||
        return new DataBundle(new TrackData(new Track(gpx.getTrk().get(0))));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 * in the Software without restriction, including without limitation the rights
 | 
			
		||||
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
 * copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
 * furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included in
 | 
			
		||||
 * all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 * in the Software without restriction, including without limitation the rights
 | 
			
		||||
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
 * copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
 * furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included in
 | 
			
		||||
 * all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* Palette generated by Material Palette - materialpalette.com/deep-orange/indigo */
 | 
			
		||||
 | 
			
		||||
.background            { -fx-background-color: #FFFFFF; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,26 +1,41 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<?import com.jfoenix.controls.JFXButton?>
 | 
			
		||||
<?import com.jfoenix.controls.JFXSpinner?>
 | 
			
		||||
<?import com.jfoenix.controls.JFXTabPane?>
 | 
			
		||||
<?import com.lynden.gmapsfx.GoogleMapView?>
 | 
			
		||||
<?import java.lang.String?>
 | 
			
		||||
<?import javafx.geometry.Insets?>
 | 
			
		||||
<?import javafx.scene.chart.AreaChart?>
 | 
			
		||||
<?import javafx.scene.chart.LineChart?>
 | 
			
		||||
<?import javafx.scene.chart.NumberAxis?>
 | 
			
		||||
<?import javafx.scene.chart.PieChart?>
 | 
			
		||||
<?import javafx.scene.control.Label?>
 | 
			
		||||
<?import javafx.scene.control.Tab?>
 | 
			
		||||
<?import javafx.scene.image.Image?>
 | 
			
		||||
<?import javafx.scene.image.ImageView?>
 | 
			
		||||
<?import javafx.scene.layout.AnchorPane?>
 | 
			
		||||
<?import javafx.scene.layout.HBox?>
 | 
			
		||||
<?import javafx.scene.layout.StackPane?>
 | 
			
		||||
<?import javafx.scene.layout.VBox?>
 | 
			
		||||
<?import javafx.scene.text.Font?>
 | 
			
		||||
<!--
 | 
			
		||||
  ~ Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
  ~
 | 
			
		||||
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
  ~ of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
  ~ in the Software without restriction, including without limitation the rights
 | 
			
		||||
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
  ~ copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
  ~ furnished to do so, subject to the following conditions:
 | 
			
		||||
  ~
 | 
			
		||||
  ~ The above copyright notice and this permission notice shall be included in
 | 
			
		||||
  ~ all copies or substantial portions of the Software.
 | 
			
		||||
  ~
 | 
			
		||||
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
  ~ THE SOFTWARE.
 | 
			
		||||
  ~
 | 
			
		||||
  ~ If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
  ~
 | 
			
		||||
  -->
 | 
			
		||||
 | 
			
		||||
<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">
 | 
			
		||||
<?import com.jfoenix.controls.*?>
 | 
			
		||||
<?import com.lynden.gmapsfx.GoogleMapView?>
 | 
			
		||||
<?import javafx.geometry.*?>
 | 
			
		||||
<?import javafx.scene.chart.*?>
 | 
			
		||||
<?import javafx.scene.control.*?>
 | 
			
		||||
<?import javafx.scene.image.*?>
 | 
			
		||||
<?import javafx.scene.layout.*?>
 | 
			
		||||
<?import javafx.scene.text.*?>
 | 
			
		||||
<?import java.lang.*?>
 | 
			
		||||
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" fx:id="root" xmlns="http://javafx.com/javafx/8.0.76-ea"
 | 
			
		||||
            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">
 | 
			
		||||
      <Tab fx:id="tabDashboard" styleClass=".estraba.dashboard" text="%tab.dashboard">
 | 
			
		||||
         <VBox prefHeight="200.0" prefWidth="100.0">
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +64,6 @@
 | 
			
		|||
                  </HBox.margin>
 | 
			
		||||
                  <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" 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">
 | 
			
		||||
                        <Image url="@../img/hr.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                     <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
 | 
			
		||||
                        <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.hr">
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +120,6 @@
 | 
			
		|||
                  </HBox>
 | 
			
		||||
                  <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" 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">
 | 
			
		||||
                        <Image url="@../img/speed.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                     <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
 | 
			
		||||
                        <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.speed">
 | 
			
		||||
| 
						 | 
				
			
			@ -148,7 +161,6 @@
 | 
			
		|||
                  </HBox>
 | 
			
		||||
                  <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" 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">
 | 
			
		||||
                        <Image url="@../img/cadence.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                     <VBox alignment="CENTER" HBox.hgrow="ALWAYS">
 | 
			
		||||
                        <Label alignment="CENTER_RIGHT" maxWidth="1.7976931348623157E308" text="%label.cadence">
 | 
			
		||||
| 
						 | 
				
			
			@ -246,7 +258,6 @@
 | 
			
		|||
                        </Label>
 | 
			
		||||
                     </VBox>
 | 
			
		||||
                     <ImageView fx:id="imgDate" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
 | 
			
		||||
                        <Image url="@../img/date.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                  </HBox>
 | 
			
		||||
                  <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
 | 
			
		||||
| 
						 | 
				
			
			@ -275,7 +286,6 @@
 | 
			
		|||
                        </Label>
 | 
			
		||||
                     </VBox>
 | 
			
		||||
                     <ImageView fx:id="imgDistance" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
 | 
			
		||||
                        <Image url="@../img/distance.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                  </HBox>
 | 
			
		||||
                  <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="200.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
 | 
			
		||||
| 
						 | 
				
			
			@ -332,7 +342,6 @@
 | 
			
		|||
                        </HBox>
 | 
			
		||||
                     </VBox>
 | 
			
		||||
                     <ImageView fx:id="imgElevation" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" styleClass=".estraba.dashboard.icon">
 | 
			
		||||
                        <Image url="@../img/climb.png" />
 | 
			
		||||
                     </ImageView>
 | 
			
		||||
                  </HBox>
 | 
			
		||||
               </VBox>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,14 +1,40 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
  ~ Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
  ~
 | 
			
		||||
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
  ~ of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
  ~ in the Software without restriction, including without limitation the rights
 | 
			
		||||
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
  ~ copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
  ~ furnished to do so, subject to the following conditions:
 | 
			
		||||
  ~
 | 
			
		||||
  ~ The above copyright notice and this permission notice shall be included in
 | 
			
		||||
  ~ all copies or substantial portions of the Software.
 | 
			
		||||
  ~
 | 
			
		||||
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
  ~ THE SOFTWARE.
 | 
			
		||||
  ~
 | 
			
		||||
  ~ If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
  ~
 | 
			
		||||
  -->
 | 
			
		||||
 | 
			
		||||
<?import com.jfoenix.controls.JFXButton?>
 | 
			
		||||
<?import com.jfoenix.controls.JFXSpinner?>
 | 
			
		||||
<?import javafx.geometry.Insets?>
 | 
			
		||||
<?import javafx.scene.control.Label?>
 | 
			
		||||
<?import javafx.scene.image.ImageView?>
 | 
			
		||||
<?import javafx.scene.layout.AnchorPane?>
 | 
			
		||||
<?import javafx.scene.layout.StackPane?>
 | 
			
		||||
 | 
			
		||||
<AnchorPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="300.0" prefWidth="300.0" styleClass="background" stylesheets="@../css/palette.css" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.estraba.controller.SplashController">
 | 
			
		||||
<?import javafx.scene.layout.*?>
 | 
			
		||||
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity"
 | 
			
		||||
            minHeight="-Infinity" minWidth="-Infinity" prefHeight="300.0" prefWidth="300.0" styleClass="background"
 | 
			
		||||
            stylesheets="@../css/palette.css" xmlns="http://javafx.com/javafx/8.0.76-ea"
 | 
			
		||||
            fx:controller="es.kauron.estraba.controller.SplashController">
 | 
			
		||||
      <ImageView fx:id="imgLogo" fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="50.0" AnchorPane.rightAnchor="50.0" AnchorPane.topAnchor="25.0">
 | 
			
		||||
      </ImageView>
 | 
			
		||||
      <JFXSpinner fx:id="spinner" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB  | 
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
#
 | 
			
		||||
# Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
#
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
# of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
# in the Software without restriction, including without limitation the rights
 | 
			
		||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
# copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
# furnished to do so, subject to the following conditions:
 | 
			
		||||
#
 | 
			
		||||
# The above copyright notice and this permission notice shall be included in
 | 
			
		||||
# all copies or substantial portions of the Software.
 | 
			
		||||
#
 | 
			
		||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
# THE SOFTWARE.
 | 
			
		||||
#
 | 
			
		||||
# If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
app.extension=GPX data files
 | 
			
		||||
app.title=ESTRABA
 | 
			
		||||
label.cadence=Cadence
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
#
 | 
			
		||||
# Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
#
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
# of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
# in the Software without restriction, including without limitation the rights
 | 
			
		||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
# copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
# furnished to do so, subject to the following conditions:
 | 
			
		||||
#
 | 
			
		||||
# The above copyright notice and this permission notice shall be included in
 | 
			
		||||
# all copies or substantial portions of the Software.
 | 
			
		||||
#
 | 
			
		||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
# THE SOFTWARE.
 | 
			
		||||
#
 | 
			
		||||
# If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
app.extension=Arxius GPX
 | 
			
		||||
app.title=ESTRABA
 | 
			
		||||
label.cadence=Cadencia
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,28 @@
 | 
			
		|||
#
 | 
			
		||||
# Copyright (c) 2016 Jesús "baudlord" Vélez Palacios, Carlos "kauron" Santiago Galindo Jiménez
 | 
			
		||||
#
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
# of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
# in the Software without restriction, including without limitation the rights
 | 
			
		||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
# copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
# furnished to do so, subject to the following conditions:
 | 
			
		||||
#
 | 
			
		||||
# The above copyright notice and this permission notice shall be included in
 | 
			
		||||
# all copies or substantial portions of the Software.
 | 
			
		||||
#
 | 
			
		||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
# THE SOFTWARE.
 | 
			
		||||
#
 | 
			
		||||
# If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
app.extension=Archivos de datos GPX
 | 
			
		||||
app.title=ESTRABA
 | 
			
		||||
label.cadence=Cadencia
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue