From c209bbe1cf788c9af3dcffea7667c830170a3f1f Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Wed, 01 May 2019 20:30:51 -0400 Subject: [PATCH] Complete advanced mode. --- GrafreeD.java | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 43 insertions(+), 9 deletions(-) diff --git a/GrafreeD.java b/GrafreeD.java index 1527f55..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; @@ -595,6 +597,9 @@ public static void main(String argv[]) { + String osArch = System.getProperty("os.arch"); + System.out.println("os.arch = " + osArch); + if (argv.length == 0) { String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; @@ -626,7 +631,11 @@ System.out.println("jarfile = " + jarfile); jarpath = jarpath.substring(1, jarpath.length()); System.out.println("jarpath = " + jarpath); - command += "native" + File.separator + "windows_amd64"; + command += "native" + File.separator; + if (osArch.equals("amd64")) + command += "windows_amd64"; + else + command += "windows_i586"; } else command += "native" + File.separator + "macosx"; @@ -794,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