]> source.dussan.org Git - vaadin-framework.git/commitdiff
Table width / height set
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 7 Feb 2007 11:19:37 +0000 (11:19 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 7 Feb 2007 11:19:37 +0000 (11:19 +0000)
svn changeset:510/svn branch:toolkit

src/com/itmill/toolkit/demo/features/FeatureTable.java

index fe117c29219cf334bab148792c232663c6b18eef..3dd0168eb048acbccc655af47191935ef762a4c1 100644 (file)
@@ -29,6 +29,7 @@
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.event.Action;
+import com.itmill.toolkit.terminal.Sizeable;
 import com.itmill.toolkit.ui.*;
 
 public class FeatureTable extends Feature implements Action.Handler {
@@ -80,9 +81,11 @@ public class FeatureTable extends Feature implements Action.Handler {
                t.addContainerProperty("Age", String.class, "");
                t.addContainerProperty("Eyecolor", String.class, "");
                t.addContainerProperty("Haircolor", String.class, "");
+               t.setHeight(250);
+               t.setWidth(400);
 
                // Add random rows to table
-               for (int j = 0; j < 500; j++) {
+               for (int j = 0; j < 300; j++) {
                        Object id = t
                                        .addItem(
                                                        new Object[] {
@@ -102,7 +105,7 @@ public class FeatureTable extends Feature implements Action.Handler {
                Form ap = propertyPanel.createBeanPropertySet(new String[] {
                                "pageLength", "rowHeaderMode", "selectable",
                                "columnHeaderMode", "columnCollapsingAllowed",
-                               "columnReorderingAllowed" });
+                               "columnReorderingAllowed", "width", "height" });
                ap.replaceWithSelect("columnHeaderMode", new Object[] {
                                new Integer(Table.COLUMN_HEADER_MODE_EXPLICIT),
                                new Integer(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID),