]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added TableState with default primary style name #9724
authorJohn Ahlroos <john@vaadin.com>
Wed, 26 Sep 2012 12:45:06 +0000 (15:45 +0300)
committerJohn Ahlroos <john@vaadin.com>
Wed, 26 Sep 2012 12:45:06 +0000 (15:45 +0300)
client/src/com/vaadin/client/ui/table/TableConnector.java
client/src/com/vaadin/client/ui/table/VScrollTable.java
shared/src/com/vaadin/shared/ui/table/TableState.java [new file with mode: 0644]

index 301a9464a0a21841889cae541970d0b312cf5750..e5e8cbb9adeb83e2551bc3fba85e72ef4eaa40a7 100644 (file)
@@ -36,9 +36,9 @@ import com.vaadin.client.ui.AbstractComponentContainerConnector;
 import com.vaadin.client.ui.PostLayoutListener;
 import com.vaadin.client.ui.table.VScrollTable.ContextMenuDetails;
 import com.vaadin.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow;
-import com.vaadin.shared.AbstractFieldState;
 import com.vaadin.shared.ui.Connect;
 import com.vaadin.shared.ui.table.TableConstants;
+import com.vaadin.shared.ui.table.TableState;
 
 @Connect(com.vaadin.ui.Table.class)
 public class TableConnector extends AbstractComponentContainerConnector
@@ -340,8 +340,8 @@ public class TableConnector extends AbstractComponentContainerConnector
     }
 
     @Override
-    public AbstractFieldState getState() {
-        return (AbstractFieldState) super.getState();
+    public TableState getState() {
+        return (TableState) super.getState();
     }
 
     /**
index f2957586036ef1efdab0c0342f221974760ea9c0..f4c881d26d5c0d3be5840bee3271352dfc9c07f3 100644 (file)
@@ -132,6 +132,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
         ScrollHandler, VHasDropHandler, FocusHandler, BlurHandler, Focusable,
         ActionOwner {
 
+    public static final String STYLENAME = "v-table";
+
     public enum SelectMode {
         NONE(0), SINGLE(1), MULTI(2);
         private int id;
@@ -542,7 +544,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
             }
         }, ContextMenuEvent.getType());
 
-        setStyleName("v-table");
+        setStyleName(STYLENAME);
 
         add(tHead);
         add(scrollBodyPanel);
diff --git a/shared/src/com/vaadin/shared/ui/table/TableState.java b/shared/src/com/vaadin/shared/ui/table/TableState.java
new file mode 100644 (file)
index 0000000..58e6850
--- /dev/null
@@ -0,0 +1,10 @@
+package com.vaadin.shared.ui.table;
+
+import com.vaadin.client.ui.table.VScrollTable;
+import com.vaadin.shared.AbstractFieldState;
+
+public class TableState extends AbstractFieldState {
+    {
+        primaryStyleName = VScrollTable.STYLENAME;
+    }
+}