height: 54px; /* 3*18px = 54px. */
}
+/******************************************************************************
+ * For TableCellStyle.java.
+ ******************************************************************************/
+/* Center the text in header. */
+.i-table-header-cell {
+ text-align: center;
+}
+
+/* Basic style for all cells. */
+.i-table-checkerboard .i-table-cell-content {
+ text-align: center;
+ vertical-align: middle;
+ padding-top: 12px;
+ width: 20px;
+ height: 28px;
+}
+
+/* Style specifically for the row header cells. */
+.i-table-cell-content-rowheader {
+ background: #E7EDF3 url(../default/table/img/header-bg.png) repeat-x scroll 0 0;
+}
+
+/* Style specifically for the "white" cells. */
+.i-table-cell-content-white {
+ background: white;
+ color: black;
+}
+
+/* Style specifically for the "black" cells. */
+.i-table-cell-content-black {
+ background: black;
+ color: white;
+}
+
/*****************************************************************************/
/* For example_Tree() */
/*****************************************************************************/
main.addComponent(new TableEditable());
} else if (param.equals("bean")) {
main.addComponent(new TableEditableBean());
+ } else if (param.equals("long")) {
+ main.addComponent(new TableExample());
+ } else if (param.equals("cellstyle")) {
+ main.addComponent(new TableCellStyle());
+ } else if (param.equals("huge")) {
+ main.addComponent(new TableHuge());
} else if (param.equals("paging")) {
PagingTable table = new PagingTable();
table.addContainerProperty("Column 1", String.class, null);
layout.addComponent(table);
/* Define the names, data types, and default values of columns. */
- table.addContainerProperty("First Name", String.class,
- "(no first name)");
- table.addContainerProperty("Last Name", String.class, "(no last name)");
- table.addContainerProperty("Year", Integer.class, null);
+ table.addContainerProperty("First Name", String.class, "(no first name)");
+ table.addContainerProperty("Last Name", String.class, "(no last name)");
+ table.addContainerProperty("Year", Integer.class, null);
/* We use these entries to generate random items in a table. */
- final String[] firstnames = new String[] { "Donald", "Patty", "Sally",
- "Douglas" };
- final String[] lastnames = new String[] { "Smith", "Jones", " Adams",
- "Knuth" };
+ final String[] firstnames = new String[] { "Donald", "Patty", "Sally", "Douglas" };
+ final String[] lastnames = new String[] { "Smith", "Jones", "Adams", "Knuth" };
/* Add some items in the table and assign them an Item ID (IID). */
- for (int i = 0; i < 500; i++) {
+ for (int i = 0; i < 1000; i++) {
/* Add a randomly generated item in the Table. */
table.addItem(new Object[] {
firstnames[(int) (Math.random() * (firstnames.length - 0.01))],
package com.itmill.toolkit.tests.book;
-import com.itmill.toolkit.data.Property;
-import com.itmill.toolkit.data.Property.ValueChangeEvent;
import com.itmill.toolkit.ui.CustomComponent;
-import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.Table;