]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added PERCENTAGE width/height support
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 29 Jan 2007 09:24:53 +0000 (09:24 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 29 Jan 2007 09:24:53 +0000 (09:24 +0000)
svn changeset:340/svn branch:toolkit

src/com/itmill/toolkit/ui/Table.java

index ca423e0076dcc31d0478cbf6314df925e85ea6df..8b0ea67aa75c6da5c1add36f847a858f160fd983 100644 (file)
@@ -2148,23 +2148,23 @@ public class Table extends Select implements Action.Container,
        }
 
        /** Set height units.
-        * Table supports only Sizeable.UNITS_PIXELS and Sizeable.UNITS_ROWS. Setting to any other throws
+        * Table supports only Sizeable.UNITS_PIXELS, Sizeable.UNITS_PERCENTAGE and Sizeable.UNITS_ROWS. Setting to any other throws
         * IllegalArgumentException.
         * @see com.itmill.toolkit.terminal.Sizeable#setHeightUnits(int)
         */
        public void setHeightUnits(int units) {
-               if (units != Sizeable.UNITS_PIXELS && units != Sizeable.UNITS_ROWS)
+               if (units != Sizeable.UNITS_PIXELS && units != Sizeable.UNITS_ROWS && units != Sizeable.UNITS_PERCENTAGE)
                        throw new IllegalArgumentException();
                this.heightUnit = units;
        }
 
        /** Set width units.
-        *  Tabel supports only Sizeable.UNITS_PIXELS. Setting to any other throws
+        *  Tabel supports only Sizeable.UNITS_PIXELS and Sizeable.UNITS_PERCENTAGE. Setting to any other throws
         * IllegalArgumentException.
         * @see com.itmill.toolkit.terminal.Sizeable#setWidthUnits(int)
         */
        public void setWidthUnits(int units) {
-               if (units != Sizeable.UNITS_PIXELS)
+               if (units != Sizeable.UNITS_PIXELS && units != Sizeable.UNITS_PERCENTAGE)
                        throw new IllegalArgumentException();
                this.heightUnit = units;
        }