]> source.dussan.org Git - vaadin-framework.git/commitdiff
TC for #2457
authorMarc Englund <marc.englund@itmill.com>
Tue, 13 Jan 2009 14:08:58 +0000 (14:08 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 13 Jan 2009 14:08:58 +0000 (14:08 +0000)
svn changeset:6521/svn branch:trunk

src/com/itmill/toolkit/tests/components/table/TableItemIcon.java [new file with mode: 0644]
src/com/itmill/toolkit/tests/components/table/fi.gif [new file with mode: 0755]
src/com/itmill/toolkit/tests/components/table/se.gif [new file with mode: 0755]

diff --git a/src/com/itmill/toolkit/tests/components/table/TableItemIcon.java b/src/com/itmill/toolkit/tests/components/table/TableItemIcon.java
new file mode 100644 (file)
index 0000000..2b49e7a
--- /dev/null
@@ -0,0 +1,33 @@
+package com.itmill.toolkit.tests.components.table;
+
+import com.itmill.toolkit.data.Item;
+import com.itmill.toolkit.terminal.ClassResource;
+import com.itmill.toolkit.terminal.Resource;
+import com.itmill.toolkit.tests.components.TestBase;
+import com.itmill.toolkit.ui.Table;
+
+public class TableItemIcon extends TestBase {
+
+    @Override
+    protected String getDescription() {
+        return "The items in the Table should have icons in the first column (rowheader).";
+    }
+
+    @Override
+    protected void setup() {
+        Table table = new Table();
+        table.addContainerProperty("icon", Resource.class, null);
+        table.setItemIconPropertyId("icon");
+        table.setRowHeaderMode(Table.ROW_HEADER_MODE_ICON_ONLY);
+        getLayout().addComponent(table);
+
+        Item item = table.addItem("FI");
+        item.getItemProperty("icon").setValue(
+                new ClassResource("fi.gif", TableItemIcon.this));
+        item = table.addItem("SE");
+        item.getItemProperty("icon").setValue(
+                new ClassResource("se.gif", TableItemIcon.this));
+
+    }
+
+}
diff --git a/src/com/itmill/toolkit/tests/components/table/fi.gif b/src/com/itmill/toolkit/tests/components/table/fi.gif
new file mode 100755 (executable)
index 0000000..8d3a191
Binary files /dev/null and b/src/com/itmill/toolkit/tests/components/table/fi.gif differ
diff --git a/src/com/itmill/toolkit/tests/components/table/se.gif b/src/com/itmill/toolkit/tests/components/table/se.gif
new file mode 100755 (executable)
index 0000000..80f6285
Binary files /dev/null and b/src/com/itmill/toolkit/tests/components/table/se.gif differ