diff options
author | Jens Jansson <peppe@vaadin.com> | 2011-12-21 18:22:58 +0200 |
---|---|---|
committer | Jens Jansson <peppe@vaadin.com> | 2011-12-22 12:26:15 +0200 |
commit | a327be687e901dec4108da4d3e747ebf8cf833c7 (patch) | |
tree | 0cf3bc9a0ae1628ce90917c0d562c2cde02eb1d0 /src/com/vaadin/ui/AbstractComponentContainer.java | |
parent | d9f5e4c8054fa3d99f30640c9ac44eb8e850fe50 (diff) | |
download | vaadin-framework-a327be687e901dec4108da4d3e747ebf8cf833c7.tar.gz vaadin-framework-a327be687e901dec4108da4d3e747ebf8cf833c7.zip |
#8019 Fixed Sizable UNITS to use an Enum Unit instead of constants
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponentContainer.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractComponentContainer.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/vaadin/ui/AbstractComponentContainer.java b/src/com/vaadin/ui/AbstractComponentContainer.java index 5d5218307a..bbe2c20ea5 100644 --- a/src/com/vaadin/ui/AbstractComponentContainer.java +++ b/src/com/vaadin/ui/AbstractComponentContainer.java @@ -226,7 +226,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent } @Override - public void setWidth(float width, int unit) { + public void setWidth(float width, Unit unit) { /* * child tree repaints may be needed, due to our fall back support for * invalid relative sizes @@ -237,9 +237,9 @@ public abstract class AbstractComponentContainer extends AbstractComponent // children currently in invalid state may need repaint dirtyChildren = getInvalidSizedChildren(false); } else if ((width == SIZE_UNDEFINED && getWidth() != SIZE_UNDEFINED) - || (unit == UNITS_PERCENTAGE - && getWidthUnits() != UNITS_PERCENTAGE && !ComponentSizeValidator - .parentCanDefineWidth(this))) { + || (unit == Unit.PERCENTAGE + && getWidthUnits() != Unit.PERCENTAGE && !ComponentSizeValidator + .parentCanDefineWidth(this))) { /* * relative width children may get to invalid state if width becomes * invalid. Width may also become invalid if units become percentage @@ -326,7 +326,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent } @Override - public void setHeight(float height, int unit) { + public void setHeight(float height, Unit unit) { /* * child tree repaints may be needed, due to our fall back support for * invalid relative sizes @@ -337,9 +337,9 @@ public abstract class AbstractComponentContainer extends AbstractComponent // children currently in invalid state may need repaint dirtyChildren = getInvalidSizedChildren(true); } else if ((height == SIZE_UNDEFINED && getHeight() != SIZE_UNDEFINED) - || (unit == UNITS_PERCENTAGE - && getHeightUnits() != UNITS_PERCENTAGE && !ComponentSizeValidator - .parentCanDefineHeight(this))) { + || (unit == Unit.PERCENTAGE + && getHeightUnits() != Unit.PERCENTAGE && !ComponentSizeValidator + .parentCanDefineHeight(this))) { /* * relative height children may get to invalid state if height * becomes invalid. Height may also become invalid if units become |