]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2298. CustomLayout now 100% width by default
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 9 Dec 2008 10:11:04 +0000 (10:11 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 9 Dec 2008 10:11:04 +0000 (10:11 +0000)
svn changeset:6128/svn branch:trunk

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

index 82ca404a13c3d5d775b953cb0328de0a90ad4192..8b78699c626682e99c7b0b2b015fff9a71e56716 100644 (file)
@@ -17,18 +17,17 @@ import com.itmill.toolkit.terminal.PaintTarget;
  * <p>
  * A container component with freely designed layout and style. The layout
  * consists of items with textually represented locations. Each item contains
- * one sub-component, which can be any Toolkit component, such as a layout.
- * The adapter and theme are responsible for rendering the
- * layout with a given style by placing the items in the defined
- * locations.
+ * one sub-component, which can be any Toolkit component, such as a layout. The
+ * adapter and theme are responsible for rendering the layout with a given style
+ * by placing the items in the defined locations.
  * </p>
  * 
  * <p>
  * The placement of the locations is not fixed - different themes can define the
  * locations in a way that is suitable for them. One typical example would be to
  * create visual design for a web site as a custom layout: the visual design
- * would define locations for "menu", "body", and "title", for example. The layout
- * would then be implemented as an XHTML template for each theme.
+ * would define locations for "menu", "body", and "title", for example. The
+ * layout would then be implemented as an XHTML template for each theme.
  * </p>
  * 
  * <p>
@@ -83,6 +82,7 @@ public class CustomLayout extends AbstractLayout {
         }
 
         templateContents = b.toString();
+        setWidth(100, UNITS_PERCENTAGE);
     }
 
     /**
@@ -91,6 +91,7 @@ public class CustomLayout extends AbstractLayout {
      */
     public CustomLayout(String template) {
         templateName = template;
+        setWidth(100, UNITS_PERCENTAGE);
     }
 
     /**