X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2FGpsPruner.java;h=7a172a4a64ceeb0a2576de987a4240b3018cc423;hb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c;hp=eafbf1977de170622e3a8ae3fb1290a59bc126ae;hpb=52bf9e8686c916be37a26a0b75340393d4478b05;p=GpsPrune.git diff --git a/tim/prune/GpsPruner.java b/tim/prune/GpsPruner.java index eafbf19..7a172a4 100644 --- a/tim/prune/GpsPruner.java +++ b/tim/prune/GpsPruner.java @@ -4,30 +4,39 @@ import java.awt.event.WindowAdapter; import java.awt.BorderLayout; import java.awt.event.WindowEvent; import java.io.File; +import java.io.FileNotFoundException; import java.util.Locale; +import java.util.ArrayList; import javax.swing.JFrame; import javax.swing.JSplitPane; import javax.swing.JToolBar; import javax.swing.WindowConstants; +import tim.prune.config.Config; +import tim.prune.config.ConfigException; import tim.prune.gui.DetailsDisplay; import tim.prune.gui.IconManager; import tim.prune.gui.MenuManager; import tim.prune.gui.ProfileChart; import tim.prune.gui.SelectorDisplay; import tim.prune.gui.StatusBar; +import tim.prune.gui.Viewport; import tim.prune.gui.map.MapCanvas; /** - * Tool to visualize, edit and prune GPS data + * Prune is a tool to visualize, edit, convert and prune GPS data * Please see the included readme.txt or http://activityworkshop.net - * This software is copyright activityworkshop.net and made available through the Gnu GPL + * This software is copyright activityworkshop.net 2006-2010 and made available through the Gnu GPL version 2. + * For license details please see the included license.txt. + * GpsPruner is the main entry point to the application, including initialisation and launch */ public class GpsPruner { - // Final build of version 6 - public static final String VERSION_NUMBER = "6"; - public static final String BUILD_NUMBER = "117"; + /** Version number of application, used in about screen and for version check */ + public static final String VERSION_NUMBER = "9"; + /** Build number, just used for about screen */ + public static final String BUILD_NUMBER = "176"; + /** Static reference to App object */ private static App APP = null; @@ -38,31 +47,46 @@ public class GpsPruner public static void main(String[] args) { Locale locale = null; + String localeCode = null; String langFilename = null; String configFilename = null; + ArrayList dataFiles = new ArrayList(); boolean showUsage = false; for (int i=0; i inDataFiles) { JFrame frame = new JFrame("Prune"); APP = new App(frame); // make menu - MenuManager menuManager = new MenuManager(frame, APP, APP.getTrackInfo()); + MenuManager menuManager = new MenuManager(APP, APP.getTrackInfo()); frame.setJMenuBar(menuManager.createMenuBar()); APP.setMenuManager(menuManager); UpdateMessageBroker.addSubscriber(menuManager); @@ -143,6 +186,8 @@ public class GpsPruner UpdateMessageBroker.addSubscriber(rightPanel); MapCanvas mapDisp = new MapCanvas(APP, APP.getTrackInfo()); UpdateMessageBroker.addSubscriber(mapDisp); + Viewport viewport = new Viewport(mapDisp); + APP.setViewport(viewport); ProfileChart profileDisp = new ProfileChart(APP.getTrackInfo()); UpdateMessageBroker.addSubscriber(profileDisp); StatusBar statusBar = new StatusBar(); @@ -179,8 +224,11 @@ public class GpsPruner // finish off and display frame frame.pack(); frame.setSize(650, 450); - frame.show(); + frame.setVisible(true); // Set position of map/profile splitter midPane.setDividerLocation(0.75); + + // Finally, give the files to load to the App + APP.loadDataFiles(inDataFiles); } }