]> source.dussan.org Git - vaadin-framework.git/commitdiff
Rename definedHeight/Width -> declaredHeight/Width (#8313)
authorLeif Åstrand <leif@vaadin.com>
Thu, 23 Feb 2012 14:47:42 +0000 (16:47 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 23 Feb 2012 14:47:42 +0000 (16:47 +0200)
src/com/vaadin/terminal/gwt/client/VPaintableWidget.java
src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java
src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java
src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java

index 52740e59a10030652805e7a540b4dd91a0dae3d0..39bd2d21b8579fbda83e36749d3b0c06d286cb65 100644 (file)
@@ -76,12 +76,12 @@ public interface VPaintableWidget extends VPaintable {
      * 
      * @return the server side width definition
      */
-    public String getDefinedWidth();
+    public String getDeclaredWidth();
 
     /**
      * Gets the height of this paintable as defined on the server.
      * 
      * @return the server side height definition
      */
-    public String getDefinedHeight();
+    public String getDeclaredHeight();
 }
index c7f5c5975445e787b535e2c95be2597db1fea15e..ab09b5d60b936267d65d57125b8440bff57c8472 100644 (file)
@@ -30,8 +30,8 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
     private boolean enabled = true;
     private boolean visible = true;
 
-    private String definedWidth = "";
-    private String definedHeight = "";
+    private String declaredWidth = "";
+    private String declaredHeight = "";
 
     /**
      * Default constructor
@@ -198,22 +198,22 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
 
         // Parent should be updated if either dimension changed between relative
         // and non-relative
-        if (w.endsWith("%") != definedWidth.endsWith("%")) {
+        if (w.endsWith("%") != declaredWidth.endsWith("%")) {
             VPaintableWidgetContainer parent = getParent();
             if (parent != null) {
                 parent.getMeasuredSize().setWidthNeedsUpdate();
             }
         }
 
-        if (h.endsWith("%") != definedHeight.endsWith("%")) {
+        if (h.endsWith("%") != declaredHeight.endsWith("%")) {
             VPaintableWidgetContainer parent = getParent();
             if (parent != null) {
                 parent.getMeasuredSize().setHeightNeedsUpdate();
             }
         }
 
-        definedWidth = w;
-        definedHeight = h;
+        declaredWidth = w;
+        declaredHeight = h;
 
         // Set defined sizes
         Widget component = getWidgetForPaintable();
@@ -226,27 +226,27 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
     }
 
     public boolean isRelativeHeight() {
-        return definedHeight.endsWith("%");
+        return declaredHeight.endsWith("%");
     }
 
     public boolean isRelativeWidth() {
-        return definedWidth.endsWith("%");
+        return declaredWidth.endsWith("%");
     }
 
     public boolean isUndefinedHeight() {
-        return definedHeight.length() == 0;
+        return declaredHeight.length() == 0;
     }
 
     public boolean isUndefinedWidth() {
-        return definedWidth.length() == 0;
+        return declaredWidth.length() == 0;
     }
 
-    public String getDefinedHeight() {
-        return definedHeight;
+    public String getDeclaredHeight() {
+        return declaredHeight;
     }
 
-    public String getDefinedWidth() {
-        return definedWidth;
+    public String getDeclaredWidth() {
+        return declaredWidth;
     }
 
     /**
index 508f90a7e1d504a8b1faa7b0ea1c7a9efb4605de..72cc55065111a90e39c6af1a5ef04337cba05ce3 100644 (file)
@@ -251,9 +251,9 @@ public abstract class VMeasuringOrderedLayoutPaintable extends
 
     private String getDefinedSize(boolean isVertical) {
         if (isVertical) {
-            return getDefinedHeight();
+            return getDeclaredHeight();
         } else {
-            return getDefinedWidth();
+            return getDeclaredWidth();
         }
     }
 
index a8692021190843105c8c5437904ceb2034cab9c3..0b5c43d30f1f56f527cc1a1d72aaa3960c929929 100644 (file)
@@ -912,7 +912,7 @@ public class VTabsheet extends VTabsheetBase {
         if (!isDynamicWidth()) {
             VPaintableWidget paintable = VPaintableMap.get(client)
                     .getPaintable(this);
-            DOM.setStyleAttribute(tabs, "width", paintable.getDefinedWidth());
+            DOM.setStyleAttribute(tabs, "width", paintable.getDeclaredWidth());
         }
 
         // Make sure scrollerIndex is valid