You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/11/17 16:27:32 UTC

svn commit: r881336 - /incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java

Author: gbrown
Date: Tue Nov 17 15:27:31 2009
New Revision: 881336

URL: http://svn.apache.org/viewvc?rev=881336&view=rev
Log:
Revert earlier change to use StringBuffer in ListViews tutorial.

Modified:
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java?rev=881336&r1=881335&r2=881336&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java Tue Nov 17 15:27:31 2009
@@ -51,7 +51,7 @@
         }
 
         private void updateSelection(ListView listView) {
-            StringBuffer selectionText = new StringBuffer("");
+            String selectionText = "";
 
             Sequence<Span> selectedRanges = listView.getSelectedRanges();
             for (int i = 0, n = selectedRanges.getLength(); i < n; i++) {
@@ -61,15 +61,15 @@
                     j <= selectedRange.end;
                     j++) {
                     if (selectionText.length() > 0) {
-                        selectionText.append(", ");
+                        selectionText += ", ";
                     }
 
                     String text = (String)listView.getListData().get(j);
-                    selectionText.append(text);
+                    selectionText += text;
                 }
             }
 
-            selectionLabel.setText(selectionText.toString());
+            selectionLabel.setText(selectionText);
         }
     };