aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-02 09:17:27 +0300
committerJohn Ahlroos <john@vaadin.com>2012-10-02 09:17:27 +0300
commit76b0655b29ed8aa4b1287f2b68322ed1f9c58faa (patch)
tree4f33ee7ce9f6cf534de53087db6172f9a36ffd6f /client
parentbe8ee9606012d3c3369e33e855673e8b9424139c (diff)
downloadvaadin-framework-76b0655b29ed8aa4b1287f2b68322ed1f9c58faa.tar.gz
vaadin-framework-76b0655b29ed8aa4b1287f2b68322ed1f9c58faa.zip
Fixed Table to change child element style names when primary stylename is changed #9724
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/table/VScrollTable.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/table/VScrollTable.java b/client/src/com/vaadin/client/ui/table/VScrollTable.java
index fe0530cff1..2955a99189 100644
--- a/client/src/com/vaadin/client/ui/table/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/table/VScrollTable.java
@@ -555,6 +555,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
@Override
public void setStyleName(String style) {
+ updateStyleNames(style, false);
+ }
+
+ @Override
+ public void setStylePrimaryName(String style) {
+ updateStyleNames(style, true);
+ }
+
+ private void updateStyleNames(String newStyle, boolean isPrimary) {
scrollBodyPanel
.removeStyleName(getStylePrimaryName() + "-body-wrapper");
scrollBodyPanel.removeStyleName(getStylePrimaryName() + "-body");
@@ -564,7 +573,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
+ "-body-noselection");
}
- super.setStyleName(style);
+ if (isPrimary) {
+ super.setStylePrimaryName(newStyle);
+ } else {
+ super.setStyleName(newStyle);
+ }
scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body-wrapper");
scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body");
@@ -577,7 +590,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
}
-
public void init(ApplicationConnection client) {
this.client = client;
// Add a handler to clear saved context menu details when the menu