.. | .. |
---|
5 | 5 | |
---|
6 | 6 | import java.io.*; |
---|
7 | 7 | |
---|
| 8 | +import java.util.ArrayList; |
---|
8 | 9 | import javax.swing.UIManager; |
---|
9 | 10 | import javax.swing.plaf.metal.MetalLookAndFeel; |
---|
10 | 11 | import javax.swing.plaf.ColorUIResource; |
---|
.. | .. |
---|
15 | 16 | //import com.jamonapi.*; |
---|
16 | 17 | public class Grafreed extends Applet implements ActionListener |
---|
17 | 18 | { |
---|
18 | | - static boolean NIMBUSLAF = true; |
---|
| 19 | + static boolean NIMBUSLAF = false; // true; |
---|
19 | 20 | |
---|
20 | 21 | static int RENDERME = 0; |
---|
21 | 22 | |
---|
.. | .. |
---|
676 | 677 | |
---|
677 | 678 | public static void main(String argv[]) |
---|
678 | 679 | { |
---|
679 | | - String osArch = System.getProperty("os.arch"); |
---|
| 680 | + String osArch = System.getProperty("os.arch"); |
---|
| 681 | + if (Globals.DEBUG) |
---|
680 | 682 | System.out.println("os.arch = " + osArch); |
---|
681 | 683 | |
---|
682 | 684 | if (argv.length == 0) |
---|
.. | .. |
---|
897 | 899 | //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
898 | 900 | //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); |
---|
899 | 901 | //UIManager.put("nimbusBase", new Color(0,0,0)); |
---|
| 902 | + |
---|
| 903 | + javax.swing.UIDefaults ui = UIManager.getDefaults(); |
---|
| 904 | + for (java.util.Enumeration e = ui.keys(); e.hasMoreElements();) |
---|
| 905 | + { |
---|
| 906 | + Object key = e.nextElement(); |
---|
| 907 | + System.out.println(key + " --> " + ui.get(key)); |
---|
| 908 | + } |
---|
900 | 909 | } |
---|
901 | 910 | catch (Exception e) |
---|
902 | 911 | { |
---|
.. | .. |
---|
906 | 915 | { |
---|
907 | 916 | try |
---|
908 | 917 | { |
---|
909 | | - MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); |
---|
910 | | - MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); |
---|
| 918 | + //Object o = UIManager.getInstalledLookAndFeels(); |
---|
| 919 | + |
---|
| 920 | + MetalLookAndFeel.setCurrentTheme(new javax.swing.plaf.metal.DefaultMetalTheme()); |
---|
| 921 | + //MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme)); |
---|
| 922 | + //UIManager.put("ScrollBar.background", new javax.swing.plaf.ColorUIResource(100,0,0)); |
---|
911 | 923 | UIManager.setLookAndFeel(new MetalLookAndFeel()); |
---|
912 | 924 | //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
913 | 925 | //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
| 926 | + //UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
914 | 927 | //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); |
---|
| 928 | + |
---|
| 929 | + javax.swing.UIDefaults ui = UIManager.getDefaults(); |
---|
| 930 | + ArrayList gradient = new java.util.ArrayList(5); |
---|
| 931 | + gradient.add(1.0); |
---|
| 932 | + gradient.add(0.0); |
---|
| 933 | + gradient.add(new javax.swing.plaf.ColorUIResource(255,255,255)); |
---|
| 934 | + gradient.add(new javax.swing.plaf.ColorUIResource(192,192,192)); |
---|
| 935 | + gradient.add(new javax.swing.plaf.ColorUIResource(0,0,0)); |
---|
| 936 | + |
---|
| 937 | + ui.put("Button.gradient", gradient); |
---|
| 938 | + ui.put("TabbedPane.tabInsets", new javax.swing.plaf.InsetsUIResource(0,8,0,0)); |
---|
| 939 | + ui.put("Slider.foreground", new javax.swing.plaf.ColorUIResource(0,0,0)); |
---|
| 940 | + ui.put("Slider.horizontalThumbIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png")); |
---|
| 941 | + |
---|
| 942 | + //javax.swing.plaf.metal.MetalIconFactory.getHorizontalSliderThumbIcon(). |
---|
| 943 | + Object o = ui.get("Slider.horizontalThumbIcon"); |
---|
| 944 | + |
---|
| 945 | + gradient = new java.util.ArrayList(5); |
---|
| 946 | + gradient.add(1.0); |
---|
| 947 | + gradient.add(0.0); |
---|
| 948 | + gradient.add(new javax.swing.plaf.ColorUIResource(192,192,192)); |
---|
| 949 | + gradient.add(new javax.swing.plaf.ColorUIResource(255,255,255)); |
---|
| 950 | + gradient.add(new javax.swing.plaf.ColorUIResource(0,0,0)); |
---|
| 951 | + |
---|
| 952 | + ui.put("ToggleButton.gradient", gradient); |
---|
| 953 | + //ui.put("Button[MouseOver].backgroundPainter", new com.sun.java.swing.plaf.nimbus.ButtonPainter()); |
---|
| 954 | + //ui.put("Button.highlight", new javax.swing.plaf.ColorUIResource(155,155,155)); |
---|
| 955 | + |
---|
| 956 | + for (java.util.Enumeration e = ui.keys(); e.hasMoreElements();) |
---|
| 957 | + { |
---|
| 958 | + Object key = e.nextElement(); |
---|
| 959 | + //System.out.println(key + " --> " + ui.get(key)); |
---|
| 960 | + } |
---|
915 | 961 | } catch (Exception e) |
---|
916 | 962 | { |
---|
917 | 963 | } |
---|
.. | .. |
---|
928 | 974 | grafreed.universe = new cGroup(); |
---|
929 | 975 | grafreed.universe.name = "Grafreed"; |
---|
930 | 976 | grafreed.universe.material = new cMaterial(); |
---|
| 977 | + grafreed.universe.skyboxname = "cubemaps/penguins-skyboxes/yonder"; |
---|
| 978 | + grafreed.universe.skyboxext = "jpg"; |
---|
| 979 | + |
---|
931 | 980 | // theApplet3D.universe.textures = CameraPane.DEFAULT_TEXTURE; |
---|
932 | 981 | |
---|
933 | 982 | grafreed.universe.root = true; |
---|
.. | .. |
---|
952 | 1001 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
953 | 1002 | |
---|
954 | 1003 | readobj = (Object3D) p.readObject(); |
---|
| 1004 | + p.close(); |
---|
| 1005 | + zstream.close(); |
---|
955 | 1006 | istream.close(); |
---|
956 | 1007 | |
---|
957 | 1008 | readobj.ResetDisplayList(); |
---|
.. | .. |
---|
965 | 1016 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
966 | 1017 | |
---|
967 | 1018 | readobj = (Object3D) p.readObject(); |
---|
| 1019 | + p.close(); |
---|
968 | 1020 | istream.close(); |
---|
969 | 1021 | |
---|
970 | 1022 | readobj.ResetDisplayList(); |
---|