Index: config.json
===================================================================
--- config.json	(revision 136)
+++ config.json	(revision 146)
@@ -5,7 +5,26 @@
   [
     {
-      "path" : "../qooxdoo-0.8.3-sdk/tool/data/config/application.json",
-      "as"   : "appconf"
+      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
     }
+  ],
+
+  "export" :
+  [
+    "api",
+    "build",
+    "clean",
+    "distclean",
+    "fix",
+    "info",
+    "inspector",
+    "lint",
+    "migration",
+    "pretty",
+    "profiling",
+    "source",
+    "source-all",
+    "test",
+    "test-source",
+    "translation"
   ],
 
@@ -13,11 +32,11 @@
   {
     "APPLICATION"  : "pf",
-    "QOOXDOO_PATH" : "../qooxdoo-0.8.3-sdk",
-    "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
-    "QXTHEME"      : "qx.theme.Modern",
+    "QOOXDOO_PATH" : "../qooxdoo-1.0-sdk",
+    "QXTHEME"      : "pf.theme.Theme",
+    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"],
     "LOCALES"      : [ "en" ],
+    "CACHE"        : "${TMPDIR}/cache_new",
     "ROOT"         : ".",
-    "APPLICATION_FILES" : "index.html pf.html sprintf.js wz_jsgraphics.js
-                           entities.js",
+    "APPLICATION_FILES" : "index.html pf.html wz_jsgraphics.js entities.js",
     "APPLICATION_RESOURCE_FILTER" : true,
     "APPLICATION_COMPLETE_SOURCE" : false
@@ -26,27 +45,11 @@
   "jobs" :
   {
-    "api" :
-    {
-      "extend" : ["appconf::api"]
-    },
-
     "build" :
     {
-      "extend" : ["appconf::build"],
 
-      "settings" :
-      {
-        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale"
-      },
-      
-      "require" :
-      {
-        "pf.Application" : [ "qx.legacy.theme.ClassicRoyale" ]
-      },
-      
       "copy-files" :
       {
         "target" : "${BUILD_PATH}",
-        "files"  : ["index.html", "pf.html", "wz_jsgraphics.js", "entities.js"]
+        "files"  : ["pf.html", "wz_jsgraphics.js", "entities.js"]
       },
       
@@ -56,70 +59,5 @@
         "resource-filter" : true
       } 
-    },
-
-    "clean" :
-    {
-      "extend" : ["appconf::clean"]
-    },
-
-    "distclean" :
-    {
-      "extend" : ["appconf::distclean"]
-    },
-
-    "fix" :
-    {
-      "extend" : ["appconf::fix"]
-    },
-
-    "lint" :
-    {
-      "extend" : ["appconf::lint"]
-    },
-
-    "migration" :
-    {
-      "extend" : ["appconf::migration"]
-    },
-
-    "pretty" :
-    {
-      "extend" : ["appconf::pretty"]
-    },
-
-    "publish" :
-    {
-      "extend" : ["appconf::publish"]
-    },
-
-    "source" :
-    {
-      "extend" : ["appconf::source"],
-
-      "settings" :
-      {
-        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale"
-      },
-      "require" :
-      {
-        "pf.Application" : [ "qx.legacy.theme.ClassicRoyale" ]
-      }
-    },
-
-    "test" :
-    {
-      "extend" : ["appconf::test"]
-    },
-
-    "test-source" :
-    {
-      "extend" : ["appconf::test-source"]
-    },
-
-    "translate" :
-    {
-      "extend" : ["appconf::translate"]
     }
-
   }
 }
Index: source/class/pf/Application.js
===================================================================
--- source/class/pf/Application.js	(revision 144)
+++ source/class/pf/Application.js	(revision 146)
@@ -10,5 +10,4 @@
 
 /* ************************************************************************
-
 
 #asset(pf/image/*.png)
@@ -170,6 +169,6 @@
     } else {
         var tree = this.entity_tree;
-        var leaf = tree.getSelectedElement();
-        if (leaf && leaf.classname == "qx.legacy.ui.tree.TreeFile" && explorer_is_seen) {
+        var leaf = getSingleTreeSelectedItem(tree);
+        if (leaf && leaf.classname == "qx.ui.tree.TreeFile" && explorer_is_seen) {
             this.loadWikiButton.setEnabled(true);
         } else {
@@ -190,7 +189,7 @@
 
     var tree = this.entity_tree;
-    var leaf = tree.getSelectedElement();
-
-    if (leaf && leaf.classname == "qx.legacy.ui.tree.TreeFile" && explorer_is_seen) {
+    var leaf = getSingleTreeSelectedItem(tree);
+
+    if (leaf && leaf.classname == "qx.ui.tree.TreeFile" && explorer_is_seen) {
         if (this.isFavorite(leaf)) {
             this.editMenuButtonAddToFav.setEnabled(false);
@@ -206,4 +205,14 @@
 }
 
+function getSingleTreeSelectedItem(tree)
+{
+    var sels = tree.getSelection();
+    if (sels && sels.length == 1) {
+        return sels[0];
+    } else {
+        return null;
+    }
+}
+
 function treeMenuCB(ev)
 {
@@ -214,8 +223,14 @@
             menu.hide();
         } else {
-            var leaf = ev.getTarget();
-            var el = leaf.getElement();
-            
-            if (leaf.classname == "qx.legacy.ui.tree.TreeFile") {
+            var w = ev.getTarget();
+            var leaf = null;
+            if (w.classname == "qx.ui.tree.TreeFile") {
+                leaf = w;
+            } else
+            if (w.getLayoutParent().classname == "qx.ui.tree.TreeFile") {
+                leaf = w.getLayoutParent();
+            }
+            
+            if (leaf) {
                 if (this.isFavorite(leaf)) {
                     this.treeMenuButtonAddToFav.setEnabled(false);
@@ -230,12 +245,10 @@
             }
             
-            // position the menu
-            menu.setLeft(ev.getClientX());
-            menu.setTop(ev.getClientY());
-
+            // position & show the menu
+            menu.placeToMouse(ev);
             menu.show();
         };
 
-        ev.stopPropagation();
+        // ev.stopPropagation();
     }
 }
@@ -286,5 +299,5 @@
 {
     var tree = this.entity_tree;
-    var leaf = tree.getSelectedElement();
+    var leaf = getSingleTreeSelectedItem(tree);
 
     if (!leaf) {
@@ -311,5 +324,5 @@
 {
     var tree = this.entity_tree;
-    var leaf = tree.getSelectedElement();
+    var leaf = getSingleTreeSelectedItem(tree);
 
     if (!leaf) {
@@ -339,8 +352,9 @@
 function clickTreeCB(ev)
 {
-    var e = ev.getTarget();
-    if (e.isSelected()) {
+    var tree = ev.getTarget();
+    var e = getSingleTreeSelectedItem(tree);
+    if (e) {
         var entity = e.getUserData("entity");
-
+        
         if (entity) {
             this.gui_entity_units.update(entity.dimension,
@@ -364,6 +378,5 @@
 qx.Class.define("pf.Application",
 {
-    extend : qx.application.Inline,
-    include : [qx.legacy.application.MGuiCompat],
+    extend : qx.application.Standalone,
 
     /*
@@ -410,5 +423,5 @@
             this.gui_T_r.setNumValue(this.plasma.r.getT());
             this.gui_Z_r.setValue(this.plasma.r.getQ());
-            this.gui_Zcore.setValue(this.plasma.r.getQ() + 1);
+            this.gui_Zcore.setValue((this.plasma.r.getQ() + 1) + '');
             this.gui_M_r.setValue(this.plasma.r.getM());
             
@@ -469,5 +482,5 @@
         {
             var tree = this.entity_tree;
-            var leaf = tree.getSelectedElement();
+            var leaf = getSingleTreeSelectedItem(tree);
             
             if (!leaf) {
@@ -481,5 +494,5 @@
             if (entity) {
                 var v     = this.evaluateEntityValue(entity, species);
-                var scale = this.gui_entity_units.getSelected().getValue();
+                var scale = this.gui_entity_units.getSelectedValue();
                 
                 name    = this.getEntityFullName(entity, species);
@@ -496,10 +509,14 @@
             this.gui_entity_section.setValue(section);
 
-            this.gui_entity_value.setNumValue(value);
+            if (isFinite(value)) {
+                this.gui_entity_value.setNumValue(value);
+            } else {
+                this.gui_entity_value.setValue("");
+            }
             
             if (this.prefs.autoLoadWiki) {
                 this.showWikiPage(entity);
             } else {
-                this.gui_wiki.setSource(null);
+                this.showWikiPage(null);
             }
         },
@@ -597,6 +614,6 @@
                         var icon = "pf/image/" + s.id + "_small.png";
 
-                        leaf = new qx.legacy.ui.tree.TreeFile(entity.name, icon);
-                        leaf.addListener("changeSelected", clickTreeCB, this);
+                        leaf = new qx.ui.tree.TreeFile(entity.name);
+                        leaf.setIcon(icon);
                         leaf.addListener("contextmenu", treeMenuCB, this);
                         leaf.setUserData("entity", entity);
@@ -611,7 +628,6 @@
                     break;
                 default:
-                    leaf = new qx.legacy.ui.tree.TreeFile(entity.name,
-                        "pf/image/all_small.png");
-                    leaf.addListener("changeSelected", clickTreeCB, this);
+                    leaf = new qx.ui.tree.TreeFile(entity.name);
+                    leaf.setIcon("pf/image/all_small.png");
                     leaf.addListener("contextmenu", treeMenuCB, this);
                     leaf.setUserData("entity", entity);
@@ -661,10 +677,11 @@
         {
             var lv = this.favoritesListView;
-            var rowData = lv.getData();
-            rowData.length = 0;
+            var tm = lv.getTableModel();
             
             var dimension = this.gui_compare_dim.getSelectedValue();
             
             var scale = this.gui_compare_units.getSelectedValue();
+            
+            var rowData = new Array();
             
             for (var i = 0; i < this.favorites.length; i++) {
@@ -687,15 +704,15 @@
                 var value = scale*this.evaluateEntityValue(entity, species);
 
-                rowData.push({ s_icon  : {icon       : icon,
-                                          iconWidth  : 16, 
-                                          iconHeight : 16             },
-                               name    : {text       : name           },
-                               section : {text       : entity.section },
-                               value   : {text       : pf.util.Format.numPrint(value)}
-                             });
-            }
-            
-            lv.updateSort();
-            lv.update();
+                rowData.push([icon, name, entity.section,
+                    pf.util.Format.numPrint(value)]);
+            }
+            
+            tm.setData(rowData, false);
+            var sidx = tm.getSortColumnIndex();
+            tm.sortByColumn(sidx, tm.isSortAscending());
+            
+            lv.updateContent();
+            // lv.updateSort();
+            // lv.update();
         },
 
@@ -703,6 +720,7 @@
         {
             var lv = this.legendListView;
-            var rowData = lv.getData();
-            rowData.length = 0;
+            var tm = lv.getTableModel();
+
+            var rowData = new Array();
             
             var dimension = this.gui_compare_dim.getSelectedValue();
@@ -727,14 +745,10 @@
                 var color = fav.color;
 
-                rowData.push({ s_icon   : {icon       : icon,
-                                           iconWidth  : 16, 
-                                           iconHeight : 16    },
-                               name     : {text       : name  },
-                               color    : {text       : color,
-                                           textColor  : color },
-                               favorite : fav
-                             });
-            }
-            lv.update();
+                rowData.push({"icon": icon, "name": name, "color": color,
+                    "favorite": fav});
+            }
+            
+            tm.setDataAsMapArray(rowData);
+            // lv.updateContent();
         },
 
@@ -742,16 +756,12 @@
         renderTabPage : function(label, icon, checked)
         {
-            var tab_id, page_id;
-            
-            tab_id = new qx.legacy.ui.pageview.tabview.Button(label, icon);
-            this.tabbar.add(tab_id);
-            page_id = new qx.legacy.ui.pageview.tabview.Page(tab_id);
-            page_id.setHeight("100%");
-            page_id.setPadding(10, 10, 10, 10);
-            page_id.setBackgroundColor("white");
-            this.tabpane.add(page_id);
+            var page_id;
+            
+            page_id = new qx.ui.tabview.Page(label, icon);
+            page_id.setPadding(0, 0, 0, 0);
+            this.tabview.add(page_id);
 
             if (checked) {
-                tab_id.setChecked(true);
+                this.tabview.setSelection(page_id);
             }
             
@@ -761,61 +771,40 @@
         renderParametersTab : function()
         {
+            var fr, gl, rc, rc1, rc2;
+            
             var page_id = this.renderTabPage("Parameters",
                 "pf/image/tab-parameters.png", true);
-
-            var fr, gl, rc0, rc, rc1, rc2;
-
-            rc0 = new qx.legacy.ui.layout.VerticalBoxLayout;
-            rc0.setWidth("100%");
-            rc0.setHeight("auto");
-            rc0.setSpacing(1);
-            page_id.add(rc0);
-
-            fr = new qx.legacy.ui.groupbox.GroupBox("Configuration name",
+            page_id.setLayout(new qx.ui.layout.VBox(1));
+
+            fr = new qx.ui.groupbox.GroupBox("Configuration name",
                 "pf/image/info.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#e1eeff");
-            fr.getLegendObject().setBackgroundColor("#e1eeff");
+            fr.setLayout(new qx.ui.layout.VBox());
+
             this.gui_configName =
-                new qx.legacy.ui.basic.Atom(this.prefs.currentConfigName);
+                new qx.ui.basic.Atom(this.prefs.currentConfigName);
             fr.add(this.gui_configName);
-            rc0.add(fr);
-
-            rc = new qx.legacy.ui.layout.HorizontalBoxLayout;
-            rc.setWidth("100%");
-            rc.setHeight("auto");
-            rc.setSpacing(1);
-            rc0.add(rc);
-            
-            rc1 = new qx.legacy.ui.layout.VerticalBoxLayout;
-            rc1.setWidth("50%");
-            rc1.setHeight("auto");
-            rc1.setSpacing(2);
-            rc.add(rc1);
-            
-            rc2 = new qx.legacy.ui.layout.VerticalBoxLayout;
-            rc2.setWidth("50%");
-            rc2.setHeight("auto");
-            rc2.setSpacing(2);
-            rc.add(rc2);
-            
-            fr = new qx.legacy.ui.groupbox.GroupBox("Electrons",
+            page_id.add(fr);
+            
+
+            rc = new qx.ui.container.Composite(new qx.ui.layout.HBox(1));
+            page_id.add(rc);
+            
+            rc1 = new qx.ui.container.Composite(new qx.ui.layout.VBox(2));
+            rc.add(rc1, {flex : 1});
+            
+            rc2 = new qx.ui.container.Composite(new qx.ui.layout.VBox(2));
+            rc.add(rc2, {flex : 1});
+            
+            
+            fr = new qx.ui.groupbox.GroupBox("Electrons",
                 "pf/image/e_small.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#eeeeff");
-            fr.getLegendObject().setBackgroundColor("#eeeeff");
+            fr.setLayout(new qx.ui.layout.VBox());
 
             rc1.add(fr);
 
-            gl = new qx.legacy.ui.layout.GridLayout;
-            gl.setWidth("100%");
-            gl.setVerticalSpacing(4);
-            gl.setHorizontalSpacing(6);
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, "25%");
-            gl.setColumnWidth(1, "75%");
-            gl.setRowCount(2);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
+            var layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnWidth(0, 80);
+            layout.setColumnFlex(1, 1);
+            gl = new qx.ui.container.Composite(layout);
 
             fr.add(gl);
@@ -824,212 +813,187 @@
 
             // N_e
-            l = new qx.legacy.ui.basic.Label("N<sub>e</sub> (cm<sup>-3</sup>):");
-            gl.add(l, 0, 0);
+            l = new qx.ui.basic.Label("N<sub>e</sub> (cm<sup>-3</sup>):");
+            l.setRich(true);
+            gl.add(l, {row: 0, column: 0});
             e = new pf.ui.TextField(this.plasma.e.getN());
-            gl.add(e, 1, 0);
+            gl.add(e, {row: 0, column: 1});
             e.addListener("changeValue", changeN_e, this);
             this.gui_N_e = e;
 
             // T_e
-            l = new qx.legacy.ui.basic.Label("T<sub>e</sub> (eV):");
-            gl.add(l, 0, 1);
+            l = new qx.ui.basic.Label("T<sub>e</sub> (eV):");
+            l.setRich(true);
+            gl.add(l, {row: 1, column: 0});
             e = new pf.ui.TextField(this.plasma.e.getT());
-            gl.add(e, 1, 1);
+            gl.add(e, {row: 1, column: 1});
             e.addListener("changeValue", changeT_e, this);
             this.gui_T_e = e;
-
-
-            fr = new qx.legacy.ui.groupbox.GroupBox("Ions",
+            
+            fr = new qx.ui.groupbox.GroupBox("Ions",
                 "pf/image/i_small.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#ffeeee");
-            fr.getLegendObject().setBackgroundColor("#ffeeee");
+            fr.setLayout(new qx.ui.layout.VBox());
 
             rc1.add(fr);
 
-            gl = new qx.legacy.ui.layout.GridLayout;
-            gl.setWidth("100%");
-            gl.setVerticalSpacing(4);
-            gl.setHorizontalSpacing(6);
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, "25%");
-            gl.setColumnWidth(1, "75%");
-            gl.setRowCount(4);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
-            gl.setRowHeight(2, 30);
-            gl.setRowHeight(3, 30);
+            layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnWidth(0, 80);
+            layout.setColumnFlex(1, 1);
+            gl = new qx.ui.container.Composite(layout);
 
             fr.add(gl);
 
             // Z_i
-            l = new qx.legacy.ui.basic.Label("Z<sub>i</sub>:");
-            gl.add(l, 0, 0);
-            e = new pf.ui.Spinner(1, this.plasma.i.getQ(), 100);
-            gl.add(e, 1, 0);
-            e.addListener("change", changeZ_i, this);
+            l = new qx.ui.basic.Label("Z<sub>i</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 0, column: 0});
+            e = new qx.ui.form.Spinner(1, this.plasma.i.getQ(), 100);
+            gl.add(e, {row: 0, column: 1});
+            e.addListener("changeValue", changeZ_i, this);
             this.gui_Z_i = e;
             
             // M_i
-            l = new qx.legacy.ui.basic.Label("M<sub>i</sub>:");
-            gl.add(l, 0, 1);
-            e = new pf.ui.Spinner(1, this.plasma.i.getM(), 200);
-            gl.add(e, 1, 1);
-            e.addListener("change", changeM_i, this);
+            l = new qx.ui.basic.Label("M<sub>i</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 1, column: 0});
+            e = new qx.ui.form.Spinner(1, this.plasma.i.getM(), 200);
+            gl.add(e, {row: 1, column: 1});
+            e.addListener("changeValue", changeM_i, this);
             this.gui_M_i = e;
             
             // T_i
-            l = new qx.legacy.ui.basic.Label("T<sub>i</sub> (eV):");
-            gl.add(l, 0, 2);
+            l = new qx.ui.basic.Label("T<sub>i</sub> (eV):");
+            l.setRich(true);
+            gl.add(l, {row: 2, column: 0});
             e = new pf.ui.TextField(this.plasma.i.getT());
-            gl.add(e, 1, 2);
+            gl.add(e, {row: 2, column: 1});
             e.addListener("changeValue", changeT_i, this);
             this.gui_T_i = e;
 
             // N_i
-            l = new qx.legacy.ui.basic.Label("N<sub>i</sub> (cm<sup>-3</sup>):");
-            gl.add(l, 0, 3);
+            l = new qx.ui.basic.Label("N<sub>i</sub> (cm<sup>-3</sup>):");
+            l.setRich(true);
+            gl.add(l, {row: 3, column: 0});
             e = new pf.ui.TextField(this.plasma.i.getN());
-            gl.add(e, 1, 3);
+            gl.add(e, {row: 3, column: 1});
             e.setReadOnly(true);
             this.gui_N_i = e;
             
-            
-            fr = new qx.legacy.ui.groupbox.GroupBox("Radiators",
+            fr = new qx.ui.groupbox.GroupBox("Radiators",
                 "pf/image/r_small.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#eeffee");
-            fr.getLegendObject().setBackgroundColor("#eeffee");
+            fr.setLayout(new qx.ui.layout.VBox());
 
             rc2.add(fr);
 
-            gl = new qx.legacy.ui.layout.GridLayout;
-            gl.setWidth("100%");
-            gl.setVerticalSpacing(4);
-            gl.setHorizontalSpacing(6);
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, "25%");
-            gl.setColumnWidth(1, "75%");
-            gl.setRowCount(5);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
-            gl.setRowHeight(2, 30);
-            gl.setRowHeight(3, 30);
-            gl.setRowHeight(4, 30);
+            layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnWidth(0, 80);
+            layout.setColumnFlex(1, 1);
+            gl = new qx.ui.container.Composite(layout);
 
             fr.add(gl);
 
-
             // Z_r
-            l = new qx.legacy.ui.basic.Label("Z<sub>r</sub>:");
-            gl.add(l, 0, 0);
-            e = new pf.ui.Spinner(0, this.plasma.r.getQ(), 100);
-            gl.add(e, 1, 0);
-            e.addListener("change", changeZ_r, this);
+            l = new qx.ui.basic.Label("Z<sub>r</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 0, column: 0});
+            e = new qx.ui.form.Spinner(0, this.plasma.r.getQ(), 100);
+            gl.add(e, {row: 0, column: 1});
+            e.addListener("changeValue", changeZ_r, this);
             this.gui_Z_r = e;
 
             // M_r
-            l = new qx.legacy.ui.basic.Label("M<sub>r</sub>:");
-            gl.add(l, 0, 1);
-            e = new pf.ui.Spinner(1, this.plasma.r.getM(), 200);
-            gl.add(e, 1, 1);
-            e.addListener("change", changeM_r, this);
+            l = new qx.ui.basic.Label("M<sub>r</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 1, column: 0});
+            e = new qx.ui.form.Spinner(1, this.plasma.r.getM(), 200);
+            gl.add(e, {row: 1, column: 1});
+            e.addListener("changeValue", changeM_r, this);
             this.gui_M_r = e;
 
             // T_r
-            l = new qx.legacy.ui.basic.Label("T<sub>r</sub> (eV):");
-            gl.add(l, 0, 2);
+            l = new qx.ui.basic.Label("T<sub>r</sub> (eV):");
+            l.setRich(true);
+            gl.add(l, {row: 2, column: 0});
             e = new pf.ui.TextField(this.plasma.r.getT());
-            gl.add(e, 1, 2);
+            gl.add(e, {row: 2, column: 1});
             e.addListener("changeValue", changeT_r, this);
             this.gui_T_r = e;
 
             // P_r
-            l = new qx.legacy.ui.basic.Label("P<sub>r</sub> (%):");
-            gl.add(l, 0, 3);
-            e = new pf.ui.Spinner(0, 100*this.plasma.P_r, 100);
-            gl.add(e, 1, 3);
-            e.addListener("change", changeP_r, this);
+            l = new qx.ui.basic.Label("P<sub>r</sub> (%):");
+            l.setRich(true);
+            gl.add(l, {row: 3, column: 0});
+            e = new qx.ui.form.Spinner(0, 100*this.plasma.P_r, 100);
+            gl.add(e, {row: 3, column: 1});
+            e.addListener("changeValue", changeP_r, this);
             this.gui_P_r = e;
 
             // N_r
-            l = new qx.legacy.ui.basic.Label("N<sub>r</sub> (cm<sup>-3</sup>):");
-            gl.add(l, 0, 4);
+            l = new qx.ui.basic.Label("N<sub>r</sub> (cm<sup>-3</sup>):");
+            l.setRich(true);
+            gl.add(l, {row: 4, column: 0});
             e = new pf.ui.TextField(this.plasma.r.getN());
             e.setReadOnly(true);
-            gl.add(e, 1, 4);
+            gl.add(e, {row: 4, column: 1});
             this.gui_N_r = e;
 
 
-            fr = new qx.legacy.ui.groupbox.GroupBox("Fields",
+            fr = new qx.ui.groupbox.GroupBox("Fields",
                 "pf/image/field_small.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#ffffdd");
-            fr.getLegendObject().setBackgroundColor("#ffffdd");
+            fr.setLayout(new qx.ui.layout.VBox());
 
             rc1.add(fr);
 
-            gl = new qx.legacy.ui.layout.GridLayout;
-            gl.setWidth("100%");
-            gl.setVerticalSpacing(4);
-            gl.setHorizontalSpacing(6);
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, "25%");
-            gl.setColumnWidth(1, "75%");
-            gl.setRowCount(1);
-            gl.setRowHeight(0, 30);
+            layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnWidth(0, 80);
+            layout.setColumnFlex(1, 1);
+            gl = new qx.ui.container.Composite(layout);
 
             fr.add(gl);
 
 
-            l = new qx.legacy.ui.basic.Label("B (T):");
-            gl.add(l, 0, 0);
+            l = new qx.ui.basic.Label("B (T):");
+            l.setRich(true);
+            gl.add(l, {row: 0, column: 0});
             e = new pf.ui.TextField(this.plasma.B);
-            gl.add(e, 1, 0);
+            gl.add(e, {row: 0, column: 1});
             e.addListener("changeValue", changeB, this);
             this.gui_B = e;
 
             // Atomic system frame
-            fr = new qx.legacy.ui.groupbox.GroupBox("Atomic system",
+            fr = new qx.ui.groupbox.GroupBox("Atomic system",
                 "pf/image/all_small.png");
-            fr.setDimension("100%", "auto");
-            fr.setBackgroundColor("#ffffdd");
-            fr.getLegendObject().setBackgroundColor("#ffffdd");
+            fr.setLayout(new qx.ui.layout.VBox());
 
             rc2.add(fr);
 
-            gl = new qx.legacy.ui.layout.GridLayout;
-            gl.setWidth("100%");
-            gl.setVerticalSpacing(4);
-            gl.setHorizontalSpacing(6);
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, "25%");
-            gl.setColumnWidth(1, "75%");
-            gl.setRowCount(3);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
-            gl.setRowHeight(2, 30);
+            layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnWidth(0, 80);
+            layout.setColumnFlex(1, 1);
+            gl = new qx.ui.container.Composite(layout);
 
             fr.add(gl);
 
-            l = new qx.legacy.ui.basic.Label("Z<sub>core</sub>:");
-            gl.add(l, 0, 0);
-            e = new qx.legacy.ui.form.TextField(this.plasma.r.getQ() + 1);
+            l = new qx.ui.basic.Label("Z<sub>core</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 0, column: 0});
+            e = new qx.ui.form.TextField((this.plasma.r.getQ() + 1) + '');
             e.setReadOnly(true);
-            gl.add(e, 1, 0);
+            gl.add(e, {row: 0, column: 1});
             this.gui_Zcore = e;
 
-            l = new qx.legacy.ui.basic.Label("n<sub>u</sub>:");
-            gl.add(l, 0, 1);
-            e = new pf.ui.Spinner(2, this.plasma.n_u, 1000);
-            gl.add(e, 1, 1);
-            e.addListener("change", changeN_u, this);
+            l = new qx.ui.basic.Label("n<sub>u</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 1, column: 0});
+            e = new qx.ui.form.Spinner(2, this.plasma.n_u, 1000);
+            gl.add(e, {row: 1, column: 1});
+            e.addListener("changeValue", changeN_u, this);
             this.gui_n_u = e;
 
-            l = new qx.legacy.ui.basic.Label("n<sub>l</sub>:");
-            gl.add(l, 0, 2);
-            e = new pf.ui.Spinner(1, this.plasma.n_l, 1000);
-            gl.add(e, 1, 2);
-            e.addListener("change", changeN_l, this);
+            l = new qx.ui.basic.Label("n<sub>l</sub>:");
+            l.setRich(true);
+            gl.add(l, {row: 2, column: 0});
+            e = new qx.ui.form.Spinner(1, this.plasma.n_l, 1000);
+            gl.add(e, {row: 2, column: 1});
+            e.addListener("changeValue", changeN_l, this);
             this.gui_n_l = e;
         },
@@ -1039,32 +1003,26 @@
             var page_id = this.renderTabPage("Explorer",
                 "pf/image/tab-explorer.png", false);
-            
-            var sp = new qx.legacy.ui.splitpane.HorizontalSplitPane(300, "1*");
-            sp.set(
-            {
-                left            : 1,
-                right           : 1,
-                top             : 1,
-                bottom          : 1,
-                border          : "inset-thin",
-                showKnob        : true
+            page_id.setLayout(new qx.ui.layout.VBox);
+
+            var sp = new qx.ui.splitpane.Pane("horizontal");
+            page_id.add(sp, {height: "100%"});
+            
+            // Create container with fixed dimensions for the left:
+            var left_pane = new qx.ui.container.Composite(new qx.ui.layout.Grow).set({
+              width: 250,
+              decorator : "main"
             });
-            page_id.add(sp);
-                        
-            var left_pane  = sp.getLeftArea();
-            left_pane.setBackgroundColor("white");
-            left_pane.setBorder("inset-thin");
-            var right_pane = sp.getRightArea();
-            right_pane.setBackgroundColor("white");
-            right_pane.setBorder("inset-thin");
-            var tree = new qx.legacy.ui.tree.Tree("Browser");
-            tree.set(
-            {
-                overflow        : "scroll",
-                height          : "100%",
-                width           : "100%",
-                paddingLeft     : 4,
-                paddingTop      : 4
+
+            // Create container for the right:
+            var right_pane = new qx.ui.container.Composite(new qx.ui.layout.VBox(4)).set({
+              padding : 4,
+              decorator : "main"
             });
+
+            sp.add(left_pane,  0, {flex: 1});
+            sp.add(right_pane, 1, {flex: 2});
+
+            
+            var tree = new qx.ui.tree.Tree("Browser");
             left_pane.add(tree);
             
@@ -1073,79 +1031,67 @@
             var folder;
             
-            folder = new qx.legacy.ui.tree.TreeFolder("Dimensionless");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            var root = new qx.ui.tree.TreeFolder("Root");
+            root.setOpen(true);
+            tree.setRoot(root);
+            tree.setHideRoot(true);
+            tree.setRootOpenClose(true);
+            tree.setOpenMode("none");
+
+            tree.addListener("changeSelection", clickTreeCB, this);
+            
+            folder = new qx.ui.tree.TreeFolder("Dimensionless");
+            root.add(folder);
             this.gui_folder_none = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Length");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Length");
+            root.add(folder);
             this.gui_folder_length = folder;
             
-            folder = new qx.legacy.ui.tree.TreeFolder("Frequency");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Frequency");
+            root.add(folder);
             this.gui_folder_freq = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Velocity");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Velocity");
+            root.add(folder);
             this.gui_folder_vel = folder;
             
-            folder = new qx.legacy.ui.tree.TreeFolder("Area");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Area");
+            root.add(folder);
             this.gui_folder_area = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Energy");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Energy");
+            root.add(folder);
             this.gui_folder_energy = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Pressure");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Pressure");
+            root.add(folder);
             this.gui_folder_pressure = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Power density");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Power density");
+            root.add(folder);
             this.gui_folder_power_density = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Power spectral density");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Power spectral density");
+            root.add(folder);
             this.gui_folder_spectral_power_density = folder;
 
-            folder = new qx.legacy.ui.tree.TreeFolder("Miscellaneous");
-            folder.setAlwaysShowPlusMinusSymbol(true);
-            folder.addListener("changeSelected", clickTreeCB, this);
-            tree.add(folder);
+            folder = new qx.ui.tree.TreeFolder("Miscellaneous");
+            root.add(folder);
             this.gui_folder_misc = folder;
 
+            
+
             this.populateTree();
 
-            tree.setHideNode(true);
-            tree.setRootOpenClose(true);
-            
             // Build context-sensitive popup menu
-            this.treeMenu = new qx.legacy.ui.menu.Menu;
+            this.treeMenu = new qx.ui.menu.Menu;
             var button;
             
-            button = new qx.legacy.ui.menu.Button("Add to Favorites",
+            button = new qx.ui.menu.Button("Add to Favorites",
                 "pf/image/favorite-add.png");
             button.addListener("execute", addToFavCB, this);
             this.treeMenu.add(button);
             this.treeMenuButtonAddToFav = button;
-            button = new qx.legacy.ui.menu.Button("Remove from Favorites",
+            button = new qx.ui.menu.Button("Remove from Favorites",
                 "pf/image/favorite-delete.png");
             button.addListener("execute", removeFromFavCB, this);
@@ -1156,68 +1102,46 @@
 
 
-            var vbl = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            vbl.set(
-            {
-                height          : "100%",
-                width           : "100%",
-                padding         : 4,
-                spacing         : 10
-            });
-            right_pane.add(vbl);
-
-            var gl = new qx.legacy.ui.layout.GridLayout;
-            gl.set(
-            {
-                height            : "auto",
-                left              : 4,
-                right             : 4,
-                top               : 4,
-                verticalSpacing   : 4,
-                horizontalSpacing : 6
-            });
-            
-            gl.setColumnCount(3);
-            gl.setColumnWidth(0, "15%");
-            gl.setColumnWidth(1, "60%");
-            gl.setColumnWidth(2, "20%");
-            gl.setRowCount(3);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
-            gl.setRowHeight(2, 30);
-
+            var layout = new qx.ui.layout.Grid(4, 6);
+            layout.setColumnFlex(0, 3);
+            layout.setColumnFlex(1, 12);
+            layout.setColumnFlex(2, 4);
+            layout.setColumnMinWidth(0,  50);
+            layout.setColumnMaxWidth(2, 150);
+            var gl = new qx.ui.container.Composite(layout);
+            
             var l, e;
-
-            l = new qx.legacy.ui.basic.Label("Name:");
-            gl.add(l, 0, 0);
-            e = new qx.legacy.ui.form.TextField();
+            
+
+            l = new qx.ui.basic.Label("Name:");
+            gl.add(l, {row: 0, column: 0});
+            e = new qx.ui.form.TextField();
             e.setReadOnly(true);
             this.gui_entity_name = e;
-            gl.add(e, 1, 0);
-
-            l = new qx.legacy.ui.basic.Label("Value:");
-            gl.add(l, 0, 1);
+            gl.add(e, {row: 0, column: 1, colSpan: 2});
+
+            l = new qx.ui.basic.Label("Value:");
+            gl.add(l, {row: 1, column: 0});
             e = new pf.ui.TextField("");
             e.setReadOnly(true);
-            gl.add(e, 1, 1);
+            gl.add(e, {row: 1, column: 1});
             this.gui_entity_value = e;
 
             e = new pf.UnitSelector();
-            e.addListener("changeSelected", changeUnitsCB, this);
-            gl.add(e, 2, 1);
+            e.addListener("changeSelection", changeUnitsCB, this);
+            gl.add(e, {row: 1, column: 2});
             this.gui_entity_units = e;
 
-            l = new qx.legacy.ui.basic.Label("Section:");
-            gl.add(l, 0, 2);
-            e = new qx.legacy.ui.form.TextField();
+            l = new qx.ui.basic.Label("Section:");
+            gl.add(l, {row: 2, column: 0});
+            e = new qx.ui.form.TextField();
             e.setReadOnly(true);
             this.gui_entity_section = e;
-            gl.add(e, 1, 2);
-
-            vbl.add(gl);
-            
-            var frame = new qx.legacy.ui.embed.Iframe();
-            frame.set({ width : '100%', height : '2*' });
-            
-            vbl.add(frame);
+            gl.add(e, {row: 2, column: 1, colSpan: 2});
+
+            right_pane.add(gl, {flex: 1});
+            
+            var frame = new qx.ui.embed.Iframe();
+            
+            right_pane.add(frame, {flex : 3 });
             
             this.gui_wiki = frame;
@@ -1228,32 +1152,27 @@
             var page_id = this.renderTabPage("Compare",
                 "pf/image/tab-compare.png");
-            
-            var bl = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            bl.setWidth("100%");
-            bl.setHeight("100%");
-            bl.setSpacing(10);
+            page_id.setLayout(new qx.ui.layout.VBox(1));
+            
+            var bl = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
             page_id.add(bl);
             
-            var rc = new qx.legacy.ui.layout.HorizontalBoxLayout;
-            rc.setWidth("100%");
-            rc.setHeight("auto");
-            rc.setSpacing(10);
+            var rc = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
             bl.add(rc);
 
             var l, e;
-            l = new qx.legacy.ui.basic.Label("Dimension:");
-            e = new pf.ui.ComboBox;
-            e.add(new qx.legacy.ui.form.ListItem("Frequency", null, "frequency"));
-            e.add(new qx.legacy.ui.form.ListItem("Length", null, "length"));
-            e.add(new qx.legacy.ui.form.ListItem("Velocity", null, "velocity"));
-            e.add(new qx.legacy.ui.form.ListItem("Energy", null, "energy"));
-            e.add(new qx.legacy.ui.form.ListItem("Pressure", null, "pressure"));
-            e.add(new qx.legacy.ui.form.ListItem("Area", null, "area"));
-            e.add(new qx.legacy.ui.form.ListItem("Power density", null, "power_density"));
-            e.add(new qx.legacy.ui.form.ListItem("Power spectral density",
-                null, "spectral_power_density"));
-            e.add(new qx.legacy.ui.form.ListItem("Electric field", null, "efield"));
-            e.add(new qx.legacy.ui.form.ListItem("None", null, "none"));
-            e.addListener("changeSelected", function(ev) {
+            l = new qx.ui.basic.Label("Dimension:");
+            rc.add(l);
+            e = new pf.ui.SelectBox;
+            e.addItem("None", "none");
+            e.addItem("Length", "length");
+            e.addItem("Frequency", "frequency");
+            e.addItem("Velocity", "velocity");
+            e.addItem("Area", "area");
+            e.addItem("Energy", "energy");
+            e.addItem("Pressure", "pressure");
+            e.addItem("Power density", "power_density");
+            e.addItem("Power spectral density", "spectral_power_density");
+            e.addItem("Electric field", "efield");
+            e.addListener("changeSelection", function(ev) {
                     var dimension = this.gui_compare_dim.getSelectedValue();
                     this.gui_compare_units.update(dimension,
@@ -1262,49 +1181,47 @@
                     this.updateLegendListView();
                 }, this);
-            rc.add(l, e);
+            rc.add(e);
             this.gui_compare_dim = e;
-
-            l = new qx.legacy.ui.basic.Label("Units:");
+            
+            l = new qx.ui.basic.Label("Units:");
+            rc.add(l);
             e = new pf.UnitSelector();
-            e.addListener("changeSelected", function(ev) {
+            e.update("none");
+            e.addListener("changeSelection", function(ev) {
                     this.updateFavoritesListView();
                 }, this);
-            rc.add(l, e);
+            rc.add(e);
             this.gui_compare_units = e;
 
-            var lc =
-            {
-                s_icon   : { label      : "",
-                             width      : 24,
-                             type       : "iconHtml",
-                             align      : "center",                    
-                             sortable   : false                         },
-                name     : { label      : "Name",
-                             width      : 300,
-                             type       : "text",
-                             align      : "left",
-                             sortable   : true,
-                             sortProp   : "text"                        },
-                section  : { label      : "Section",
-                             width      : 120,
-                             type       : "text",
-                             align      : "left",
-                             sortable   : true,
-                             sortProp   : "text"                        },
-                value    : { label      : "Value",
-                             width      : 120,
-                             type       : "text",
-                             align      : "right",
-                             sortable   : true,
-                             sortProp   : "text",
-                             sortMethod : qx.legacy.util.Compare.byFloatString }
-            };
-
-            var lv = new qx.legacy.ui.listview.ListView(new Array, lc);
-
-            lv.setWidth("100%");
-            lv.setHeight("2*");
-            lv.setBackgroundColor("white");
-            lv.setBorder("dark-shadow");
+            // table model
+            var tm = new qx.ui.table.model.Simple();
+            tm.setColumns([ "", "Name", "Section", "Value" ]);
+            
+            tm.setColumnEditable(0, false);
+            tm.setColumnEditable(1, false);
+            tm.setColumnEditable(2, false);
+            tm.setColumnEditable(3, false);
+            
+            tm.setColumnSortable(0, false);
+            
+            tm.setSortMethods(3, function(row1, row2) {
+                var obj1 = parseFloat(row1[arguments.callee.columnIndex]);
+                var obj2 = parseFloat(row2[arguments.callee.columnIndex]);
+                return (obj1 > obj2) ? 1 : ((obj1 == obj2) ? 0 : -1);
+            });
+            
+            // table list
+            var lv = new qx.ui.table.Table(tm);
+
+            lv.setStatusBarVisible(false);
+            lv.setShowCellFocusIndicator(false);
+            lv.setColumnVisibilityButtonVisible(false);
+            
+            lv.setColumnWidth(0,  24);
+            lv.setColumnWidth(1, 300);
+            lv.setColumnWidth(2, 120);
+            
+            var renderer = new qx.ui.table.cellrenderer.Image(16, 16);
+            lv.getTableColumnModel().setDataCellRenderer(0, renderer);
 
             bl.add(lv);
@@ -1319,5 +1236,5 @@
             canvas.setPrintable(true);
             
-            var pname = this.guiParameter.getValue();
+            var pname = this.guiParameter.getSelectedValue();
             var vmin = this.guiMinParam.getNumValue();
             var vmax = this.guiMaxParam.getNumValue();
@@ -1480,9 +1397,9 @@
             
             canvas.setViewportCoordinates(0.15, 0.1, 0.9, 0.9);
-            dwx = Math.abs(wxmax - wxmin);
+            var dwx = Math.abs(wxmax - wxmin);
             if (dwx == 0) {
                 dwx = wxmax;
             }
-            dwy = Math.abs(wymax - wymin);
+            var dwy = Math.abs(wymax - wymin);
             if (dwy == 0) {
                 wymin = 0.0;
@@ -1534,10 +1451,8 @@
         showWikiPage : function(entity)
         {
-            var url;
+            var url = "about:blank";
             if (entity && entity.wikiLink) {
                 url = "http://en.wikipedia.org/w/index.php?title=" +
                       entity.wikiLink + "&printable=yes";
-            } else {
-                url = null;
             }
             
@@ -1548,5 +1463,5 @@
         {
             var tree = this.entity_tree;
-            var leaf = tree.getSelectedElement();
+            var leaf = getSingleTreeSelectedItem(tree);
             
             if (!leaf) {
@@ -1568,191 +1483,143 @@
             var page_id = this.renderTabPage("Plot",
                 "pf/image/tab-plot.png");
-
-            var sp = new qx.legacy.ui.splitpane.HorizontalSplitPane("1*", 300);
-            sp.set(
-            {
-                height          : "100%",
-                width           : "100%",
-                left            : 1,
-                right           : 1,
-                top             : 1,
-                bottom          : 1,
-                border          : "inset-thin",
-                showKnob        : true
+            page_id.setLayout(new qx.ui.layout.VBox);
+
+            var sp = new qx.ui.splitpane.Pane("horizontal");
+            page_id.add(sp, {height: "100%"});
+                        
+            var left_pane = new qx.ui.container.Composite(new qx.ui.layout.Grow).set({
+              width: 470,
+              decorator : "main"
             });
-            page_id.add(sp);
-                        
-            var left_pane  = sp.getLeftArea();
-            left_pane.setBackgroundColor("white");
-            left_pane.setBorder("inset-thin");
-            var right_pane = sp.getRightArea();
-            right_pane.setBackgroundColor("white");
-            right_pane.setBorder("inset-thin");
-
+            var right_pane = new qx.ui.container.Composite(new qx.ui.layout.VBox(4)).set({
+              padding : 4,
+              decorator : "main"
+            });
+
+            sp.add(left_pane,  0);
+            sp.add(right_pane, 1);
+            
             var canvas = new pf.ui.canvas.Plotter();
-            canvas.set(
-            {
-                height          : "100%",
-                width           : "100%"
-            });
             left_pane.add(canvas);
             this.canvas = canvas;
 
-
-            var vbl = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            vbl.set(
-            {
-                height          : "100%",
-                width           : "100%",
-                padding         : 4,
-                spacing         : 10
-            });
-            right_pane.add(vbl);
-
-            var gl = new qx.legacy.ui.layout.GridLayout;
-            gl.set(
-            {
-                height            : "auto",
-                width             : "100%",
-                left              : 4,
-                right             : 4,
-                top               : 4,
-                verticalSpacing   : 4,
-                verticalSpacing   : 4,
-                horizontalSpacing : 6
-            });
-            
-            gl.setColumnCount(2);
-            gl.setColumnWidth(0, 150);
-            gl.setColumnWidth(1, 100);
-            gl.setRowCount(5);
-            gl.setRowHeight(0, 30);
-            gl.setRowHeight(1, 30);
-            gl.setRowHeight(2, 30);
-            gl.setRowHeight(3, 30);
-            gl.setRowHeight(4, 30);
-            vbl.add(gl);
+            var layout = new qx.ui.layout.Grid(4, 6);
+            var gl = new qx.ui.container.Composite(layout);
 
             var l, e;
 
-            var btn = new qx.legacy.ui.form.Button("Redraw", "pf/image/tab-plot.png");
+            var btn = new qx.ui.form.Button("Redraw", "pf/image/tab-plot.png");
             btn.addListener("execute", this.drawCB, this);
-            gl.add(btn, 0, 0);
-
-            l = new qx.legacy.ui.basic.Label("Parameter to vary:");
-            e = new pf.ui.ComboBox;
-            e.add(new qx.legacy.ui.form.ListItem("N_e",   null, "N_e"));
-            e.add(new qx.legacy.ui.form.ListItem("T",     null, "T"));
-            e.add(new qx.legacy.ui.form.ListItem("T_e",   null, "T_e"));
-            e.add(new qx.legacy.ui.form.ListItem("T_i",   null, "T_i"));
-            e.add(new qx.legacy.ui.form.ListItem("T_r",   null, "T_r"));
-            e.add(new qx.legacy.ui.form.ListItem("T_i,r", null, "T_i,r"));
-            e.add(new qx.legacy.ui.form.ListItem("B",     null, "B"));
+            gl.add(btn, {row: 0, column: 0});
+
+            l = new qx.ui.basic.Label("Parameter to vary:");
+            e = new pf.ui.SelectBox;
+            e.addItem("N_e",   "N_e");
+            e.addItem("T",     "T");
+            e.addItem("T_e",   "T_e");
+            e.addItem("T_i",   "T_i");
+            e.addItem("T_r",   "T_r");
+            e.addItem("T_i,r", "T_i,r");
+            e.addItem("B",     "B");
             e.selectByValue("N_e");
             this.guiParameter = e;
-            gl.add(l, 0, 1);
-            gl.add(e, 1, 1);
-
-            l = new qx.legacy.ui.basic.Label("Minimum scale:");
+            gl.add(l, {row: 1, column: 0});
+            gl.add(e, {row: 1, column: 1});
+
+            l = new qx.ui.basic.Label("Minimum scale:");
             e = new pf.ui.TextField(0.5);
             this.guiMinParam = e;
-            gl.add(l, 0, 2);
-            gl.add(e, 1, 2);
-
-            l = new qx.legacy.ui.basic.Label("Maximum scale:");
+            gl.add(l, {row: 2, column: 0});
+            gl.add(e, {row: 2, column: 1});
+
+            l = new qx.ui.basic.Label("Maximum scale:");
             e = new pf.ui.TextField(2.0);
             this.guiMaxParam = e;
-            gl.add(l, 0, 3);
-            gl.add(e, 1, 3);
-
-            l = new qx.legacy.ui.basic.Label("Number of points:");
-            e = new pf.ui.Spinner(2, 20, 100);
+            gl.add(l, {row: 3, column: 0});
+            gl.add(e, {row: 3, column: 1});
+
+            l = new qx.ui.basic.Label("Number of points:");
+            e = new qx.ui.form.Spinner(2, 20, 100);
             this.guiParamPoints = e;
-            gl.add(l, 0, 4);
-            gl.add(e, 1, 4);
-
-
-            var lc =
-            {
-                s_icon   : { label      : "",
-                             width      : 24,
-                             type       : "iconHtml",
-                             align      : "center",                    
-                             sortable   : false                         },
-                name     : { label      : "Name",
-                             width      : 185,
-                             type       : "text",
-                             align      : "left",
-                             sortable   : true,
-                             sortProp   : "text"                        },
-                color    : { label      : "Color",
-                             width      : 55,
-                             type       : "text",
-                             align      : "left",
-                             sortable   : false                         }
-            };
-
-            var lv = new qx.legacy.ui.listview.ListView(new Array, lc);
-
-            lv.setWidth("100%");
-            lv.setHeight("2*");
-            // lv.setBackgroundColor("white");
-            lv.setBorder("dark-shadow");
+            gl.add(l, {row: 4, column: 0});
+            gl.add(e, {row: 4, column: 1});
+
+            right_pane.add(gl);
+
+
+
+            var tm = new qx.ui.table.model.Simple();
+            tm.setColumns(["", "Name", "Color", ""],
+                          ["icon", "name", "color", "favorite"]);
+            
+            tm.setColumnEditable(0, false);
+            tm.setColumnEditable(1, false);
+            tm.setColumnEditable(2, false);
+            
+            tm.setColumnSortable(1, false);
+            
+            // table list
+            var lv = new qx.ui.table.Table(tm);
+            lv.set({
+                height: 310
+            });
+
+            var cm = lv.getTableColumnModel();
+            cm.setColumnVisible(3, false);
+            
+            lv.setStatusBarVisible(false);
+            lv.setShowCellFocusIndicator(false);
+            lv.setColumnVisibilityButtonVisible(false);
+            
+            lv.setColumnWidth(0,  24);
+            lv.setColumnWidth(1, 185);
+            lv.setColumnWidth(2,  55);
+            
+            var renderer = new qx.ui.table.cellrenderer.Image(16, 16);
+            lv.getTableColumnModel().setDataCellRenderer(0, renderer);
+
+            right_pane.add(lv);
+            this.legendListView = lv;
+            
+            var sm = lv.getSelectionModel();
             
             lv.addListener("dblclick", function(ev) {
                     ev.stopPropagation();
-                    var pane = this.getPane();
-                    var item = pane.getSelectedItem();
-                    if (!item) {
+
+                    if (sm.isSelectionEmpty()) {
                         return;
                     }
+                    
+                    var index = sm.getLeadSelectionIndex();
+                    var item = tm.getRowDataAsMap(index);
+
                     var favorite = item.favorite;
                     if (!favorite) {
                         return;
                     }
-                    mypop.setUserData("favorite", null); // avoid loop call
-                    mypop.setValue(favorite.color);
-                    mypop.setUserData("favorite", favorite);
-                    var el = this.getElement();
-                    mypop.setTop(qx.legacy.html.Location.getPageBoxTop(el));
-                    mypop.setLeft(qx.legacy.html.Location.getPageBoxLeft(el) -
-                        this.getWidthValue());
-                    mypop.show();
+                    cpop.setUserData("favorite", null); // avoid loop call
+                    cpop.setValue(favorite.color);
+                    cpop.setUserData("favorite", favorite);
+                    
+                    cpop.placeToMouse(ev);
+                    cpop.open();
                 });
 
-            vbl.add(lv);
-            this.legendListView = lv;
-            
-            var mytables =
-            {
-              core : {
-                label : "Basic Colors",
-                values : this.colorMap
-              },
-
-              recent : {
-                label : "Recent Colors",
-                values : [ ]
-              }
-            }
-
-            var mypop = new qx.legacy.ui.component.ColorPopup(mytables);
-            // A hack
-            mypop._layout.remove(mypop._automaticBtn);
-
-            mypop.addToDocument();
-
-            mypop.addListener("changeValue", function(ev) {
-                var color = ev.getValue();
-                var mypop = ev.getTarget();
-                var favorite = mypop.getUserData("favorite");
-                if (!favorite || !color) {
-                    return;
-                }
-                favorite.color = color;
-                this.updateLegendListView();
-                this.drawAll();
-            }, this);
-    
+            var cpop = new pf.ui.ColorPopup(this.colorMap);
+            cpop.exclude();
+
+            this.doc.add(cpop);
+
+            cpop.addListener("changeValue", function(ev) {
+                    var color = ev.getData();
+                    var cpop = ev.getTarget();
+                    var favorite = cpop.getUserData("favorite");
+                    if (!favorite || !color) {
+                        return;
+                    }
+                    favorite.color = color;
+                    this.updateLegendListView();
+                    this.drawAll();
+                }, this);
         },
 
@@ -1771,9 +1638,9 @@
         {
             var lv = this.saveLoadConfigList;
+            var tm = lv.getTableModel();
+            
             var configPtrs = this.prefs.configPtrs;
             
-            var rowData = lv.getData();
-            rowData.length = 0;
-            lv.getPane().getManager().deselectAll();
+            var rowData = new Array();
 
             var i;
@@ -1786,11 +1653,12 @@
                 d.setTime(configPtr.time);
 
-                rowData.push({ name : {text       : configPtr.name },
-                               date : {text       : df.format(d)   }
-                             });
-            }
-            
-            lv.updateSort();
-            lv.update();
+                rowData.push([configPtr.name, df.format(d)]);
+            }
+            
+            tm.setData(rowData, false);
+            var sidx = tm.getSortColumnIndex();
+            tm.sortByColumn(sidx, tm.isSortAscending());
+            
+            lv.updateContent();
         },
         
@@ -1843,31 +1711,26 @@
             var submenu, btn, q;
 
-            var theme = qx.legacy.theme.manager.Color.getInstance().getColorTheme();
-            var bg = '#' +
-                qx.util.ColorUtil.rgbToHexString(theme.colors['button']);
-            
-            submenu = new qx.legacy.ui.menu.Menu;
-            submenu.setBackgroundColor(bg);
+            submenu = new qx.ui.menu.Menu;
             this.doc.add(submenu);
-            q = new qx.event.Command("Ctrl+O");
+            q = new qx.ui.core.Command("Ctrl+O");
             q.addListener("execute", this.openCB, this);
-            btn = new qx.legacy.ui.menu.Button("Open...", "pf/image/open.png", q);
+            btn = new qx.ui.menu.Button("Open...", "pf/image/open.png", q);
             submenu.add(btn);
-            q = new qx.event.Command("Ctrl+S");
+            q = new qx.ui.core.Command("Ctrl+S");
             q.addListener("execute", this.saveConfigCB, this);
-            btn = new qx.legacy.ui.menu.Button("Save", "pf/image/save.png", q);
+            btn = new qx.ui.menu.Button("Save", "pf/image/save.png", q);
             submenu.add(btn);
-            btn = new qx.legacy.ui.menu.Button("Save as...", "pf/image/save.png");
+            btn = new qx.ui.menu.Button("Save as...", "pf/image/save.png");
             btn.addListener("execute", this.saveAsCB, this);
             submenu.add(btn);
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            q = new qx.event.Command("Ctrl+P");
+            submenu.add(new qx.ui.menu.Separator);
+            q = new qx.ui.core.Command("Ctrl+P");
             q.addListener("execute", function(ev) {
                 window.print();
             });
-            btn = new qx.legacy.ui.menu.Button("Print...", "pf/image/print.png", q);
+            btn = new qx.ui.menu.Button("Print...", "pf/image/print.png", q);
             submenu.add(btn);
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            q = new qx.event.Command("Ctrl+R");
+            submenu.add(new qx.ui.menu.Separator);
+            q = new qx.ui.core.Command("Ctrl+R");
             q.addListener("execute", function(ev) {
                     if (!this.prefs.warnOnExit ||
@@ -1877,8 +1740,8 @@
                     }
                 }, this);
-            btn = new qx.legacy.ui.menu.Button("Restart", "pf/image/reset.png", q);
+            btn = new qx.ui.menu.Button("Restart", "pf/image/reset.png", q);
             submenu.add(btn);
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            q = new qx.event.Command("Ctrl+Q");
+            submenu.add(new qx.ui.menu.Separator);
+            q = new qx.ui.core.Command("Ctrl+Q");
             q.addListener("execute", function(ev) {
                     if (!this.prefs.warnOnExit ||
@@ -1888,147 +1751,146 @@
                     }
                 }, this);
-            btn = new qx.legacy.ui.menu.Button("Quit", "pf/image/exit.png", q);
+            btn = new qx.ui.menu.Button("Quit", "pf/image/exit.png", q);
             submenu.add(btn);
                 
-            btn = new qx.legacy.ui.menubar.Button("File", submenu);
-            btn.set({ paddingLeft : 7, paddingRight : 7 });
+            btn = new qx.ui.menubar.Button("File", null, submenu);
             menubar.add(btn);
 
 
-            submenu = new qx.legacy.ui.menu.Menu;
-            submenu.setBackgroundColor(bg);
-            submenu.addListener("beforeAppear", editMenuCB, this);
+            submenu = new qx.ui.menu.Menu;
+            submenu.addListener("appear", editMenuCB, this);
             this.doc.add(submenu);
-            btn = new qx.legacy.ui.menu.Button("Add to Favorites",
+            btn = new qx.ui.menu.Button("Add to Favorites",
                 "pf/image/favorite-add.png");
             btn.addListener("execute", addToFavCB, this);
             this.editMenuButtonAddToFav = btn;
             submenu.add(btn);
-            btn = new qx.legacy.ui.menu.Button("Remove from Favorites",
+            btn = new qx.ui.menu.Button("Remove from Favorites",
                 "pf/image/favorite-delete.png");
             btn.addListener("execute", removeFromFavCB, this);
             this.editMenuButtonRemFromFav = btn;
             submenu.add(btn);
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            btn = new qx.legacy.ui.menu.Button("Preferences",
+            submenu.add(new qx.ui.menu.Separator);
+            btn = new qx.ui.menu.Button("Preferences",
                 "pf/image/preferences.png");
             btn.addListener("execute", this.prefsCB, this);
             submenu.add(btn);
 
-            btn = new qx.legacy.ui.menubar.Button("Edit", submenu);
-            btn.set({ paddingLeft : 7, paddingRight : 7 });
+            btn = new qx.ui.menubar.Button("Edit", null, submenu);
             menubar.add(btn);
 
 
-            submenu = new qx.legacy.ui.menu.Menu;
-            submenu.setBackgroundColor(bg);
-            submenu.addListener("beforeAppear", viewMenuCB, this);
-
-            var subMenu1 = new qx.legacy.ui.menu.Menu;
-            subMenu1.setBackgroundColor(bg);
-            button = new qx.legacy.ui.menu.CheckBox("Fundamental",
-                null, this.showFundamental);
-            button.addListener("execute", showFundamentalCB, this);
-            subMenu1.add(button);
-            button = new qx.legacy.ui.menu.CheckBox("Spectroscopy",
-                null, this.showSpectroscopy);
-            button.addListener("execute", showSpectroscopyCB, this);
-            subMenu1.add(button);
-            button = new qx.legacy.ui.menu.CheckBox("Waves",
-                null, this.showWaves);
-            button.addListener("execute", showWavesCB, this);
-            subMenu1.add(button);
-            button = new qx.legacy.ui.menu.CheckBox("Collisions",
-                null, this.showCollisions);
-            button.addListener("execute", showCollisionsCB, this);
-            subMenu1.add(button);
-            this.showSectionsButton = new qx.legacy.ui.menu.Button("Show Sections",
+            submenu = new qx.ui.menu.Menu;
+            submenu.addListener("appear", viewMenuCB, this);
+
+            var subMenu1 = new qx.ui.menu.Menu;
+            btn = new qx.ui.menu.CheckBox("Fundamental");
+            btn.setValue(this.showFundamental);
+            btn.addListener("execute", showFundamentalCB, this);
+            subMenu1.add(btn);
+            btn = new qx.ui.menu.CheckBox("Spectroscopy");
+            btn.setValue(this.showSpectroscopy);
+            btn.addListener("execute", showSpectroscopyCB, this);
+            subMenu1.add(btn);
+            btn = new qx.ui.menu.CheckBox("Waves");
+            btn.setValue(this.showWaves);
+            btn.addListener("execute", showWavesCB, this);
+            subMenu1.add(btn);
+            btn = new qx.ui.menu.CheckBox("Collisions");
+            btn.setValue(this.showCollisions);
+            btn.addListener("execute", showCollisionsCB, this);
+            subMenu1.add(btn);
+            this.showSectionsButton = new qx.ui.menu.Button("Show Sections",
                 null, null, subMenu1);
             submenu.add(this.showSectionsButton);
             
-            submenu.add(new qx.legacy.ui.menu.Separator);
-
-            var subMenu2 = new qx.legacy.ui.menu.Menu;
-            subMenu2.setBackgroundColor(bg);
-            button = new qx.legacy.ui.menu.CheckBox("Electrons",
-                null, this.showElectrons)
-            button.addListener("execute", showElectronsCB, this);
-            subMenu2.add(button);
-            button = new qx.legacy.ui.menu.CheckBox("Ions",
-                null, this.showIons)
-            button.addListener("execute", showIonsCB, this);
-            subMenu2.add(button);
-            button = new qx.legacy.ui.menu.CheckBox("Radiators",
-                null, this.showRadiators)
-            button.addListener("execute", showRadiatorsCB, this);
-            subMenu2.add(button);
-            this.showSpeciesButton = new qx.legacy.ui.menu.Button("Show Species",
+            submenu.add(new qx.ui.menu.Separator);
+
+            var subMenu2 = new qx.ui.menu.Menu;
+            btn = new qx.ui.menu.CheckBox("Electrons");
+            btn.setValue(this.showElectrons);
+            btn.addListener("execute", showElectronsCB, this);
+            subMenu2.add(btn);
+            btn = new qx.ui.menu.CheckBox("Ions");
+            btn.setValue(this.showIons);
+            btn.addListener("execute", showIonsCB, this);
+            subMenu2.add(btn);
+            btn = new qx.ui.menu.CheckBox("Radiators");
+            btn.setValue(this.showRadiators);
+            btn.addListener("execute", showRadiatorsCB, this);
+            subMenu2.add(btn);
+            this.showSpeciesButton = new qx.ui.menu.Button("Show Species",
                 null, null, subMenu2);
             submenu.add(this.showSpeciesButton);
             
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            q = new qx.event.Command("Ctrl+W");
+            submenu.add(new qx.ui.menu.Separator);
+            q = new qx.ui.core.Command("Ctrl+W");
             q.addListener("execute", this.loadWikiCB, this);
-            btn = new qx.legacy.ui.menu.Button("Load Wikipedia Article",
+            btn = new qx.ui.menu.Button("Load Wikipedia Article",
                 "pf/image/wikipedia.png", q);
             submenu.add(btn);
             this.loadWikiButton = btn;
-            this.doc.add(submenu, subMenu1, subMenu2);
-
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            q = new qx.event.Command("Ctrl+L");
+            this.doc.add(submenu);
+            this.doc.add(subMenu1);
+            this.doc.add(subMenu2);
+
+            submenu.add(new qx.ui.menu.Separator);
+            q = new qx.ui.core.Command("Ctrl+L");
             q.addListener("execute", this.drawCB, this);
-            btn = new qx.legacy.ui.menu.Button("Redraw Plot",
+            btn = new qx.ui.menu.Button("Redraw Plot",
                 "pf/image/tab-plot.png", q);
             submenu.add(btn);
             this.redrawButton = btn;
             
-            btn = new qx.legacy.ui.menubar.Button("View", submenu);
-            btn.set({ paddingLeft : 7, paddingRight : 7 });
+            
+            btn = new qx.ui.menubar.Button("View", null, submenu);
             menubar.add(btn);
 
 
-            submenu = new qx.legacy.ui.menu.Menu;
-            submenu.setBackgroundColor(bg);
+            var nvOptions = {
+                width: 800,
+                height: 600,
+                scrollbars : true,
+                resizable : true,
+                menubar : false,
+                status : false
+            };
+            submenu = new qx.ui.menu.Menu;
             this.doc.add(submenu);
-            q = new qx.event.Command("F1");
+            q = new qx.ui.core.Command("F1");
             q.addListener("execute", function(ev) {
                 alert("Help system not implemented yet");
             });
-            btn = new qx.legacy.ui.menu.Button("Help Contents",
+            btn = new qx.ui.menu.Button("Help Contents",
                 "pf/image/help.png", q);
             submenu.add(btn);
-            btn = new qx.legacy.ui.menu.Button("NRL Plasma Formulary",
+            btn = new qx.ui.menu.Button("NRL Plasma Formulary",
                 "pf/image/nrl.png");
             btn.addListener("execute", function (ev) {
-                    var w = new qx.legacy.util.NativeWindow("http://wwwppd.nrl.navy.mil/nrlformulary/");
-                    w.setDimension(800, 600);
-                    w.open();
+                    var url = "http://wwwppd.nrl.navy.mil/nrlformulary/";
+                    var w = qx.bom.Window.open(url, null, nvOptions);
                 }, this);
             submenu.add(btn);
-            btn = new qx.legacy.ui.menu.Button("Plasma at Wikipedia",
+            btn = new qx.ui.menu.Button("Plasma at Wikipedia",
                 "pf/image/wikipedia.png");
             btn.addListener("execute", function (ev) {
-                    var w = new qx.legacy.util.NativeWindow("http://en.wikipedia.org/wiki/Plasma_%28physics%29");
-                    w.setDimension(800, 600);
-                    w.open();
+                    var url = "http://en.wikipedia.org/wiki/Plasma_%28physics%29";
+                    var w = qx.bom.Window.open(url, null, nvOptions);
                 }, this);
             submenu.add(btn);
-            submenu.add(new qx.legacy.ui.menu.Separator);
-            btn = new qx.legacy.ui.menu.Button("License Terms",
+            submenu.add(new qx.ui.menu.Separator);
+            btn = new qx.ui.menu.Button("License Terms",
                 "pf/image/gnu.png");
             btn.addListener("execute", function (ev) {
-                    var w = new qx.legacy.util.NativeWindow("resource/pf/html/GPL.html");
-                    w.setDimension(800, 600);
-                    w.open();
+                    var url = "resource/pf/html/GPL.html";
+                    var w = qx.bom.Window.open(url, null, nvOptions);
                 }, this);
             submenu.add(btn);
-            btn = new qx.legacy.ui.menu.Button("About...",
+            btn = new qx.ui.menu.Button("About...",
                 "pf/image/about.png");
             btn.addListener("execute", this.aboutCB, this);
             submenu.add(btn);
 
-            btn = new qx.legacy.ui.menubar.Button("Help", submenu);
-            btn.set({ paddingLeft : 7, paddingRight : 7 });
+            btn = new qx.ui.menubar.Button("Help", null, submenu);
             menubar.add(btn);
         },
@@ -2049,6 +1911,6 @@
             var dims = new Object;
             
-            dims.w = qx.legacy.html.Window.getInnerWidth(this.win);
-            dims.h = qx.legacy.html.Window.getInnerHeight(this.win);
+            dims.w = qx.bom.Element.Dimension.getWidth(this.win);
+            dims.h = qx.bom.Element.Dimension.getHeight(this.win);
             
             return dims;
@@ -2068,5 +1930,5 @@
             
             if (prefstr) {
-                this.prefs = qx.util.Json.parseQx(prefstr);
+                this.prefs = qx.util.Json.parse(prefstr);
             }
             
@@ -2187,5 +2049,5 @@
             }
 
-            var config = qx.util.Json.parseQx(configstr);
+            var config = qx.util.Json.parse(configstr);
             
             if (config) {
@@ -2237,8 +2099,8 @@
         createSaveLoadDialog : function()
         {
-            var w, rc, rc1, e, btn;
+            var w, rc1, e, btn;
             // "Save as..." dialog
-            w = new qx.legacy.ui.window.Window();
-            w.setSpace(200, "auto", 100, 300);
+            w = new qx.ui.window.Window();
+            w.setLayout(new qx.ui.layout.VBox(10));
             w.setModal(true);
             w.setShowMinimize(false);
@@ -2250,49 +2112,53 @@
                     }
                 });
-
-            rc = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            rc.set({width : "100%", height : "100%", spacing : 4});
-            w.add(rc);
-            
-            var tb = new qx.legacy.ui.toolbar.ToolBar();
-            var btn_delete = new qx.legacy.ui.toolbar.Button("Delete",
+                
+            this.doc.add(w, {left: 200, top: 100});
+            this.saveLoadWindow = w;
+
+            var tb = new qx.ui.toolbar.ToolBar();
+            var btn_delete = new qx.ui.toolbar.Button("Delete",
                 "pf/image/delete.png");
-            var btn_rename = new qx.legacy.ui.toolbar.Button("Rename",
+            var btn_rename = new qx.ui.toolbar.Button("Rename",
                 "pf/image/rename.png");
             btn_delete.setEnabled(false);
             btn_rename.setEnabled(false);
-            var sep = new qx.legacy.ui.toolbar.Separator();
-            tb.add(sep, btn_delete, btn_rename);
-            rc.add(tb);
-            
-            var lc =
-            {
-                name     : { label      : "Configuration",
-                             width      : 250,
-                             type       : "text",
-                             align      : "left",
-                             sortable   : true,
-                             sortProp   : "text"  },
-                date     : { label      : "Last Modified",
-                             width      : 180,
-                             type       : "text",
-                             align      : "right",
-                             sortable   : true   }
-            };
-
-            var lv = new qx.legacy.ui.listview.ListView(new Array, lc);
-
-            lv.setWidth("100%");
-            lv.setBorder("dark-shadow");
-            lv.setHeight("2*");
-
+            var sep = new qx.ui.toolbar.Separator();
+            tb.add(sep);
+            tb.add(btn_delete);
+            tb.add(btn_rename);
+            w.add(tb);
+
+            // table model
+            var tm = new qx.ui.table.model.Simple();
+            tm.setColumns([ "Configuration", "Last Modified" ]);
+            
+            tm.setColumnEditable(0, false);
+            tm.setColumnEditable(1, false);
+            
+            // table list
+            var lv = new qx.ui.table.Table(tm);
+            lv.set({
+                height: 250
+            });
+
+            lv.setStatusBarVisible(false);
+            lv.setShowCellFocusIndicator(false);
+            lv.setColumnVisibilityButtonVisible(false);
+            
+            lv.setColumnWidth(0, 250);
+            lv.setColumnWidth(1, 180);
+            
             this.saveLoadConfigList = lv;
-            rc.add(lv);
+            w.add(lv);
+
+            var sm = lv.getSelectionModel();
+            sm.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
 
             btn_delete.addListener("execute", function(ev) {
-                    var pane = lv.getPane();
-                    var item = pane.getSelectedItem();
-                    if (item && confirm("Delete \"" + item.name.text + "\"?")) {
-                        this.removeConfig(item.name.text);
+                    if (!sm.isSelectionEmpty() &&
+                        confirm("Delete \"" + rowData[0] + "\"?")) {
+                        var index = sm.getLeadSelectionIndex();
+                        var rowData = tm.getRowData(index);
+                        this.removeConfig(rowData[0]);
                         this.updateSaveLoadList();
                     }
@@ -2300,8 +2166,8 @@
 
             btn_rename.addListener("execute", function(ev) {
-                    var pane = lv.getPane();
-                    var item = pane.getSelectedItem();
-                    if (item) {
-                        var name = item.name.text;
+                    if (!sm.isSelectionEmpty()) {
+                        var index = sm.getLeadSelectionIndex();
+                        var rowData = tm.getRowData(index);
+                        var name = rowData[0];
                         var newname = prompt("Rename \"" + name + "\" to", name);
                         if (newname && newname != name) {
@@ -2312,24 +2178,22 @@
                                 this.gui_configName.setLabel(newname);
                             }
+                            this.saveLoadTextField.setValue(newname);
                         }
                     }
                 }, this);
 
-            e = new pf.ui.TextField();
-            e.setWidth("100%");
-            rc.add(e);
-            
+            e = new qx.ui.form.TextField();
+            w.add(e);
             this.saveLoadTextField = e;
-
-            var sm = lv.getPane().getManager();
-            sm.setMultiSelection(false);
+            
             sm.addListener("changeSelection", function(ev) {
-                    var item = this.getSelectedItem();
-                    if (!item) {
+                    if (sm.isSelectionEmpty()) {
                         e.setValue(null);
                         btn_delete.setEnabled(false);
                         btn_rename.setEnabled(false);
                     } else {
-                        e.setValue(item.name.text);
+                        var index = sm.getLeadSelectionIndex();
+                        var rowData = tm.getRowData(index);
+                        e.setValue(rowData[0]);
                         btn_rename.setEnabled(true);
                         btn_delete.setEnabled(true);
@@ -2337,13 +2201,8 @@
                 });
             
-
-            rc1 = new qx.legacy.ui.layout.HorizontalBoxLayout("horizontal");
-            rc1.set({width                   : "100%",
-                     height                  : "auto",
-                     horizontalChildrenAlign : "right",
-                     verticalChildrenAlign   : "bottom"});
-            rc.add(rc1);
-
-            btn = new qx.legacy.ui.form.Button("Cancel",
+            rc1 = new qx.ui.container.Composite(new qx.ui.layout.HBox(1));
+            w.add(rc1);
+
+            btn = new qx.ui.form.Button("Cancel",
                 "pf/image/cancel.png");
             btn.addListener("execute", function(ev) {
@@ -2352,5 +2211,5 @@
             rc1.add(btn);
 
-            btn = new qx.legacy.ui.form.Button("OK",
+            btn = new qx.ui.form.Button("OK",
                 "pf/image/ok.png");
             btn.addListener("execute", function(ev) {
@@ -2387,7 +2246,4 @@
                     btn.setEnabled(null != name && name.length != 0);
                 });
-                
-            this.doc.add(w);
-            this.saveLoadWindow = w;
         },
 
@@ -2396,93 +2252,88 @@
             var w;
             // "Preferences..." dialog
-            w = new qx.legacy.ui.window.Window("Preferences",
+            w = new qx.ui.window.Window("Preferences",
                 "pf/image/preferences.png");
-            w.setSpace(200, "auto", 100, "auto");
+            w.setLayout(new qx.ui.layout.VBox(10));
+
             w.setModal(true);
             w.setShowMinimize(false);
             w.setShowMaximize(false);
 
-            var vbl = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            vbl.setStretchChildrenOrthogonalAxis(false);
-            w.add(vbl);
+            w.addListener("keypress", function(ev) {
+                    if (ev.getKeyIdentifier() == "Escape") {
+                        w.close()
+                    }
+                });
             
             var fr1, fr2, rc, l, e;
             
-            fr1 = new qx.legacy.ui.groupbox.GroupBox("Default units");
-            fr1.setDimension("auto", "auto");
-            vbl.add(fr1);
-            
-            rc = new qx.legacy.ui.layout.HorizontalBoxLayout;
-            rc.setWidth("100%");
-            rc.setHeight("auto");
-            rc.setSpacing(10);
+            fr1 = new qx.ui.groupbox.GroupBox("Default units");
+            fr1.setLayout(new qx.ui.layout.VBox());
+            w.add(fr1);
+            
+            rc = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
             fr1.add(rc);
 
-            l = new qx.legacy.ui.basic.Label("Dimension:");
-            e = new pf.ui.ComboBox;
-            e.add(new qx.legacy.ui.form.ListItem("Frequency", null, "frequency"));
-            e.add(new qx.legacy.ui.form.ListItem("Length", null, "length"));
-            e.add(new qx.legacy.ui.form.ListItem("Velocity", null, "velocity"));
-            e.add(new qx.legacy.ui.form.ListItem("Energy", null, "energy"));
-            e.add(new qx.legacy.ui.form.ListItem("Pressure", null, "pressure"));
-            e.add(new qx.legacy.ui.form.ListItem("Area", null, "area"));
-            e.add(new qx.legacy.ui.form.ListItem("Power density", null, "power_density"));
-            e.add(new qx.legacy.ui.form.ListItem("Power spectral density",
-                null, "spectral_power_density"));
-            e.add(new qx.legacy.ui.form.ListItem("Electric field", null, "efield"));
-            e.addListener("changeSelected", function(ev) {
+            l = new qx.ui.basic.Label("Dimension:");
+            e = new pf.ui.SelectBox;
+            e.addItem("Length", "length");
+            e.addItem("Frequency", "frequency");
+            e.addItem("Velocity", "velocity");
+            e.addItem("Energy", "energy");
+            e.addItem("Pressure", "pressure");
+            e.addItem("Area", "area");
+            e.addItem("Power density", "power_density");
+            e.addItem("Power spectral density", "spectral_power_density");
+            e.addItem("Electric field", "efield");
+            e.addListener("changeSelection", function(ev) {
                     var dimension = ev.getTarget().getSelectedValue();
                     this.gui_prefs_units.update(dimension,
                         this.prefs.units[dimension]);
                 }, this);
-            rc.add(l, e);
+            rc.add(l);
+            rc.add(e);
             this.gui_prefs_dim = e;
 
-            l = new qx.legacy.ui.basic.Label("Units:");
+            l = new qx.ui.basic.Label("Units:");
             e = new pf.UnitSelector();
-            e.addListener("changeSelected", function(ev) {
+            e.addListener("changeSelection", function(ev) {
                     var dimension = this.gui_prefs_dim.getSelectedValue();
-                    var units = ev.getTarget().getValue();
+                    var units = ev.getTarget().getSelectedValue();
                     this.prefs.units[dimension] = units;
                 }, this);
-            rc.add(l, e);
+            rc.add(l);
+            rc.add(e);
+            e.update("length");
             this.gui_prefs_units = e;
 
-            fr2 = new qx.legacy.ui.groupbox.GroupBox("Interface");
-            fr2.setDimension("auto", "auto");
-            vbl.add(fr2);
-            // A hack...
-            fr1.addListener("appear", function(ev) {
-                    fr2.setWidth(this.getWidthValue());
-                });
-
-            rc = new qx.legacy.ui.layout.VerticalBoxLayout;
-            rc.setWidth("100%");
-            rc.setHeight("auto");
-            rc.setSpacing(10);
+            fr2 = new qx.ui.groupbox.GroupBox("Interface");
+            fr2.setLayout(new qx.ui.layout.VBox());
+            w.add(fr2);
+
+            rc = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
             fr2.add(rc);
 
-            e = new qx.legacy.ui.form.CheckBox("Load Wikipedia articles automatically");
-            e.setChecked(this.prefs.autoLoadWiki);
-            e.addListener("changeChecked", function(ev) {
-                this.prefs.autoLoadWiki = ev.getTarget().getChecked();
+            e = new qx.ui.form.CheckBox("Load Wikipedia articles automatically");
+            e.setValue(this.prefs.autoLoadWiki);
+            e.addListener("changeValue", function(ev) {
+                this.prefs.autoLoadWiki = ev.getTarget().getValue();
             }, this);
             rc.add(e);
 
-            e = new qx.legacy.ui.form.CheckBox("Remember window dimensions on exit");
-            e.setChecked(this.prefs.rememberWindowSize);
-            e.addListener("changeChecked", function(ev) {
-                this.prefs.rememberWindowSize = ev.getTarget().getChecked();
+            e = new qx.ui.form.CheckBox("Remember window dimensions on exit");
+            e.setValue(this.prefs.rememberWindowSize);
+            e.addListener("changeValue", function(ev) {
+                this.prefs.rememberWindowSize = ev.getTarget().getValue();
             }, this);
             rc.add(e);
 
-            e = new qx.legacy.ui.form.CheckBox("Warn on exit or restart");
-            e.setChecked(this.prefs.warnOnExit);
-            e.addListener("changeChecked", function(ev) {
-                this.prefs.warnOnExit = ev.getTarget().getChecked();
+            e = new qx.ui.form.CheckBox("Warn on exit or restart");
+            e.setValue(this.prefs.warnOnExit);
+            e.addListener("changeValue", function(ev) {
+                this.prefs.warnOnExit = ev.getTarget().getValue();
             }, this);
             rc.add(e);
-
-            this.doc.add(w);
+            
+            this.doc.add(w, {left: 200, top: 100});
             this.prefsWindow = w;
         },
@@ -2498,5 +2349,4 @@
         {
             this.base(arguments);
-            this.compat();
 
             // Enable logging in debug variant
@@ -2509,6 +2359,6 @@
             }
             
-            this.doc = qx.legacy.ui.core.ClientDocument.getInstance();
-            this.win = this.doc.getWindowElement();
+            this.doc = this.getRoot();
+            // this.win = this.doc.getWindow();
             
             // Load prefs
@@ -2530,16 +2380,15 @@
             
             this.colorMap = new Array("red", "blue", "green", "orange",
-                "brown", "olive", "teal", "magenta", "grey", "black");
+                "brown", "olive", "teal", "magenta", "gray", "black");
             this.ncolor = 0;
 
             // Top-level container
-            this.bl_top = new qx.legacy.ui.layout.VerticalBoxLayout("vertical");
-            this.bl_top.setWidth("100%");
-            this.bl_top.setHeight("100%");
-
-            this.bl_top.addToDocument();
+            var layout = new qx.ui.layout.VBox;
+            this.bl_top = new qx.ui.container.Composite(layout);
+
+            this.doc.add(this.bl_top, {width : '100%'});
 
             // The menubar
-            this.menubar = new qx.legacy.ui.menubar.MenuBar;
+            this.menubar = new qx.ui.menubar.MenuBar;
             this.bl_top.add(this.menubar);
             
@@ -2547,14 +2396,7 @@
             this.buildMenu();
             
-            var tf1 = new qx.legacy.ui.pageview.tabview.TabView;
-            tf1.set({ width : '100%', height : '2*' });
-
-            this.bl_top.add(tf1);
-
-            this.tabbar  = tf1.getBar();
-            this.tabpane = tf1.getPane();
-            this.tabpane.setHeight('3*');
-            this.tabpane.setPadding(0, 0, 0, 0);
-
+            this.tabview = new qx.ui.tabview.TabView;
+            
+            this.bl_top.add(this.tabview);
             // The "Parameters" tab
             this.renderParametersTab();
@@ -2576,40 +2418,46 @@
 
             // "About..." dialog
-            w = new qx.legacy.ui.window.Window("About Plasma Formulary",
+            var w = new qx.ui.window.Window("About Plasma Formulary",
                 "pf/image/about.png");
-            w.setSpace(200, "auto", 100, "auto");
+            w.setLayout(new qx.ui.layout.VBox(10));
             w.setModal(true);
             w.setShowMinimize(false);
             w.setShowMaximize(false);
+
+            w.addListener("keypress", function(ev) {
+                    if (ev.getKeyIdentifier() == "Escape") {
+                        w.close()
+                    }
+                });
             
             var version = qx.core.Version;
             if (!version) {
-                version = '0.8.3';
-            }
-            str = 'Plasma Formulary Interactive.<br/>'    +
-                  '$Revision$.'                    +
-                  '<p>Written by Evgeny Stambulchik.</p>' +
-                  '<p>GUI built with the Qooxdoo-'        + 
-                  version + ' toolkit.<br/>'              + 
-                  'Using Walter Zorn jsGraphics for drawing.</p>';
-
-            var a = new qx.legacy.ui.basic.Atom(str);
-            a.set({ top: 4, left: 4 });
+                version = '1.0';
+            }
+            var str = 'Plasma Formulary Interactive.<br/>'    +
+                      '$Revision$.'                    +
+                      '<p>Written by Evgeny Stambulchik.</p>' +
+                      '<p>GUI built with the Qooxdoo-'        + 
+                      version + ' toolkit.<br/>'              + 
+                      'Using Walter Zorn jsGraphics for drawing.</p>';
+
+            var a = new qx.ui.basic.Atom(str);
+            a.setRich(true);
             w.add(a);
 
-            this.doc.add(w);
+            this.doc.add(w, {left: 200, top: 100});
             this.aboutWindow = w;
             
             if (this.prefs.rememberWindowSize && this.prefs.dims) {
-                self.resizeTo(this.prefs.dims.w,this.prefs.dims.h)
+                self.resizeTo(this.prefs.dims.w, this.prefs.dims.h)
             }
 
             // Handle resize events
-            this.doc.addListener("windowresize", function(e) {
-                if (this.prefs.rememberWindowSize) {
-                    this.prefs.dims = this.getWindowDimensions();
-                }
-                this.drawAll();
-            }, this);
+            // this.doc.addListener("windowresize", function(e) {
+            //     if (this.prefs.rememberWindowSize) {
+            //         this.prefs.dims = this.getWindowDimensions();
+            //     }
+            //     this.drawAll();
+            // }, this);
         },
     
@@ -2628,5 +2476,4 @@
 
             this.base(arguments);
-            this.compat();
             
             // Prompt user
Index: source/class/pf/UnitSelector.js
===================================================================
--- source/class/pf/UnitSelector.js	(revision 61)
+++ source/class/pf/UnitSelector.js	(revision 146)
@@ -1,5 +1,5 @@
 qx.Class.define("pf.UnitSelector",
 {
-    extend: pf.ui.ComboBox,
+    extend: pf.ui.SelectBox,
     
     members:
@@ -15,5 +15,5 @@
             this._dimension = dimension;
             
-            var list = this.getList();
+            var list = this.getChildControl("list");
             
             // clear everything
@@ -81,12 +81,10 @@
 
             if (def_units) {
-                var def_selected = list.findStringExact(def_units);
-                if (def_selected) {
-                    selected = def_selected;
-                }
-            }
-            
+                var models = new Array(def_units);
+                list.setModelSelection(models);
+            } else
             if (selected) {
-                this.setSelected(selected);
+                var sels = Array(selected);
+                list.setSelection(sels);
             }
         }
Index: source/class/pf/theme/Appearance.js
===================================================================
--- source/class/pf/theme/Appearance.js	(revision 146)
+++ source/class/pf/theme/Appearance.js	(revision 146)
@@ -0,0 +1,46 @@
+qx.Theme.define("pf.theme.Appearance",
+{
+  extend : qx.theme.modern.Appearance,
+
+  appearances :
+  {
+    "groupbox" :
+    {
+      style : function(states)
+      {
+        return {
+          legendPosition : "middle"
+        };
+      }
+    },
+    
+    "groupbox/legend" :
+    {
+      alias : "atom",
+
+      style : function(states)
+      {
+        return {
+          paddingRight    : 4,
+          paddingLeft     : 4,
+          paddingTop      : 2,
+          paddingBottom   : 2,
+          marginRight     : 10,
+          marginLeft      : 10,
+          decorator       : "group"
+        };
+      }
+    },
+    
+    "groupbox/frame" :
+    {
+      style : function(states)
+      {
+        return {
+          padding : [ 12, 9 ],
+          decorator  : "group"
+        };
+      }
+    }
+  }
+});
Index: source/class/pf/theme/Theme.js
===================================================================
--- source/class/pf/theme/Theme.js	(revision 146)
+++ source/class/pf/theme/Theme.js	(revision 146)
@@ -0,0 +1,11 @@
+qx.Theme.define("pf.theme.Theme",
+{
+  meta :
+  {
+    color      : qx.theme.modern.Color,
+    decoration : qx.theme.modern.Decoration,
+    font       : qx.theme.modern.Font,
+    icon       : qx.theme.icon.Tango,
+    appearance : pf.theme.Appearance
+  }
+});
Index: source/class/pf/ui/ColorPopup.js
===================================================================
--- source/class/pf/ui/ColorPopup.js	(revision 146)
+++ source/class/pf/ui/ColorPopup.js	(revision 146)
@@ -0,0 +1,33 @@
+qx.Class.define("pf.ui.ColorPopup",
+{
+    extend: qx.ui.control.ColorPopup,
+    
+    construct: function(colors) {
+        this.base(arguments);
+        this.setFocusable(true);
+        this._remove(this.getChildControl("auto-button"));
+
+        if (colors) {
+            var clength = colors.length;
+            for (var i = 0; i < this.__fieldNumber && i < clength; i++) {
+                var field = this.getChildControl("field#" + i);
+                field.setBackgroundColor(colors[i]);
+            }
+        }
+
+        this.addListener("keypress", function(ev) {
+                if (ev.getKeyIdentifier() == "Escape") {
+                    this.hide()
+                }
+            });
+    },
+    
+    members:
+    {
+        open: function()
+        {
+            this.show();
+            this.focus();
+        }
+    }
+});
Index: urce/class/pf/ui/ComboBox.js
===================================================================
--- source/class/pf/ui/ComboBox.js	(revision 72)
+++ 	(revision )
@@ -1,33 +1,0 @@
-qx.Class.define("pf.ui.ComboBox",
-{
-    extend: qx.legacy.ui.form.ComboBox,
-    
-    members:
-    {
-        addNumItem: function(vText, vValue)
-        {
-            var item = new qx.legacy.ui.form.ListItem(vText, null, vValue.toString());
-            this.add(item);
-            
-            return item;
-        },
-        
-        getSelectedValue: function()
-        {
-            var item = this.getSelected();
-            if (item) {
-                return item.getValue();
-            } else {
-                return null;
-            }
-        },
-
-        selectByValue: function(value)
-        {
-            var item = this.getList().findValueExact(value);
-            if (item) {
-                this.setSelected(item);
-            }
-        }
-    }
-});
Index: source/class/pf/ui/SelectBox.js
===================================================================
--- source/class/pf/ui/SelectBox.js	(revision 146)
+++ source/class/pf/ui/SelectBox.js	(revision 146)
@@ -0,0 +1,40 @@
+qx.Class.define("pf.ui.SelectBox",
+{
+    extend: qx.ui.form.SelectBox,
+    
+    members:
+    {
+        addItem: function(vText, vValue)
+        {
+            var item = new qx.ui.form.ListItem(vText, null, vValue);
+            this.add(item);
+            
+            return item;
+        },
+        
+        addNumItem: function(vText, vValue)
+        {
+            var item = new qx.ui.form.ListItem(vText, null, vValue.toString());
+            this.add(item);
+            
+            return item;
+        },
+        
+        getSelectedValue: function()
+        {
+            var items = this.getChildControl("list").getSelection();
+            if (items && items.length == 1) {
+                return items[0].getModel();
+            } else {
+                return null;
+            }
+        },
+
+        selectByValue: function(value)
+        {
+            var list = this.getChildControl("list");
+            var models = new Array(value);
+            list.setModelSelection(models);
+        }
+    }
+});
Index: urce/class/pf/ui/Spinner.js
===================================================================
--- source/class/pf/ui/Spinner.js	(revision 72)
+++ 	(revision )
@@ -1,10 +1,0 @@
-qx.Class.define("pf.ui.Spinner",
-{
-    extend: qx.legacy.ui.form.Spinner,
-    
-    construct: function(vMin, vValue, vMax) {
-        this.base(arguments, vMin, vValue, vMax);
-        // Fix a bug in Qooxdoo (as of 0.7.2 at least)
-        this._textfield.removeListener("input", this._oninput, this);
-    }
-});
Index: source/class/pf/ui/TextField.js
===================================================================
--- source/class/pf/ui/TextField.js	(revision 79)
+++ source/class/pf/ui/TextField.js	(revision 146)
@@ -2,5 +2,5 @@
 qx.Class.define("pf.ui.TextField",
 {
-    extend: qx.legacy.ui.form.TextField,
+    extend: qx.ui.form.TextField,
     
     construct: function(v) {
Index: source/class/pf/ui/canvas/Canvas.js
===================================================================
--- source/class/pf/ui/canvas/Canvas.js	(revision 72)
+++ source/class/pf/ui/canvas/Canvas.js	(revision 146)
@@ -1,11 +1,12 @@
 qx.Class.define("pf.ui.canvas.Canvas",
 {
-    extend: qx.legacy.ui.basic.Atom,
+    extend: qx.ui.core.Widget,
     
     construct: function() {
         this.base(arguments);
+        
         this.addListener("appear", function(e) {
                 if (!this.jg) {
-                    var element = this.getElement();
+                    var element = this.getContainerElement().getDomElement();
                     this.jg = new jsGraphics(element);
                     // FIXME: get from qx
@@ -14,5 +15,5 @@
             }, this);
     },
-    
+
     members:
     {
Index: source/class/pf/ui/canvas/Plotter.js
===================================================================
--- source/class/pf/ui/canvas/Plotter.js	(revision 118)
+++ source/class/pf/ui/canvas/Plotter.js	(revision 146)
@@ -46,6 +46,9 @@
     construct: function() {
         this.base(arguments);
+
+        this._setLayout(new qx.ui.layout.Basic());
+
         this.setCursor("crosshair");
-        
+
         var v = new Array;
         v.xmin = 0.1;
@@ -62,29 +65,30 @@
         this.w = w;
 
-        var tracker = new qx.legacy.ui.basic.Atom("X:<br>Y:");
-        tracker.setBorder("groove");
+        var tracker = new qx.ui.basic.Label("X:<br>Y:");
+        tracker.setRich(true);
+        tracker.setDecorator(new qx.ui.decoration.Single(1, "solid", "black"));
         tracker.hide();
         tracker.dp = aPoint();
         tracker.vp = aPoint();
         tracker.wp = aPoint();
-        this.add(tracker);
+        
+        this._add(tracker, {left: 20, top:20});
         this.tracker = tracker;
-        
-        this.setHorizontalChildrenAlign("left");
-        this.setVerticalChildrenAlign("top");
         
         this.addListener("mousemove", function(ev) {
                 var tracker = this.tracker;
-                var el = this.getElement();
-                tracker.dp.x = ev.getPageX() -
-                    qx.legacy.html.Location.getClientInnerLeft(el) - 1;
-                tracker.dp.y = ev.getPageY() -
-                    qx.legacy.html.Location.getClientInnerTop(el) - 1;
+                var el = this.getContainerElement().getDomElement();
+                tracker.dp.x = ev.getViewportLeft() -
+                    qx.bom.element.Location.getLeft(el);
+                tracker.dp.y = ev.getViewportTop() -
+                    qx.bom.element.Location.getTop(el);
                 this.dPoint2vPoint(tracker.dp, tracker.vp);
                 this.vPoint2wPoint(tracker.vp, tracker.wp);
-                tracker.setLabel("X: " + pf.util.Format.numPrint(tracker.wp.x) +
+
+                tracker.setValue("X: " + pf.util.Format.numPrint(tracker.wp.x) +
                     "<br>Y: " + pf.util.Format.numPrint(tracker.wp.y));
-                tracker.setLeft(tracker.dp.x + 12);
-                tracker.setTop(tracker.dp.y - 12);
+
+                tracker.setDomLeft(tracker.dp.x + 12);
+                tracker.setDomTop(tracker.dp.y + 12);
                 
                 if (this.isInsideViewport(tracker.vp)) {
@@ -108,6 +112,7 @@
         vPoint2dPoint: function(vp, p)
         {
-            var width  = this.getWidthValue();
-            var height = this.getHeightValue();
+            var dims   = this.getInnerSize();
+            var width  = dims.width;
+            var height = dims.height;
             
             p.x = Math.round(width*vp.x);
@@ -117,6 +122,7 @@
         dPoint2vPoint: function(dp, vp)
         {
-            var width  = this.getWidthValue();
-            var height = this.getHeightValue();
+            var dims   = this.getInnerSize();
+            var width  = dims.width;
+            var height = dims.height;
             
             vp.x = dp.x/width;
@@ -149,6 +155,6 @@
             }
             
-            p1 = aPoint();
-            p2 = aPoint();
+            var p1 = aPoint();
+            var p2 = aPoint();
             
             this.vPoint2dPoint(vp1, p1);
@@ -165,6 +171,6 @@
             }
             
-            p1 = aPoint();
-            p2 = aPoint();
+            var p1 = aPoint();
+            var p2 = aPoint();
             
             this.vPoint2dPoint(vp1, p1);
@@ -197,5 +203,5 @@
             }
             
-            p = aPoint();
+            var p = aPoint();
             
             this.vPoint2dPoint(vp, p);
@@ -241,6 +247,6 @@
             var wp = aPoint();
 
-            dx = new Array;
-            dy = new Array;
+            var dx = new Array;
+            var dy = new Array;
             for (var i = 0; i < x.length; i++) {
                 wp.x = x[i];
@@ -307,4 +313,5 @@
             
             var halign, valign;
+            var wmin, wmax;
             if (axis == "x") {
                 wmin  = w.xmin;
@@ -331,5 +338,5 @@
             var nticks = (nmajor - 1)*2 + 1;
             
-            wstart = Math.floor(wmin/tmajor)*tmajor;
+            var wstart = Math.floor(wmin/tmajor)*tmajor;
             
             for (var i = 0; i < nticks; i++) {
