]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7338 Column alignment cannot be changed from right/center to left
authorArtur Signell <artur.signell@itmill.com>
Mon, 1 Aug 2011 10:10:36 +0000 (10:10 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 1 Aug 2011 10:10:36 +0000 (10:10 +0000)
svn changeset:20053/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
src/com/vaadin/ui/Table.java

index 34362166602f13aef772c873234f91ed8f21516a..069b070bd80d98609e2f5954f6ad44b3bdc25f97 100644 (file)
@@ -2673,6 +2673,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
 
                 if (col.hasAttribute("align")) {
                     c.setAlign(col.getStringAttribute("align").charAt(0));
+                } else {
+                    c.setAlign(ALIGN_LEFT);
+
                 }
                 if (col.hasAttribute("width")) {
                     final String widthStr = col.getStringAttribute("width");
@@ -3459,6 +3462,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
 
                 if (col.hasAttribute("align")) {
                     c.setAlign(col.getStringAttribute("align").charAt(0));
+                } else {
+                    c.setAlign(ALIGN_LEFT);
+
                 }
                 if (col.hasAttribute("width")) {
                     final String width = col.getStringAttribute("width");
index 9a091271a916029cc356898615be665fdaaae1d4..572dececc32f274ce45d17d54f6b4478c15ec7ee 100644 (file)
@@ -1089,11 +1089,10 @@ public class Table extends AbstractSelect implements Action.Container,
 
         if (alignment == null || alignment.equals(ALIGN_LEFT)) {
             columnAlignments.remove(propertyId);
-            return;
+        } else {
+            columnAlignments.put(propertyId, alignment);
         }
 
-        columnAlignments.put(propertyId, alignment);
-
         // Assures the visual refresh
         refreshRenderedCells();
     }