Normand Briere
2019-05-05 1e3de699b037989e8deded5c7830139f97c64136
GrafreeD.java
....@@ -15,6 +15,8 @@
1515 //import com.jamonapi.*;
1616 public class GrafreeD extends Applet implements ActionListener
1717 {
18
+ static boolean NIMBUSLAF = true;
19
+
1820 static int RENDERME = 0;
1921
2022 static boolean epsequal = false;
....@@ -595,6 +597,9 @@
595597
596598 public static void main(String argv[])
597599 {
600
+ String osArch = System.getProperty("os.arch");
601
+ System.out.println("os.arch = " + osArch);
602
+
598603 if (argv.length == 0)
599604 {
600605 String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
....@@ -607,7 +612,7 @@
607612
608613 System.out.println("jarfile0 = " + jarfile);
609614
610
- String jarpath = u.toString().split("file:")[1].split("GrafreeD.jar")[0];
615
+ String jarpath = u.toString().split("file:")[1].split("Grafreed.jar")[0];
611616
612617 System.out.println("jarpath0 = " + jarpath);
613618
....@@ -626,7 +631,11 @@
626631 System.out.println("jarfile = " + jarfile);
627632 jarpath = jarpath.substring(1, jarpath.length());
628633 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";
630639 }
631640 else
632641 command += "native" + File.separator + "macosx";
....@@ -794,24 +803,49 @@
794803 // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1);
795804
796805
797
-
798
- try
806
+/**/
807
+ if (NIMBUSLAF)
799808 {
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");
804818 //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
805819 //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
+ }
808825 }
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
+/**/
809841
842
+// javax.swing.ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
843
+
810844 //Monitor mon=MonitorFactory.start("myFirstMonitor");
811845 standAlone = true;
812846 grafreeD = new GrafreeD();
813847 grafreeD.universe = new Composite();
814
- grafreeD.universe.name = "Scene";
848
+ grafreeD.universe.name = "Grafreed";
815849 grafreeD.universe.material = new cMaterial();
816850 // theApplet3D.universe.textures = CameraPane.DEFAULT_TEXTURE;
817851