]> source.dussan.org Git - vaadin-framework.git/commitdiff
Reformatted generated Table column example code.
authorMarko Grönroos <magi@iki.fi>
Fri, 29 Aug 2008 11:12:32 +0000 (11:12 +0000)
committerMarko Grönroos <magi@iki.fi>
Fri, 29 Aug 2008 11:12:32 +0000 (11:12 +0000)
svn changeset:5305/svn branch:trunk

WebContent/ITMILL/themes/example/styles.css
src/com/itmill/toolkit/demo/featurebrowser/GeneratedColumnExample.java

index b68c9cc2bbf622915f12ed0a19dd7e6f13f1bcba..56911914f4729f2fe777c0b435143f67eb15ad5e 100644 (file)
@@ -37,4 +37,5 @@
 .i-label-column-price, .i-label-column-consumption, .i-label-column-dailycost {
     color: blue;
     text-align: right;
-}
\ No newline at end of file
+}
+
index 417828480f97bb88ed7a6b74a195972004bec592..8d9dd3abf7916bdc9acf9d89602fffaefb6f2f4f 100644 (file)
@@ -1,3 +1,7 @@
+/* 
+@ITMillApache2LicenseForJavaFiles@
+ */
+
 package com.itmill.toolkit.demo.featurebrowser;
 
 import java.util.Collection;
@@ -250,25 +254,25 @@ public class GeneratedColumnExample extends CustomComponent {
         }
 
         public boolean isLastId(Object itemId) {
-            return ((Integer) itemId).intValue() == (items.size() - 1);
+            return ((Integer) itemId).intValue() == (items.size()-1);
         }
 
         public Object lastItemId() {
-            return new Integer(items.size() - 1);
+            return new Integer(items.size()-1);
         }
 
         public Object nextItemId(Object itemId) {
             int pos = indexOfId(itemId);
-            if (pos >= items.size() - 1)
+            if (pos >= items.size()-1)
                 return null;
-            return getIdByIndex(pos + 1);
+            return getIdByIndex(pos+1);
         }
 
         public Object prevItemId(Object itemId) {
             int pos = indexOfId(itemId);
             if (pos <= 0)
                 return null;
-            return getIdByIndex(pos - 1);
+            return getIdByIndex(pos-1);
         }
     }
 
@@ -293,15 +297,13 @@ public class GeneratedColumnExample extends CustomComponent {
 
     /** Formats the value in a column containing Double objects. */
     class ValueColumnGenerator implements Table.ColumnGenerator {
-        String format;
-
-        /** Format string for the Double values. */
-
+        String format; /* Format string for the Double values. */
+    
         /** Creates double value column formatter with the given format string. */
         public ValueColumnGenerator(String format) {
             this.format = format;
         }
-
+    
         /**
          * Generates the cell containing the Double value. The column is
          * irrelevant in this use case.
@@ -367,7 +369,7 @@ public class GeneratedColumnExample extends CustomComponent {
 
             // Retrieve the POJOs.
             FillUp fillup = (FillUp) ((BeanItem) indexedSource.getItem(itemId)).getBean();
-            FillUp prev = (FillUp) ((BeanItem) source.getItem(prevItemId)).getBean();
+            FillUp prev   = (FillUp) ((BeanItem) source.getItem(prevItemId)).getBean();
 
             // Do the business logic
             return generateCell(fillup, prev);