.. | .. |
---|
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 | |
---|
.. | .. |
---|
898 | 899 | //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
899 | 900 | //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); |
---|
900 | 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 | + } |
---|
901 | 909 | } |
---|
902 | 910 | catch (Exception e) |
---|
903 | 911 | { |
---|
.. | .. |
---|
907 | 915 | { |
---|
908 | 916 | try |
---|
909 | 917 | { |
---|
910 | | - MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); |
---|
911 | | - 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)); |
---|
912 | 923 | UIManager.setLookAndFeel(new MetalLookAndFeel()); |
---|
913 | 924 | //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
914 | 925 | //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel"); |
---|
| 926 | + //UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel"); |
---|
915 | 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 | + } |
---|
916 | 961 | } catch (Exception e) |
---|
917 | 962 | { |
---|
918 | 963 | } |
---|
.. | .. |
---|
1105 | 1150 | |
---|
1106 | 1151 | static public Object clone(Object o) |
---|
1107 | 1152 | { |
---|
| 1153 | + if (o instanceof Object3D) |
---|
| 1154 | + { |
---|
| 1155 | + assert(((Object3D)o).parent == null); |
---|
| 1156 | + } |
---|
| 1157 | + |
---|
1108 | 1158 | if (o == null) |
---|
1109 | 1159 | return null; |
---|
1110 | 1160 | |
---|