summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-28 16:34:00 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-28 16:34:00 +0300
commit4c92f1927d4cfc81fca41e1ab24b5c95d1b70a68 (patch)
tree5061deb835f9a1a0a1607a425094a7bb5412bcb3 /client
parent4a244823d6be091f7bf0b13d0e2d9989f3e84a0b (diff)
downloadvaadin-framework-4c92f1927d4cfc81fca41e1ab24b5c95d1b70a68.tar.gz
vaadin-framework-4c92f1927d4cfc81fca41e1ab24b5c95d1b70a68.zip
OrderedLayout now handles alignments for HorizontalLayouts correctly +
handles dynamic setPrimaryStyle better #9724
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java6
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java4
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java1
3 files changed, 11 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java
index 40c99a2388..b1ebebe1a9 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java
@@ -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");
}
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java
index 177af7c350..e9cdc42b86 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java
@@ -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
*
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java
index 7b89bb0269..bea85f7cee 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java
@@ -28,6 +28,7 @@ public class VVerticalLayout extends VOrderedLayout {
* Default constructor
*/
public VVerticalLayout() {
+ super(true);
setStyleName(CLASSNAME);
}