diff options
author | Marko Grönroos <magi@iki.fi> | 2008-08-29 11:10:46 +0000 |
---|---|---|
committer | Marko Grönroos <magi@iki.fi> | 2008-08-29 11:10:46 +0000 |
commit | fed159396c52901384235e04a2bd3ab969faf74c (patch) | |
tree | 90e8d40d387fc6dc8fcd374994d9b128903d4c8e /src/com/itmill/toolkit/tests/book/TableExample.java | |
parent | 53581fe5a7620a6f1add3c0781f3a6477c5c1ab1 (diff) | |
download | vaadin-framework-fed159396c52901384235e04a2bd3ab969faf74c.tar.gz vaadin-framework-fed159396c52901384235e04a2bd3ab969faf74c.zip |
Updated book examples. Table examples, formatting.
svn changeset:5304/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/tests/book/TableExample.java')
-rw-r--r-- | src/com/itmill/toolkit/tests/book/TableExample.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/com/itmill/toolkit/tests/book/TableExample.java b/src/com/itmill/toolkit/tests/book/TableExample.java index cac01d204c..80c5dad3b0 100644 --- a/src/com/itmill/toolkit/tests/book/TableExample.java +++ b/src/com/itmill/toolkit/tests/book/TableExample.java @@ -26,19 +26,16 @@ public class TableExample extends CustomComponent { 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))], |