From 20c1a07b76c39462594aedfedfe6e6adb17cd552 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Wed, 01 May 2019 14:27:01 -0400 Subject: [PATCH] Fix animation and fast mode. --- GrafreeD.java | 43 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 35 insertions(+), 8 deletions(-) diff --git a/GrafreeD.java b/GrafreeD.java index 44e3600..d82d57e 100644 --- a/GrafreeD.java +++ b/GrafreeD.java @@ -15,6 +15,8 @@ //import com.jamonapi.*; public class GrafreeD extends Applet implements ActionListener { + static boolean NIMBUSLAF = true; + static int RENDERME = 0; static boolean epsequal = false; @@ -801,19 +803,44 @@ // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1); - - try +/**/ + if (NIMBUSLAF) { - MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); - MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); - UIManager.setLookAndFeel(new MetalLookAndFeel()); - //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); + try + { + Object o = UIManager.getInstalledLookAndFeels(); + + javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme(new javax.swing.plaf.metal.DefaultMetalTheme()); + //MetalLookAndFeel.setCurrentTheme(new Theme(Constants.beigeTheme)); + UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel()); + + UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); - } catch (Exception e) - { + //UIManager.put("nimbusBase", new Color(0,0,0)); + } + catch (Exception e) + { + } } + else + { + try + { + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); + MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); + UIManager.setLookAndFeel(new MetalLookAndFeel()); + //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); + //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); + //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); + } catch (Exception e) + { + } + } +/**/ +// javax.swing.ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); + //Monitor mon=MonitorFactory.start("myFirstMonitor"); standAlone = true; grafreeD = new GrafreeD(); -- Gitblit v1.6.2