summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-26 15:45:06 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-26 15:45:06 +0300
commit1888d8fdcb32f8111122430cf8c6f782287d97f6 (patch)
tree79e4b74c73f83470d31118db68ab9169da142b3a
parent8018dfba499dc1ca93459c0fba87ceceb4af6768 (diff)
downloadvaadin-framework-1888d8fdcb32f8111122430cf8c6f782287d97f6.tar.gz
vaadin-framework-1888d8fdcb32f8111122430cf8c6f782287d97f6.zip
Added TableState with default primary style name #9724
-rw-r--r--client/src/com/vaadin/client/ui/table/TableConnector.java6
-rw-r--r--client/src/com/vaadin/client/ui/table/VScrollTable.java4
-rw-r--r--shared/src/com/vaadin/shared/ui/table/TableState.java10
3 files changed, 16 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java
index 301a9464a0..e5e8cbb9ad 100644
--- a/client/src/com/vaadin/client/ui/table/TableConnector.java
+++ b/client/src/com/vaadin/client/ui/table/TableConnector.java
@@ -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();
}
/**
diff --git a/client/src/com/vaadin/client/ui/table/VScrollTable.java b/client/src/com/vaadin/client/ui/table/VScrollTable.java
index f295758603..f4c881d26d 100644
--- a/client/src/com/vaadin/client/ui/table/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/table/VScrollTable.java
@@ -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
index 0000000000..58e6850f31
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/table/TableState.java
@@ -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;
+ }
+}