From: Leif Åstrand Date: Thu, 23 Feb 2012 14:47:42 +0000 (+0200) Subject: Rename definedHeight/Width -> declaredHeight/Width (#8313) X-Git-Tag: 7.0.0.alpha2~434^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=480cd8ff49eb16925877fb9b954cd2837dd0c828;p=vaadin-framework.git Rename definedHeight/Width -> declaredHeight/Width (#8313) --- diff --git a/src/com/vaadin/terminal/gwt/client/VPaintableWidget.java b/src/com/vaadin/terminal/gwt/client/VPaintableWidget.java index 52740e59a1..39bd2d21b8 100644 --- a/src/com/vaadin/terminal/gwt/client/VPaintableWidget.java +++ b/src/com/vaadin/terminal/gwt/client/VPaintableWidget.java @@ -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(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java b/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java index c7f5c59754..ab09b5d60b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java @@ -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; } /** diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java index 508f90a7e1..72cc550651 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java @@ -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(); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java index a869202119..0b5c43d30f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java @@ -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