aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/tests/magi/TableExample.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
committerMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
commitf2e3722df9676436680afc0f1991e91e1696fb99 (patch)
tree6f255ff78abaf96f1e71a1f2c9ecd3b66647f4a2 /src/com/itmill/toolkit/tests/magi/TableExample.java
parent93291f532db9d545cf2a8dd98e2671f27cd197b0 (diff)
downloadvaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.tar.gz
vaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.zip
MASS REFORMAT.
According to http://toolkit.intra.itmill.com/trac/itmilltoolkit/wiki/CodingConventions svn changeset:2864/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/tests/magi/TableExample.java')
-rw-r--r--src/com/itmill/toolkit/tests/magi/TableExample.java84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/com/itmill/toolkit/tests/magi/TableExample.java b/src/com/itmill/toolkit/tests/magi/TableExample.java
index e9431d0015..989fc863cc 100644
--- a/src/com/itmill/toolkit/tests/magi/TableExample.java
+++ b/src/com/itmill/toolkit/tests/magi/TableExample.java
@@ -5,46 +5,46 @@ import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.Table;
public class TableExample extends CustomComponent {
- /* Create the table with a caption. */
- Table table = new Table("This is a Table");
-
- /* A layout needed for the example. */
- OrderedLayout layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
-
- TableExample() {
- setCompositionRoot(layout);
- 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);
-
- /* 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" };
-
- /* Add some items in the table and assign them an Item ID (IID). */
- for (int i = 0; i < 500; i++) {
- /* Add a randomly generated item in the Table. */
- table
- .addItem(
- new Object[] {
- firstnames[(int) (Math.random() * (firstnames.length - 0.01))],
- lastnames[(int) (Math.random() * (lastnames.length - 0.01))],
- new Integer(
- (int) (1900 + Math.random() * 100)) },
- new Integer(i));
- }
-
- /* Set the number of items visible in the table. */
- table.setPageLength(10);
-
- table.setStyle("twincol");
- table.setColumnReorderingAllowed(true);
- table.setColumnCollapsingAllowed(true);
- }
+ /* Create the table with a caption. */
+ Table table = new Table("This is a Table");
+
+ /* A layout needed for the example. */
+ OrderedLayout layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
+
+ TableExample() {
+ setCompositionRoot(layout);
+ 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);
+
+ /* 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" };
+
+ /* Add some items in the table and assign them an Item ID (IID). */
+ for (int i = 0; i < 500; i++) {
+ /* Add a randomly generated item in the Table. */
+ table
+ .addItem(
+ new Object[] {
+ firstnames[(int) (Math.random() * (firstnames.length - 0.01))],
+ lastnames[(int) (Math.random() * (lastnames.length - 0.01))],
+ new Integer(
+ (int) (1900 + Math.random() * 100)) },
+ new Integer(i));
+ }
+
+ /* Set the number of items visible in the table. */
+ table.setPageLength(10);
+
+ table.setStyle("twincol");
+ table.setColumnReorderingAllowed(true);
+ table.setColumnCollapsingAllowed(true);
+ }
}