]> source.dussan.org Git - vaadin-framework.git/commitdiff
OrderedLayout now handles alignments for HorizontalLayouts correctly +
authorJohn Ahlroos <john@vaadin.com>
Fri, 28 Sep 2012 13:34:00 +0000 (16:34 +0300)
committerJohn Ahlroos <john@vaadin.com>
Fri, 28 Sep 2012 13:34:00 +0000 (16:34 +0300)
handles dynamic setPrimaryStyle better #9724

client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java
client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java
client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java

index 40c99a238856e4dcc0c0120f4d3d90efd21235e1..b1ebebe1a9bba8891ee2b1d33d3b95b5e1e336e5 100644 (file)
@@ -28,7 +28,13 @@ public class VHorizontalLayout extends VOrderedLayout {
      * Default constructor
      */
     public VHorizontalLayout() {
+        super(false);
         setStyleName(CLASSNAME);
+    }
+
+    @Override
+    public void setStyleName(String style) {
+        super.setStyleName(style);
         addStyleName(StyleConstants.UI_LAYOUT);
         addStyleName("v-horizontal");
     }
index 177af7c35002021030c8c38a9c7929ffcd941f10..e9cdc42b86113818367b24ef0eb0c3f957d98cea 100644 (file)
@@ -57,6 +57,10 @@ public class VOrderedLayout extends FlowPanel {
     private LayoutManager layoutManager;
 
 
+    public VOrderedLayout(boolean vertical) {
+        this.vertical = vertical;
+    }
+
     /**
      * Add or move a slot to another index
      * 
index 7b89bb0269c38f2d99c322ea8bd59505f5d3b491..bea85f7cee8de69c0e5123f78d22ce0c3d1c270b 100644 (file)
@@ -28,6 +28,7 @@ public class VVerticalLayout extends VOrderedLayout {
      * Default constructor
      */
     public VVerticalLayout() {
+        super(true);
         setStyleName(CLASSNAME);
     }