Normand Briere
2019-08-22 6a145f6c81dfcbe0653eda27d042efb48daa7512
Grafreed.java
....@@ -881,7 +881,6 @@
881881 // try{Thread.sleep(5000);}catch(Exception e){}
882882 // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1);
883883
884
-
885884 /**/
886885 if (Globals.NIMBUSLAF)
887886 {
....@@ -934,6 +933,8 @@
934933
935934 ui = UIManager.getDefaults();
936935
936
+ x = ui.get("RadioButton.icon");
937
+
937938 ArrayList gradient = new java.util.ArrayList(5);
938939 gradient.add(1.0);
939940 gradient.add(0.0);
....@@ -943,9 +944,9 @@
943944
944945 ui.put("Button.gradient", gradient);
945946
946
- //ui.put("RadioButton.icon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));
947
- //ui.put("RadioButtonMenuItem.checkIcon", ObjEditor.GetIcon("icons/fit.png"));
948
- //ui.put("RadioButtonMenuItem.arrowIcon", ObjEditor.GetIcon("icons/fit.png"));
947
+ //ui.put("RadioButton.icon", new CheckBox()); //ObjEditor.GetIcon("icons/white-sphere-icon.png")));
948
+ ui.put("CheckBox.icon", new CheckBox()); //ObjEditor.GetIcon("icons/white-sphere-icon.png")));
949
+ //ui.put("CheckBoxMenuItem.checkIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));
949950
950951 ui.put("Slider.foreground", new javax.swing.plaf.ColorUIResource(0,0,0));
951952 ui.put("Slider.horizontalThumbIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));
....@@ -1015,7 +1016,9 @@
10151016
10161017 //Monitor mon=MonitorFactory.start("myFirstMonitor");
10171018 standAlone = true;
1018
- grafreed = new Grafreed();
1019
+
1020
+ grafreed = new Grafreed();
1021
+
10191022 grafreed.materials = ReadGFD(grafreed.getClass().getClassLoader().getResourceAsStream("gfd/materials.gfd"));
10201023
10211024 grafreed.universe = new cGroup();
....@@ -1035,6 +1038,33 @@
10351038 javax.swing.ToolTipManager.sharedInstance().setEnabled(Globals.TOOLTIPS);
10361039 }
10371040
1041
+ static class CheckBox extends javax.swing.plaf.metal.MetalCheckBoxIcon
1042
+ {
1043
+ java.awt.image.BufferedImage image;
1044
+
1045
+ CheckBox()
1046
+ {
1047
+ try
1048
+ {
1049
+ image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream("icons/checkbox.png"));
1050
+ }
1051
+ catch (Exception e)
1052
+ {
1053
+ }
1054
+ }
1055
+
1056
+ protected void drawCheck(Component c, Graphics g, int x, int y)
1057
+ {
1058
+ super.drawCheck(c, g, x, y);
1059
+ }
1060
+
1061
+ public void paintIcon(Component c, Graphics g, int x, int y)
1062
+ {
1063
+ g.drawImage(image, x-1, y-1, 19, 19, null);
1064
+ super.paintIcon(c, g, x+2, y+2);
1065
+ }
1066
+ }
1067
+
10381068 static Object3D materials;
10391069
10401070 static Object3D ReadGFD(java.io.InputStream istream)