]> source.dussan.org Git - vaadin-framework.git/commitdiff
experimental expand feature for ordered layout
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 17 Oct 2008 13:08:25 +0000 (13:08 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 17 Oct 2008 13:08:25 +0000 (13:08 +0000)
svn changeset:5659/svn branch:trunk

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

index e01b21902eb7736232ca6500dfdfa404e91d3053..7e7ee27f637480eb74dab10dd018deedf8d3ef7e 100644 (file)
@@ -106,6 +106,17 @@ public class OrderedLayout extends AbstractLayout implements
         requestRepaint();
     }
 
+    /**
+     * TODO
+     * 
+     * @param c
+     * @param expandRatio
+     */
+    public void addComponent(Component c, float expandRatio) {
+        addComponent(c);
+        setExpandRatio(c, expandRatio);
+    }
+
     /**
      * Adds a component into this container. The component is added to the left
      * or on top of the other components.
@@ -144,6 +155,7 @@ public class OrderedLayout extends AbstractLayout implements
         super.removeComponent(c);
         components.remove(c);
         componentToAlignment.remove(c);
+        componentToExpandRatio.remove(c);
         requestRepaint();
     }