.. | .. |
---|
15 | 15 | //import com.jamonapi.*; |
---|
16 | 16 | public class GrafreeD extends Applet implements ActionListener |
---|
17 | 17 | { |
---|
| 18 | + static boolean NIMBUSLAF = true; |
---|
| 19 | + |
---|
18 | 20 | static int RENDERME = 0; |
---|
19 | 21 | |
---|
20 | 22 | static boolean epsequal = false; |
---|
.. | .. |
---|
595 | 597 | |
---|
596 | 598 | public static void main(String argv[]) |
---|
597 | 599 | { |
---|
| 600 | + String osArch = System.getProperty("os.arch"); |
---|
| 601 | + System.out.println("os.arch = " + osArch); |
---|
| 602 | + |
---|
598 | 603 | if (argv.length == 0) |
---|
599 | 604 | { |
---|
600 | 605 | String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; |
---|
.. | .. |
---|
626 | 631 | System.out.println("jarfile = " + jarfile); |
---|
627 | 632 | jarpath = jarpath.substring(1, jarpath.length()); |
---|
628 | 633 | System.out.println("jarpath = " + jarpath); |
---|
629 | | - command += "native" + File.separator + "windows_amd64"; |
---|
| 634 | + command += "native" + File.separator; |
---|
| 635 | + if (osArch.equals("amd64")) |
---|
| 636 | + command += "windows_amd64"; |
---|
| 637 | + else |
---|
| 638 | + command += "windows_i586"; |
---|
630 | 639 | } |
---|
631 | 640 | else |
---|
632 | 641 | command += "native" + File.separator + "macosx"; |
---|
.. | .. |
---|
794 | 803 | // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1); |
---|
795 | 804 | |
---|
796 | 805 | |
---|
797 | | - |
---|
798 | | - try |
---|
| 806 | +/**/ |
---|
| 807 | + if (NIMBUSLAF) |
---|
799 | 808 | { |
---|
800 | | - MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); |
---|
801 | | - MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); |
---|
802 | | - UIManager.setLookAndFeel(new MetalLookAndFeel()); |
---|
803 | | - //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
| 809 | + try |
---|
| 810 | + { |
---|
| 811 | + Object o = UIManager.getInstalledLookAndFeels(); |
---|
| 812 | + |
---|
| 813 | + javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme(new javax.swing.plaf.metal.DefaultMetalTheme()); |
---|
| 814 | + //MetalLookAndFeel.setCurrentTheme(new Theme(Constants.beigeTheme)); |
---|
| 815 | + UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel()); |
---|
| 816 | + |
---|
| 817 | + UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
804 | 818 | //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
805 | 819 | //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); |
---|
806 | | - } catch (Exception e) |
---|
807 | | - { |
---|
| 820 | + //UIManager.put("nimbusBase", new Color(0,0,0)); |
---|
| 821 | + } |
---|
| 822 | + catch (Exception e) |
---|
| 823 | + { |
---|
| 824 | + } |
---|
808 | 825 | } |
---|
| 826 | + else |
---|
| 827 | + { |
---|
| 828 | + try |
---|
| 829 | + { |
---|
| 830 | + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); |
---|
| 831 | + MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); |
---|
| 832 | + UIManager.setLookAndFeel(new MetalLookAndFeel()); |
---|
| 833 | + //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
| 834 | + //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
| 835 | + //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); |
---|
| 836 | + } catch (Exception e) |
---|
| 837 | + { |
---|
| 838 | + } |
---|
| 839 | + } |
---|
| 840 | +/**/ |
---|
809 | 841 | |
---|
| 842 | +// javax.swing.ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
| 843 | + |
---|
810 | 844 | //Monitor mon=MonitorFactory.start("myFirstMonitor"); |
---|
811 | 845 | standAlone = true; |
---|
812 | 846 | grafreeD = new GrafreeD(); |
---|