Normand Briere
2019-08-17 5892f05411c3d4dce2d8a59e0966dc2e1843a971
Grafreed.java
....@@ -5,6 +5,7 @@
55
66 import java.io.*;
77
8
+import java.util.ArrayList;
89 import javax.swing.UIManager;
910 import javax.swing.plaf.metal.MetalLookAndFeel;
1011 import javax.swing.plaf.ColorUIResource;
....@@ -15,7 +16,7 @@
1516 //import com.jamonapi.*;
1617 public class Grafreed extends Applet implements ActionListener
1718 {
18
- static boolean NIMBUSLAF = true;
19
+ static boolean NIMBUSLAF = false; // true;
1920
2021 static int RENDERME = 0;
2122
....@@ -898,6 +899,13 @@
898899 //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
899900 //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
900901 //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
+ }
901909 }
902910 catch (Exception e)
903911 {
....@@ -907,12 +915,49 @@
907915 {
908916 try
909917 {
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));
912923 UIManager.setLookAndFeel(new MetalLookAndFeel());
913924 //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
914925 //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
926
+ //UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
915927 //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
+ }
916961 } catch (Exception e)
917962 {
918963 }