From c209bbe1cf788c9af3dcffea7667c830170a3f1f Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Wed, 01 May 2019 20:30:51 -0400
Subject: [PATCH] Complete advanced mode.

---
 ObjEditor.java | 1133 ++++++++++++++++++++++++++++-------------------------------
 1 files changed, 540 insertions(+), 593 deletions(-)

diff --git a/ObjEditor.java b/ObjEditor.java
index 25a20ef..afb7487 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -19,6 +19,8 @@
 import //weka.core.
         matrix.Matrix;
 
+import grafeme.ui.*;
+
 class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI,
         ActionListener, ChangeListener,
         InputMethodListener,
@@ -124,7 +126,7 @@
     void keyPressed(int key, int modifiers)
     {
     System.out.println("KEY PRESSED");
-    CameraPane.theRenderer.keyPressed(key, modifiers);
+    Globals.theRenderer.keyPressed(key, modifiers);
     }
      */
 
@@ -136,34 +138,41 @@
     public void closeUI()
     {
         //new Exception().printStackTrace();
-        System.out.println("this = " + this);
-        System.out.println("objEditor = " + objEditor);
+//        System.out.println("this = " + this);
+//        System.out.println("objEditor = " + objEditor);
         //nameField.removeActionListener(this);
-        objEditor.ctrlPanel.remove(nameField);
+//        objEditor.ctrlPanel.remove(nameField);
+        
+        objEditor.ctrlPanel.remove(namePanel);
         
         if (!GroupEditor.allparams)
             return;
         
-        objEditor.ctrlPanel.remove(liveCB);
-        objEditor.ctrlPanel.remove(hideCB);
-        objEditor.ctrlPanel.remove(markCB);
-
-        objEditor.ctrlPanel.remove(randomCB);
-        objEditor.ctrlPanel.remove(speedupCB);
-        objEditor.ctrlPanel.remove(rewindCB);
-
-        objEditor.ctrlPanel.remove(resetButton);
-        objEditor.ctrlPanel.remove(stepButton);
-//                objEditor.ctrlPanel.remove(stepAllButton);
-//                objEditor.ctrlPanel.remove(resetAllButton);
-        objEditor.ctrlPanel.remove(link2masterCB);
-        //objEditor.ctrlPanel.remove(flipVCB);
-        //objEditor.ctrlPanel.remove(texresMenu);
-        objEditor.ctrlPanel.remove(slowerButton);
-        objEditor.ctrlPanel.remove(fasterButton);
-        objEditor.ctrlPanel.remove(remarkButton);
+//        objEditor.ctrlPanel.remove(liveCB);
+//        objEditor.ctrlPanel.remove(hideCB);
+//        objEditor.ctrlPanel.remove(markCB);
+//
+//        objEditor.ctrlPanel.remove(randomCB);
+//        objEditor.ctrlPanel.remove(speedupCB);
+//        objEditor.ctrlPanel.remove(rewindCB);
+//
+//        objEditor.ctrlPanel.remove(resetButton);
+//        objEditor.ctrlPanel.remove(stepButton);
+////                objEditor.ctrlPanel.remove(stepAllButton);
+////                objEditor.ctrlPanel.remove(resetAllButton);
+//        objEditor.ctrlPanel.remove(link2masterCB);
+//        //objEditor.ctrlPanel.remove(flipVCB);
+//        //objEditor.ctrlPanel.remove(texresMenu);
+//        objEditor.ctrlPanel.remove(slowerButton);
+//        objEditor.ctrlPanel.remove(fasterButton);
+//        objEditor.ctrlPanel.remove(remarkButton);
         
-        Remove(normalpushField);
+        objEditor.ctrlPanel.remove(setupPanel);
+        objEditor.ctrlPanel.remove(commandsPanel);
+        objEditor.ctrlPanel.remove(pushPanel);
+        //objEditor.ctrlPanel.remove(fillPanel);
+        
+        //Remove(normalpushField);
     }
 
     public ObjEditor GetEditor()
@@ -300,44 +309,60 @@
         //normalLensItem.addActionListener(this);
         cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
         revertCameraItem.addActionListener(this);
-        cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
-        toggleTimelineItem.addItemListener(this);
+        
         cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
         toggleFullScreenItem.addItemListener(this);
         toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
         cameraMenu.add("-");
+        
         cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
         toggleTextureItem.addItemListener(this);
         toggleTextureItem.setState(CameraPane.textureon);
-        cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
-        toggleLiveItem.addItemListener(this);
-        toggleLiveItem.setState(CameraPane.isLIVE());
-        cameraMenu.add(stepItem = new MenuItem("Step"));
-        stepItem.addActionListener(this);
-//		cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
-//		toggleDLItem.addItemListener(this);
-//                toggleDLItem.setState(false);
-        cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
-        toggleRenderItem.addItemListener(this);
-        toggleRenderItem.setState(!CameraPane.frozen);
-        cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
-        toggleDebugItem.addItemListener(this);
-        toggleDebugItem.setState(CameraPane.DEBUG);
-        cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
-        toggleFrustumItem.addItemListener(this);
-        toggleFrustumItem.setState(CameraPane.FRUSTUM);
-        cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
-        toggleFootContactItem.addItemListener(this);
-        toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
-        cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
-        toggleRandomItem.addItemListener(this);
-        toggleRandomItem.setState(CameraPane.RANDOM);
+        
+        if (Globals.ADVANCED)
+        {
+                cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
+                toggleLiveItem.addItemListener(this);
+                toggleLiveItem.setState(Globals.isLIVE());
+
+                cameraMenu.add(stepItem = new MenuItem("Step"));
+                stepItem.addActionListener(this);
+        //		cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
+        //		toggleDLItem.addItemListener(this);
+        //                toggleDLItem.setState(false);
+
+                cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
+                toggleRenderItem.addItemListener(this);
+                toggleRenderItem.setState(!CameraPane.frozen);
+
+                cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
+                toggleDebugItem.addItemListener(this);
+                toggleDebugItem.setState(CameraPane.DEBUG);
+
+                cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
+                toggleFrustumItem.addItemListener(this);
+                toggleFrustumItem.setState(CameraPane.FRUSTUM);
+
+                cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
+                toggleFootContactItem.addItemListener(this);
+                toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
+                
+                cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
+                toggleTimelineItem.addItemListener(this);
+        }
+        
+        cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
+        toggleSwitchItem.addItemListener(this);
+        toggleSwitchItem.setState(CameraPane.SWITCH);
+        
         cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
         toggleHandleItem.addItemListener(this);
         toggleHandleItem.setState(CameraPane.HANDLES);
+        
         cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
         togglePaintItem.addItemListener(this);
         togglePaintItem.setState(CameraPane.PAINTMODE);
+        
 //		cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
 //		toggleRootItem.addItemListener(this);
 //                    toggleRootItem.setState(false);
@@ -351,21 +376,23 @@
         objectPanel = new JTabbedPane();
         toolbarPanel = new JPanel();
         toolbarPanel.setName("Toolbar");
-        treePanel = new JPanel();
+        treePanel = new cGridBag();
         treePanel.setName("Tree");
-        ctrlPanel = new JPanel(); // new GridBagLayout());
+        ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
         ctrlPanel.setName("Edit");
-        materialPanel = new JPanel();
+        materialPanel = new cGridBag().setVertical(true);
         materialPanel.setName("Material");
         /*JTextPane*/
         infoarea = createTextPane();
+        doc = infoarea.getStyledDocument();
+
         infoarea.setEditable(true);
         SetText();
 //            infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
 //            infoarea.setOpaque(false);
 //            //infoarea.setForeground(textcolor);
-            infoarea.setLineWrap(true);
-            infoarea.setWrapStyleWord(true);
+// TEXTAREA           infoarea.setLineWrap(true);
+// TEXTAREA           infoarea.setWrapStyleWord(true);
         infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
         infoPanel.setPreferredSize(new Dimension(50, 200));
         infoPanel.setName("Info");
@@ -376,16 +403,16 @@
         mainPanel.setName("Main");
         mainPanel.setContinuousLayout(true);
         mainPanel.setOneTouchExpandable(true);
-        mainPanel.setDividerLocation(1.0);
         mainPanel.setDividerSize(9);
-        mainPanel.setResizeWeight(0);
+        mainPanel.setDividerLocation(0.5); //1.0);
+        mainPanel.setResizeWeight(0.5);
 
         //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
         //mainPanel.setLayout(new GridBagLayout());
         toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
-        treePanel.setLayout(new GridBagLayout());
-        ctrlPanel.setLayout(new GridBagLayout());
-        materialPanel.setLayout(new GridBagLayout());
+//        treePanel.setLayout(new GridBagLayout());
+        //ctrlPanel.setLayout(new GridBagLayout());
+        //materialPanel.setLayout(new GridBagLayout());
 
         aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
                 GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0);
@@ -424,7 +451,7 @@
     static String newline = "\n";
     protected static final String buttonString = "JButton";
     StyledDocument doc;
-    JTextArea infoarea;
+    JTextPane infoarea;
 
     void ClearInfo()
     {
@@ -491,7 +518,10 @@
                 }
 
         if (full)
-            si.SendInfo("    BBox: " + minima + " - " + maxima, "regular");
+        {
+            si.SendInfo("    BBox min: " + minima, "regular");
+            si.SendInfo("    BBox max: " + maxima, "regular");
+        }
         
                 if (sel.bRep != null)
                 {
@@ -589,6 +619,9 @@
             {
                 CameraPane.pointflow = (PointFlow) sel;
             }
+            
+            si.SendInfo("_____________________", "regular");
+            si.SendInfo("", "regular");
         }
     }
 
@@ -620,52 +653,52 @@
                 cameraView.ToggleFullScreen();
         }
 
-    private JTextArea createTextPane()
+    private JTextPane createTextPane()
     {
-        String[] initString =
-        {
-            "This is an editable JTextPane, ", //regular
-            "another ", //italic
-            "styled ", //bold
-            "text ", //small
-            "component, ", //large
-            "which supports embedded components..." + newline,//regular
-            " " + newline, //button
-            "...and embedded icons..." + newline, //regular
-            " ", //icon
-            newline + "JTextPane is a subclass of JEditorPane that "
-            + "uses a StyledEditorKit and StyledDocument, and provides "
-            + "cover methods for interacting with those objects."
-        };
+// TEXTAREA       String[] initString =
+//        {
+//            "This is an editable JTextPane, ", //regular
+//            "another ", //italic
+//            "styled ", //bold
+//            "text ", //small
+//            "component, ", //large
+//            "which supports embedded components..." + newline,//regular
+//            " " + newline, //button
+//            "...and embedded icons..." + newline, //regular
+//            " ", //icon
+//            newline + "JTextPane is a subclass of JEditorPane that "
+//            + "uses a StyledEditorKit and StyledDocument, and provides "
+//            + "cover methods for interacting with those objects."
+//        };
+//
+//        String[] initStyles =
+//        {
+//            "regular", "italic", "bold", "small", "large",
+//            "regular", "button", "regular", "icon",
+//            "regular"
+//        };
+//
+//        JTextPane textPane = new JTextPane();
+//        textPane.setEditable(true);
+//        /*StyledDocument*/ doc = textPane.getStyledDocument();
+//        addStylesToDocument(doc);
+//
+//        try
+//        {
+//            for (int j = 0; j < 2; j++)
+//            {
+//                for (int i = 0; i < initString.length; i++)
+//                {
+//                    doc.insertString(doc.getLength(), initString[i],
+//                            doc.getStyle(initStyles[i]));
+//                }
+//            }
+//        } catch (BadLocationException ble)
+//        {
+//            System.err.println("Couldn't insert initial text into text pane.");
+//        }
 
-        String[] initStyles =
-        {
-            "regular", "italic", "bold", "small", "large",
-            "regular", "button", "regular", "icon",
-            "regular"
-        };
-
-        JTextPane textPane = new JTextPane();
-        textPane.setEditable(true);
-        /*StyledDocument*/ doc = textPane.getStyledDocument();
-        addStylesToDocument(doc);
-
-        try
-        {
-            for (int j = 0; j < 2; j++)
-            {
-                for (int i = 0; i < initString.length; i++)
-                {
-                    doc.insertString(doc.getLength(), initString[i],
-                            doc.getStyle(initStyles[i]));
-                }
-            }
-        } catch (BadLocationException ble)
-        {
-            System.err.println("Couldn't insert initial text into text pane.");
-        }
-
-        return new JTextArea(); // textPane;
+        return new JTextPane(); // textPane;
     }
 
     protected void addStylesToDocument(StyledDocument doc)
@@ -765,115 +798,83 @@
     JButton slowerButton;
     JButton fasterButton;
     JButton remarkButton;
+    
+    cGridBag namePanel;
+    cGridBag setupPanel;
+    cGridBag commandsPanel;
+    cGridBag pushPanel;
+    cGridBag fillPanel;
 
-    JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
+    JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
     {
         JCheckBox cb;
 
-        oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        oe.aConstraints.gridwidth = 1; // 3;
-//        oe.aConstraints.weightx = 1;
-//        oe.aConstraints.anchor = GridBagConstraints.WEST;
-        oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
+        panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
         cb.addItemListener(this);
-//        oe.aConstraints.anchor = GridBagConstraints.EAST;
-        oe.aConstraints.gridwidth = 1;
-        oe.aConstraints.gridx += 1;
 
         return cb;
     }
 
-    cButton AddButton(ObjEditor oe, String label)
+    cButton AddButton(cGridBag panel, String label)
     {
         cButton cb;
 
-        oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        oe.aConstraints.gridwidth = 1;
-//        oe.aConstraints.weightx = 1;
-//        oe.aConstraints.anchor = GridBagConstraints.WEST;
-        oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
+        panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
         cb.addActionListener(this);
-//        oe.aConstraints.anchor = GridBagConstraints.EAST;
-        oe.aConstraints.gridwidth = 1;
-        oe.aConstraints.gridx += 1;
 
         return cb;
     }
 
-    JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
+    JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
     {
         JComboBox combo;
 
-        oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
-        oe.aConstraints.gridx += 1;
+        panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
         combo.addActionListener(this);
 
         return combo;
     }
 
-    NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow)
+    cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
     {
-        NumberSlider combo;
+        cGridBag control = new cGridBag();
+            
+        cNumberSlider combo;
 
         JLabel jlabel = new JLabel(label);
-
-        aConstraints.fill = GridBagConstraints.VERTICAL;
         jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.gridwidth = 1;
-        ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
-        aConstraints.gridx += 1;
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = 1;
-
+        control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
+        control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
         combo.setFloat(current);
-
-        combo.label = jlabel;
-
-        combo.addChangeListener(this);
-
-        return combo;
+        
+        panel.add(control);
+        
+        return control;
     }
 
-    NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current)
+    cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
     {
-        NumberSlider combo;
+        cGridBag control = new cGridBag();
+        
+        cNumberSlider combo;
 
         JLabel jlabel = new JLabel(label);
-
-        aConstraints.fill = GridBagConstraints.VERTICAL;
         jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.gridwidth = 2;
-        ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
-        aConstraints.gridx += 1;
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = 1;
-
+        control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
+        control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
         combo.setInteger(current);
 
-        combo.label = jlabel;
-
-        combo.addChangeListener(this);
-
-        return combo;
+        panel.add(control);
+        
+        return control;
     }
 
-    JTextArea AddText(JPanel ctrlPanel, String name)
+    JTextArea AddText(cGridBag ctrlPanel, String name)
     {
         JTextArea text;
 
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
+        ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
         text.addCaretListener(this);
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = 1;
 
         return text;
     }
@@ -903,9 +904,16 @@
         objEditor.ctrlPanel.remove(j);
     }
 
+    void Remove(cNumberSlider j)
+    {
+        j.removeChangeListener(this);
+        //objEditor.ctrlPanel.remove(j.label);
+        objEditor.ctrlPanel.remove(j);
+    }
+
     /*
      */
-    void Return() // ObjEditor oe)
+    void Return0() // ObjEditor oe)
     {
         aConstraints.gridy += 1;
         aConstraints.gridx = 0;
@@ -960,37 +968,70 @@
 
     void SetupUI2(ObjEditor oe)
     {
-//            oe.aConstraints.weightx = 0;
-//            oe.aConstraints.weighty = 0;
-//            oe.aConstraints.gridx = 0;
-//            oe.aConstraints.gridy = 0;
-        SetupName(oe);
+        //SetupName(oe);
+        
+            namePanel = new cGridBag();
+            
+        nameField = AddText(namePanel, copy.GetName());
+        namePanel.add(nameField);
+        oe.ctrlPanel.add(namePanel);
+        
+        oe.ctrlPanel.Return();
         
         if (!GroupEditor.allparams)
             return;
 
-        liveCB = AddCheckBox(oe, "Live", copy.live);
-        link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
-        hideCB = AddCheckBox(oe, "Hide", copy.hide);
+            setupPanel = new cGridBag().setVertical(false);
+            
+        liveCB = AddCheckBox(setupPanel, "Live", copy.live);
+                liveCB.setToolTipText("Animate object");
+        hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
+                hideCB.setToolTipText("Hide object");
 //            Return();
-        markCB = AddCheckBox(oe, "Mark", copy.marked);
-        rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
-        randomCB = AddCheckBox(oe, "Rand", copy.random);
-        Return();
-        resetButton = AddButton(oe, "Reset");
-        stepButton = AddButton(oe, "Step");
+        markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
+        markCB.setToolTipText("Set the animation target transform");
+        
+        rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
+        rewindCB.setToolTipText("Rewind animation");
+        
+        randomCB = AddCheckBox(setupPanel, "Random", copy.random);
+        randomCB.setToolTipText("Option for switch node");
+
+        if (Globals.ADVANCED)
+        {
+                link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
+                link2masterCB.setToolTipText("Attach to support");
+                speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
+                speedupCB.setToolTipText("Option motion capture");
+        }
+        
+        oe.ctrlPanel.add(setupPanel);
+        oe.ctrlPanel.Return();
+        
+            commandsPanel = new cGridBag().setVertical(false);
+        
+        resetButton = AddButton(commandsPanel, "Reset");
+        resetButton.setToolTipText("Jump to frame zero");
+        stepButton = AddButton(commandsPanel, "Step");
+        stepButton.setToolTipText("Step one frame");
 //            resetAllButton = AddButton(oe, "Reset All");
 //            stepAllButton = AddButton(oe, "Step All");
-        speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
 //            Return();
-        slowerButton = AddButton(oe, "Slow");
-        fasterButton = AddButton(oe, "Fast");
-        remarkButton = AddButton(oe, "Rem");
+        slowerButton = AddButton(commandsPanel, "Slow");
+        slowerButton.setToolTipText("Decrease animation speed");
+        fasterButton = AddButton(commandsPanel, "Fast");
+        fasterButton.setToolTipText("Increase animation speed");
+        remarkButton = AddButton(commandsPanel, "Remark");
+        remarkButton.setToolTipText("Set the current transform as the target");
 
-        Return();
+        oe.ctrlPanel.add(commandsPanel);
+        oe.ctrlPanel.Return();
 
-    normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
-    Return();
+    pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
+    normalpushField = (cNumberSlider)pushPanel.getComponent(1);
+    //Return();
+
+        oe.ctrlPanel.Return();
             
 //	oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
 //        ObjEditor.aConstraints.gridx += 1;
@@ -1085,7 +1126,7 @@
         oe.aConstraints.gridwidth = 1;
         /**/
         nameField = AddText(oe.ctrlPanel, copy.GetName());
-        Return();
+        oe.ctrlPanel.Return();
 
         //ctrlPanel.add(textureButton = new Button("Texture..."));
         //textureButton.setEnabled(false);
@@ -1187,7 +1228,8 @@
         //JPanel worldPanel =
         //		new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true);
         //worldPanel.setName("World");
-	centralPanel = new JPanel(new BorderLayout());
+	centralPanel = new cGridBag();
+        centralPanel.preferredWidth = 20;
 	timelinePanel = new JPanel(new BorderLayout());
         timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
 
@@ -1217,12 +1259,13 @@
         //frontView.object = copy;
         //sideView.object = copy;
 
-        XYZPanel = new JPanel();
-        XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
+        XYZPanel = new cGridBag().setVertical(true);
+        //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
 
-        XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll);
-        XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll);
-        XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll);
+        XYZPanel.preferredWidth = 5;
+        XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
+        XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
+        XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
 
         /*
         gridPanel = new JPanel(); //new BorderLayout());
@@ -1260,10 +1303,11 @@
         //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
         //tmp.setName("Edit");
         objectPanel.add(materialPanel);
-        JPanel north = new JPanel(new BorderLayout());
-        north.setName("Edit");
-        north.add(ctrlPanel, BorderLayout.NORTH);
-        objectPanel.add(north);
+//        JPanel north = new JPanel(new BorderLayout());
+//        north.setName("Edit");
+//        north.add(ctrlPanel, BorderLayout.NORTH);
+//        objectPanel.add(north);
+        objectPanel.add(ctrlPanel);
         objectPanel.add(infoPanel);
 
         /*
@@ -1284,16 +1328,23 @@
         scrollpane.setWheelScrollingEnabled(true);
         scrollpane.addMouseWheelListener(this); // Default not fast enough
 
-        /*JTabbedPane*/ scenePanel = new JTabbedPane();
-        scenePanel.add(scrollpane);
+        /*JTabbedPane*/ scenePanel = new cGridBag();
+        scenePanel.preferredWidth = 7;
+        
+        JTabbedPane tabbedPane = new JTabbedPane();
+        tabbedPane.add(scrollpane);
 
-        scenePanel.add(FSPane = new cFileSystemPane(this));
+        tabbedPane.add(FSPane = new cFileSystemPane(this));
 
-        optionsPanel = new JPanel(new GridBagLayout());
+        optionsPanel = new cGridBag().setVertical(true);
 
         optionsPanel.setName("Options");
-        scenePanel.add(optionsPanel);
-
+        
+        AddOptions(optionsPanel); //, aConstraints);
+        
+        tabbedPane.add(optionsPanel);
+        
+        scenePanel.add(tabbedPane);
 
         /*
         cTree jTree = new cTree(null);
@@ -1327,6 +1378,7 @@
         //bigPanel.setSize(new Dimension(10,10));
         //bigPanel.add(ctrlPanel);
         //bigPanel.add(gridPanel);
+        /**
         bigThree = new JPanel();
         //big.setLayout(new FlowLayout(FlowLayout.LEFT));
         bigThree.setLayout(new GridBagLayout()); //1,3,5,5));
@@ -1350,7 +1402,13 @@
         //	aConstraints.gridheight = 3;
         aWindowConstraints.fill = GridBagConstraints.VERTICAL;
         bigThree.add(XYZPanel, aWindowConstraints);
+        /**/
 
+        bigThree = new cGridBag();
+        bigThree.addComponent(scenePanel);
+        bigThree.addComponent(centralPanel);
+        bigThree.addComponent(XYZPanel);
+        
 //                // SIDE EFFECT!!!
 //		aConstraints.gridx = 0;
 //		aConstraints.gridy = 0;
@@ -1393,6 +1451,10 @@
         });
     }
 
+    void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
+    {
+    }
+    
     JTree GetTree()
     {
         return objEditor.jTree;
@@ -1404,260 +1466,173 @@
         ctrlPanel.removeAll();
     }
 
-    void SetupMaterial(JPanel ctrlPanel)
+    void SetupMaterial(cGridBag panel)
     {
-        aConstraints.weighty = 0;
-        //aConstraints.weightx = 1;
-                /*
+         /*
         ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
         materialLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
          */
 
-        aConstraints.gridwidth = 1;
-        ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints);
-        aConstraints.gridx += 1;
-        aConstraints.weighty = 0;
-        aConstraints.gridwidth = 1;
+        cGridBag editBar = new cGridBag().setVertical(false);
+            
+        editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
+                createMaterialButton.setToolTipText("Create material");
 
         /*
         ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
-        aConstraints.gridx += 1;
-        aConstraints.weighty = 0;
-        aConstraints.gridwidth = 1;
          */
 
-        ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints);
-        aConstraints.gridx += 1;
+        editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
+                clearMaterialButton.setToolTipText("Clear material");
+        
+        if (Globals.ADVANCED)
+        {
+                editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
+                editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
+                editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
+        }
 
-        ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints);
-
-        aConstraints.gridx += 1;
-
-        ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints);
-
-        aConstraints.gridx += 1;
-
-        ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints);
-
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.weighty = 0;
-        aConstraints.gridwidth = 1;
+        editBar.preferredHeight = 15;
+        
+        panel.add(editBar);
+        
         /**/
         //aConstraints.weighty = 0;
         ////aConstraints.weightx = 1;
         //aConstraints.weighty = 1;
         aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
         //aConstraints.gridx += 1;
-        ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
-        aConstraints.weighty = 0;
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
 
-        ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints);
-        colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        //aConstraints.weightx = 0;
-        ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag colorSection = new cGridBag().setVertical(true);
+        
+        cGridBag color = new cGridBag();
+                color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
+                colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        //colorField.preferredWidth = 200;
+        colorSection.add(color);
 
-        ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints);
-        modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag modulation = new cGridBag();
+                modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints);
+                modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        colorSection.add(modulation);
 
-        ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints);
-        textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag texture = new cGridBag();
+                texture.add(textureLabel = new JLabel("Texture")); // , aConstraints);
+                textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        colorSection.add(texture);
 
-        ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints);
-        anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag anisoU = new cGridBag();
+                anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
+                anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        colorSection.add(anisoU);
 
-        ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints);
-        anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag anisoV = new cGridBag();
+                anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
+                anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        colorSection.add(anisoV);
 
-        ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints);
-        shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag shadowbias = new cGridBag();
+                shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
+                shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        colorSection.add(shadowbias);
 
-        //aConstraints.weighty = 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
-        //aConstraints.gridx += 1;
-        ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
-        aConstraints.weighty = 0;
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        panel.add(new JSeparator());
+        
+        panel.add(colorSection);
+        
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
+        
+        cGridBag diffuseSection = new cGridBag().setVertical(true);
+        
+        cGridBag diffuse = new cGridBag();
+                diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
+                diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(diffuse);
 
-        ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints);
-        diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag diffuseness = new cGridBag();
+                diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints);
+                diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(diffuseness);
 
-        ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints);
-        diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag selfshadow = new cGridBag();
+                selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints);
+                selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(selfshadow);
 
-        ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints);
-        selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag sheen = new cGridBag();
+                sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints);
+                sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(sheen);
 
-        ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints);
-        sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag subsurface = new cGridBag();
+                subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints);
+                subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        diffuseSection.add(subsurface);
 
-        ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints);
-        subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag shadow = new cGridBag();
+                shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints);
+                shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(shadow);
 
-        ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints);
-        shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag fakedepth = new cGridBag();
+                fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints);
+                fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        diffuseSection.add(fakedepth);
 
-        ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints);
-        fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        panel.add(new JSeparator());
+        
+        panel.add(diffuseSection);
+        
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
+        
+        cGridBag specularSection = new cGridBag().setVertical(true);
 
-        //aConstraints.weighty = 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
-        //aConstraints.gridx += 1;
-        ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
-        aConstraints.weighty = 0;
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag specular = new cGridBag();
+                specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
+                specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        specularSection.add(specular);
 
-        ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints);
-        specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag lightarea = new cGridBag();
+                lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints);
+                lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        specularSection.add(lightarea);
 
-        ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints);
-        lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag shininess = new cGridBag();
+                shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints);
+                shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        specularSection.add(shininess);
 
-        ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints);
-        shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag metalness = new cGridBag();
+                metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints);
+                metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        specularSection.add(metalness);
 
-        ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints);
-        metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag velvet = new cGridBag();
+                velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints);
+                velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        specularSection.add(velvet);
 
-        ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints);
-        velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
-
-        shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1);
-        Return();
+        shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
+        //Return();
 //		ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
 //		shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
 //		aConstraints.fill = GridBagConstraints.HORIZONTAL;
@@ -1668,130 +1643,93 @@
 //		aConstraints.gridy += 1;
 //		aConstraints.gridwidth = 1;
 
-        //aConstraints.weighty = 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
-        //aConstraints.gridx += 1;
-        ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
-        aConstraints.weighty = 0;
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
 
-        ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints);
-        cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        panel.add(new JSeparator());
+        
+        panel.add(specularSection);
+        
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
+        
+        cGridBag globalSection = new cGridBag().setVertical(true);
 
-        ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints);
-        ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag camera = new cGridBag();
+                camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
+                cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        globalSection.add(camera);
 
-        ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints);
-        backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag ambient = new cGridBag();
+                ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
+                ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        globalSection.add(ambient);
 
-        ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints);
-        opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
-        aConstraints.weighty = 0;
+        cGridBag backlit = new cGridBag();
+                backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
+                backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
+        globalSection.add(backlit);
 
-        ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints);
-        bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag opacity = new cGridBag();
+                opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
+                opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
+        globalSection.add(opacity);
 
-        ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints);
-        noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        panel.add(new JSeparator());
+        
+        panel.add(globalSection);
+        
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
+        
+        cGridBag textureSection = new cGridBag().setVertical(true);
 
-        ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints);
-        powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag bump = new cGridBag();
+                bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
+                bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
+        textureSection.add(bump);
 
-        ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints);
-        borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag noise = new cGridBag();
+                noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints);
+                noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints);
+        textureSection.add(noise);
 
-        ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints);
-        fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag power = new cGridBag();
+                power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints);
+                powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints);
+        textureSection.add(power);
 
-        ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints);
-        opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-        aConstraints.fill = GridBagConstraints.HORIZONTAL;
-        aConstraints.gridx += 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
-        ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints);
-        aConstraints.gridx = 0;
-        aConstraints.gridy += 1;
-        aConstraints.gridwidth = 1;
+        cGridBag borderfade = new cGridBag();
+                borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints);
+                borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
+        textureSection.add(borderfade);
 
-        //aConstraints.weighty = 1;
-        aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
-        //aConstraints.gridx += 1;
-        ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
-        aConstraints.weighty = 0;
+        cGridBag fog = new cGridBag();
+                fog.add(fogLabel = new JLabel("Punch")); // , aConstraints);
+                fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints);
+        textureSection.add(fog);
 
-        aConstraints.gridx = 0;
-        aConstraints.gridy = 0;
-        aConstraints.gridwidth = 1;
+        cGridBag opacityPower = new cGridBag();
+                opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints);
+                opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
+                opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
+        textureSection.add(opacityPower);
+
+        panel.add(new JSeparator());
+        
+        panel.add(textureSection);
+        
+        //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
 
         SetMaterial(copy); // .GetMaterial());
 
-        colorField.addChangeListener(this);
-        modulationField.addChangeListener(this);
+        //colorField.addChangeListener(this);
+//        modulationField.addChangeListener(this);
         metalnessField.addChangeListener(this);
         diffuseField.addChangeListener(this);
         specularField.addChangeListener(this);
@@ -1821,12 +1759,15 @@
         opacityPowerField.addChangeListener(this);
         /**/
 
-        resetSlidersButton.addActionListener(this);
         clearMaterialButton.addActionListener(this);
         createMaterialButton.addActionListener(this);
-
-        propagateToggle.addItemListener(this);
-        multiplyToggle.addItemListener(this);
+        
+        if (Globals.ADVANCED)
+        {
+                resetSlidersButton.addActionListener(this);
+                propagateToggle.addItemListener(this);
+                multiplyToggle.addItemListener(this);
+        }
     }
 
     void DropFile(java.io.File[] files, boolean textures)
@@ -2603,6 +2544,7 @@
                 }
                 if (input == null)
                 {
+                new Exception().printStackTrace();
                     System.exit(0);
                 }
 
@@ -2817,7 +2759,8 @@
             return;
         }
 
-        multiplyToggle.setSelected(mat.multiply);
+        if (multiplyToggle != null)
+                multiplyToggle.setSelected(mat.multiply);
 
         assert (object.projectedVertices != null);
 
@@ -3032,7 +2975,7 @@
             frame.validate();
 
             return;
-        } else if (event.getSource() == toggleRandomItem)
+        } else if (event.getSource() == toggleSwitchItem)
         {
             cameraView.ToggleRandom();
             cameraView.repaint();
@@ -3077,6 +3020,7 @@
         if (event.getSource() == randomCB)
         {
             copy.random ^= true;
+            objEditor.refreshContents();
             return;
         }
         if (event.getSource() == speedupCB)
@@ -3139,7 +3083,8 @@
             objEditor.refreshContents();
         } else if (event.getSource() == stepItem)
         {
-            cameraView.ONESTEP = true;
+            //cameraView.ONESTEP = true;
+            Globals.ONESTEP = true;
             cameraView.repaint();
             return;
         } else if (event.getSource() == stepButton)
@@ -3296,25 +3241,25 @@
 
     void ToggleAnimation()
     {
-        if (!CameraPane.ANIMATION)
+        if (!Globals.ANIMATION)
         {
             FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
-            browser.show();
+            browser.setVisible(true);
             String filename = browser.getFile();
             if (filename != null && filename.length() > 0)
             {
-                CameraPane.filename = browser.getDirectory() + filename;
+                Globals.filename = browser.getDirectory() + filename;
                 //CameraPane.framecount = 0;
-                CameraPane.imagecount = 0;
+                Globals.imagecount = 0;
 
-                CameraPane.ANIMATION ^= true;
+                Globals.ANIMATION ^= true;
 
                 GrafreeD.wav.cursor = 0;
                 GrafreeD.wav.loop = 0;
             }
         } else
         {
-            CameraPane.ANIMATION ^= true;
+            Globals.ANIMATION ^= true;
         }
     }
 
@@ -3331,6 +3276,7 @@
             callee.refreshContents();
         } else
         {
+                new Exception().printStackTrace();
             System.exit(0);
         }
     }
@@ -3360,7 +3306,7 @@
     void CreateMaterial()
     {
         //copy.ClearMaterial(); // PATCH
-        copy.CreateMaterialS(multiplyToggle.isSelected());
+        copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
         if (copy.selection.size() > 0)
         //SetMaterial(copy);
         {
@@ -3419,11 +3365,11 @@
     {
         copy.ResetBlockLoop(); // temporary problem
 
-        boolean random = CameraPane.RANDOM;
-        CameraPane.RANDOM = false; // parse everything
+        boolean random = CameraPane.SWITCH;
+        CameraPane.SWITCH = false; // parse everything
         copy.ResetDisplayList();
         copy.HardTouch();
-        CameraPane.RANDOM = random;
+        CameraPane.SWITCH = random;
     }
 
 //	public void applySelf()
@@ -3493,7 +3439,7 @@
             current.fakedepth = (float) fakedepthField.getFloat();
             current.shadowbias = (float) shadowbiasField.getFloat();
 
-            if (!NumberSlider.frozen)
+            if (!cNumberSlider.frozen)
             {
                 //System.out.println("Propagate = " + propagate);
                 copy.UpdateMaterial(anchor, current, propagate);
@@ -3541,6 +3487,7 @@
                 || e.getSource() == apertureField
                 || e.getSource() == shadowblurField)
         {
+                new Exception().printStackTrace();
             System.exit(0);
             cameraView.options1[0] = (float) focusField.getFloat() * 10;
             cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
@@ -3866,7 +3813,7 @@
 
             radioPanel.revalidate();
             radioPanel.repaint();
-            ctrlPanel.revalidate(); // ? new
+            ctrlPanel.validate(); // ? new
             ctrlPanel.repaint();
         }
     }
@@ -4512,8 +4459,8 @@
     //MenuItem normalLensItem;
     MenuItem editCameraItem;
     MenuItem revertCameraItem;
-    CheckboxMenuItem toggleLiveItem;
     MenuItem stepItem;
+    CheckboxMenuItem toggleLiveItem;
     CheckboxMenuItem toggleFullScreenItem;
     CheckboxMenuItem toggleTimelineItem;
     CheckboxMenuItem toggleRenderItem;
@@ -4522,7 +4469,7 @@
     CheckboxMenuItem toggleFootContactItem;
     CheckboxMenuItem toggleDLItem;
     CheckboxMenuItem toggleTextureItem;
-    CheckboxMenuItem toggleRandomItem;
+    CheckboxMenuItem toggleSwitchItem;
     CheckboxMenuItem toggleRootItem;
     CheckboxMenuItem animationItem;
     CheckboxMenuItem toggleHandleItem;
@@ -4530,20 +4477,20 @@
     JSplitPane mainPanel;
     JScrollPane scrollpane;
     JPanel toolbarPanel;
-    JPanel treePanel;
+    cGridBag treePanel;
     JPanel radioPanel;
     ButtonGroup buttonGroup;
-    JPanel ctrlPanel;
-    JPanel materialPanel;
+    cGridBag ctrlPanel;
+    cGridBag materialPanel;
     JScrollPane infoPanel;
-    JPanel optionsPanel;
+    cGridBag optionsPanel;
     JTabbedPane objectPanel;
-    JPanel XYZPanel;
+    cGridBag XYZPanel;
     JSplitPane gridPanel;
     JSplitPane bigPanel;
-    JPanel bigThree;
-    JTabbedPane scenePanel;
-    JPanel centralPanel;
+    cGridBag bigThree;
+    cGridBag scenePanel;
+    cGridBag centralPanel;
     JSplitPane cameraPanel;
     JPanel timelinePanel;
     JMenuBar timelineMenubar;
@@ -4596,67 +4543,67 @@
     // MATERIAL
     JLabel materialLabel;
     JLabel colorLabel;
-    NumberSlider colorField;
+    cNumberSlider colorField;
     JLabel modulationLabel;
-    NumberSlider modulationField;
+    cNumberSlider modulationField;
     JLabel metalnessLabel;
-    NumberSlider metalnessField;
+    cNumberSlider metalnessField;
     JLabel diffuseLabel;
-    NumberSlider diffuseField;
+    cNumberSlider diffuseField;
     JLabel specularLabel;
-    NumberSlider specularField;
+    cNumberSlider specularField;
     JLabel shininessLabel;
-    NumberSlider shininessField;
+    cNumberSlider shininessField;
     JLabel shiftLabel;
-    NumberSlider shiftField;
+    cNumberSlider shiftField;
     JLabel ambientLabel;
-    NumberSlider ambientField;
+    cNumberSlider ambientField;
     JLabel lightareaLabel;
-    NumberSlider lightareaField;
+    cNumberSlider lightareaField;
     JLabel diffusenessLabel;
-    NumberSlider diffusenessField;
+    cNumberSlider diffusenessField;
     JLabel velvetLabel;
-    NumberSlider velvetField;
+    cNumberSlider velvetField;
     JLabel sheenLabel;
-    NumberSlider sheenField;
+    cNumberSlider sheenField;
     JLabel subsurfaceLabel;
-    NumberSlider subsurfaceField;
+    cNumberSlider subsurfaceField;
     //JLabel bumpLabel;
     //NumberSlider bumpField;
     JLabel backlitLabel;
-    NumberSlider backlitField;
+    cNumberSlider backlitField;
     JLabel anisoLabel;
-    NumberSlider anisoField;
+    cNumberSlider anisoField;
     JLabel anisoVLabel;
-    NumberSlider anisoVField;
+    cNumberSlider anisoVField;
     JLabel cameraLabel;
-    NumberSlider cameraField;
+    cNumberSlider cameraField;
     JLabel selfshadowLabel;
-    NumberSlider selfshadowField;
+    cNumberSlider selfshadowField;
     JLabel shadowLabel;
-    NumberSlider shadowField;
+    cNumberSlider shadowField;
     JLabel textureLabel;
-    NumberSlider textureField;
+    cNumberSlider textureField;
     JLabel opacityLabel;
-    NumberSlider opacityField;
+    cNumberSlider opacityField;
     JLabel fakedepthLabel;
-    NumberSlider fakedepthField;
+    cNumberSlider fakedepthField;
     JLabel shadowbiasLabel;
-    NumberSlider shadowbiasField;
+    cNumberSlider shadowbiasField;
     JLabel bumpLabel;
-    NumberSlider bumpField;
+    cNumberSlider bumpField;
     JLabel noiseLabel;
-    NumberSlider noiseField;
+    cNumberSlider noiseField;
     JLabel powerLabel;
-    NumberSlider powerField;
+    cNumberSlider powerField;
     JLabel borderfadeLabel;
-    NumberSlider borderfadeField;
+    cNumberSlider borderfadeField;
     JLabel fogLabel;
-    NumberSlider fogField;
+    cNumberSlider fogField;
     JLabel opacityPowerLabel;
-    NumberSlider opacityPowerField;
+    cNumberSlider opacityPowerField;
     JTree jTree;
     //ObjectUI parent;
     
-    NumberSlider normalpushField;
+    cNumberSlider normalpushField;
 }

--
Gitblit v1.6.2