]> source.dussan.org Git - vaadin-framework.git/commitdiff
using size attributes instead of variables for reading size values. Gets cleaner...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 29 Sep 2008 09:17:27 +0000 (09:17 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 29 Sep 2008 09:17:27 +0000 (09:17 +0000)
svn changeset:5537/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java
src/com/itmill/toolkit/terminal/gwt/client/ui/IWindow.java

index bc29be96fbfb1ccbcde5538e5e359f8045f28225..57ac865b25acf0ad98cd8658c672063c1db79fcc 100644 (file)
@@ -92,9 +92,9 @@ public class IPanel extends SimplePanel implements Paintable,
         id = uidl.getId();
 
         // Panel size. Height needs to be saved for later use
-        height = uidl.hasVariable("height") ? uidl.getStringVariable("height")
-                : null;
-        setWidth(uidl.hasVariable("width") ? uidl.getStringVariable("width")
+        height = uidl.hasAttribute("height") ? uidl
+                .getStringAttribute("height") : null;
+        setWidth(uidl.hasAttribute("width") ? uidl.getStringAttribute("width")
                 : "");
 
         // Restore default stylenames
index 41cbff6d01165963bcd78f75e6920ebb653545a5..193b63f660ddb97be30ece69622f9f9f93f9b95c 100644 (file)
@@ -234,8 +234,8 @@ public class IWindow extends PopupPanel implements Paintable, ScrollListener {
          * content area. This is due history as earlier only pixels where
          * allowed.
          */
-        if (uidl.hasVariable("width")) {
-            final String width = uidl.getStringVariable("width");
+        if (uidl.hasAttribute("width")) {
+            final String width = uidl.getStringAttribute("width");
             if (width.indexOf("px") < 0) {
                 /*
                  * Only using non-pixel size for initial size measurement. Then
@@ -255,8 +255,8 @@ public class IWindow extends PopupPanel implements Paintable, ScrollListener {
         }
 
         // Height set after show so we can detect space used by decorations
-        if (uidl.hasVariable("height")) {
-            final String height = uidl.getStringVariable("height");
+        if (uidl.hasAttribute("height")) {
+            final String height = uidl.getStringAttribute("height");
             if (height.indexOf("%") > 0) {
                 int winHeight = Window.getClientHeight();
                 float percent = Float.parseFloat(height.substring(0, height