From 86f4e9c75951153ae9825f4772633e45698cb602 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 16 Dec 2018 21:21:43 -0500 Subject: [PATCH] Timeflow clean-up. --- timeflow/app/TimeflowAppLauncher.java | 92 ++++++++++++++++++++++++++-------------------- 1 files changed, 52 insertions(+), 40 deletions(-) diff --git a/timeflow/app/TimeflowAppLauncher.java b/timeflow/app/TimeflowAppLauncher.java index f034666..311adbb 100755 --- a/timeflow/app/TimeflowAppLauncher.java +++ b/timeflow/app/TimeflowAppLauncher.java @@ -7,46 +7,58 @@ // For some reason we have to do this in a separate class in order to // get the menubar working right on the Mac. +public class TimeflowAppLauncher +{ + public static void main(String[] args) throws Exception + { + System.setProperty("apple.laf.useScreenMenuBar", "true"); + System.setProperty("com.apple.mrj.application.apple.menu.about.name", "TimeFlow"); + System.out.println("Running " + Display.version()); -public class TimeflowAppLauncher { - public static void main(String[] args) throws Exception - { - System.setProperty("apple.laf.useScreenMenuBar", "true"); - System.setProperty("com.apple.mrj.application.apple.menu.about.name", "TimeFlow"); - System.out.println("Running "+Display.version()); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } - catch (Exception e) { - System.out.println("Can't set system look & feel"); - } - - final TimeflowApp t=new TimeflowApp(); - t.splash=new AboutWindow(t, t.model.getDisplay()); - t.splash(true); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try - { - t.init(); - t.setVisible(true); - } - catch (Exception e) - { - e.printStackTrace(System.out); - } - t.splash.addMouseListener(new MouseAdapter() { + try + { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (Exception e) + { + System.out.println("Can't set system look & feel"); + } + + GetTimeFlow(); + } - @Override - public void mouseClicked(MouseEvent e) { - t.splash.setVisible(false); - }} - ); - t.splash(false); - //t.splash.message=t.model.getDisplay().version(); - }}); - - } + public static TimeflowApp GetTimeFlow() + { + final TimeflowApp t = new TimeflowApp(); + t.splash = new AboutWindow(t, t.model.getDisplay()); + t.splash(true); + SwingUtilities.invokeLater(new Runnable() + { + + @Override + public void run() + { + try + { + t.init(); + t.setVisible(true); + } catch (Exception e) + { + e.printStackTrace(System.out); + } + t.splash.addMouseListener(new MouseAdapter() + { + + @Override + public void mouseClicked(MouseEvent e) + { + t.splash.setVisible(false); + } + }); + t.splash(false); + //t.splash.message=t.model.getDisplay().version(); + } + }); + + return t; + } } -- Gitblit v1.6.2