From d5d6485126da83b06645e90e3e4ce66659a56009 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sat, 17 Aug 2019 13:56:24 -0400
Subject: [PATCH] Reset transform, fix loop versioning.

---
 Grafreed.java |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/Grafreed.java b/Grafreed.java
index 99344db..e0acda9 100644
--- a/Grafreed.java
+++ b/Grafreed.java
@@ -5,6 +5,7 @@
 
 import java.io.*;
 
+import java.util.ArrayList;
 import javax.swing.UIManager;
 import javax.swing.plaf.metal.MetalLookAndFeel;
 import javax.swing.plaf.ColorUIResource;
@@ -15,7 +16,7 @@
 //import com.jamonapi.*;
 public class Grafreed extends Applet implements ActionListener
 {
-        static boolean NIMBUSLAF = true;
+        static boolean NIMBUSLAF = false; // true;
         
     static int RENDERME = 0;
 
@@ -898,6 +899,13 @@
             //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
             //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
                         //UIManager.put("nimbusBase", new Color(0,0,0));
+                        
+                    javax.swing.UIDefaults ui = UIManager.getDefaults();
+                    for (java.util.Enumeration e = ui.keys(); e.hasMoreElements();)
+                    {
+                        Object key = e.nextElement();
+                        System.out.println(key + " --> " + ui.get(key));
+                    }
                 }
                 catch (Exception e)
                 {
@@ -907,12 +915,49 @@
         {
                 try
                 {
-                    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
-                    MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme));
+                    //Object o = UIManager.getInstalledLookAndFeels();
+                    
+                    MetalLookAndFeel.setCurrentTheme(new javax.swing.plaf.metal.DefaultMetalTheme());
+                    //MetalLookAndFeel.setCurrentTheme(new Theme(Constants.yellowTheme));
+                    //UIManager.put("ScrollBar.background", new javax.swing.plaf.ColorUIResource(100,0,0));
                     UIManager.setLookAndFeel(new MetalLookAndFeel());
                     //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
                     //UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
+                    //UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
                     //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+                    
+                    javax.swing.UIDefaults ui = UIManager.getDefaults();
+                    ArrayList gradient = new java.util.ArrayList(5);
+                    gradient.add(1.0);
+                    gradient.add(0.0);
+                    gradient.add(new javax.swing.plaf.ColorUIResource(255,255,255));
+                    gradient.add(new javax.swing.plaf.ColorUIResource(192,192,192));
+                    gradient.add(new javax.swing.plaf.ColorUIResource(0,0,0));
+                    
+                    ui.put("Button.gradient", gradient);
+                    ui.put("TabbedPane.tabInsets", new javax.swing.plaf.InsetsUIResource(0,8,0,0));
+                    ui.put("Slider.foreground", new javax.swing.plaf.ColorUIResource(0,0,0));
+                    ui.put("Slider.horizontalThumbIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));
+                    
+                    //javax.swing.plaf.metal.MetalIconFactory.getHorizontalSliderThumbIcon().
+                    Object o = ui.get("Slider.horizontalThumbIcon");
+                    
+                    gradient = new java.util.ArrayList(5);
+                    gradient.add(1.0);
+                    gradient.add(0.0);
+                    gradient.add(new javax.swing.plaf.ColorUIResource(192,192,192));
+                    gradient.add(new javax.swing.plaf.ColorUIResource(255,255,255));
+                    gradient.add(new javax.swing.plaf.ColorUIResource(0,0,0));
+                    
+                    ui.put("ToggleButton.gradient", gradient);
+                    //ui.put("Button[MouseOver].backgroundPainter", new com.sun.java.swing.plaf.nimbus.ButtonPainter());
+                    //ui.put("Button.highlight", new javax.swing.plaf.ColorUIResource(155,155,155));
+                    
+                    for (java.util.Enumeration e = ui.keys(); e.hasMoreElements();)
+                    {
+                        Object key = e.nextElement();
+                        //System.out.println(key + " --> " + ui.get(key));
+                    }
                 } catch (Exception e)
                 {
                 }
@@ -1105,6 +1150,11 @@
 
     static public Object clone(Object o)
     {
+        if (o instanceof Object3D)
+        {
+            assert(((Object3D)o).parent == null);
+        }
+        
         if (o == null)
             return null;
         

--
Gitblit v1.6.2