summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractOrderedLayout.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-02-14 13:50:12 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-03-08 13:59:05 +0200
commit85bb775c32526a3657a912f326249d7dadb4f6f0 (patch)
treef21881fa2a43f1b9938d929df0f2f48a29651c6a /server/src/com/vaadin/ui/AbstractOrderedLayout.java
parent0e8ce22d2b2fde5576c9b8e42135a297c6992d79 (diff)
downloadvaadin-framework-85bb775c32526a3657a912f326249d7dadb4f6f0.tar.gz
vaadin-framework-85bb775c32526a3657a912f326249d7dadb4f6f0.zip
Read GridLayout component alignments from declarative files (#19536)
Change-Id: I1bfb5c7416d10d4872b2b0c217422ca0427a5b1d
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractOrderedLayout.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index e0dbcb004b..f517ab0af5 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -31,7 +31,6 @@ import com.vaadin.server.Sizeable;
import com.vaadin.shared.Connector;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
-import com.vaadin.shared.ui.AlignmentInfo;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
@@ -486,22 +485,8 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
Component newChild = designContext.readDesign(childComponent);
addComponent(newChild);
// handle alignment
- int bitMask = 0;
- if (attr.hasKey(":middle")) {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_VERTICAL_CENTER;
- } else if (attr.hasKey(":bottom")) {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_BOTTOM;
- } else {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_TOP;
- }
- if (attr.hasKey(":center")) {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_HORIZONTAL_CENTER;
- } else if (attr.hasKey(":right")) {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_RIGHT;
- } else {
- bitMask += AlignmentInfo.Bits.ALIGNMENT_LEFT;
- }
- setComponentAlignment(newChild, new Alignment(bitMask));
+ setComponentAlignment(newChild,
+ DesignAttributeHandler.readAlignment(attr));
// handle expand ratio
if (attr.hasKey(":expand")) {
String value = attr.get(":expand");