You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/09/04 02:49:28 UTC

svn commit: r811192 - /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java

Author: tvolkert
Date: Fri Sep  4 00:49:28 2009
New Revision: 811192

URL: http://svn.apache.org/viewvc?rev=811192&view=rev
Log:
Made TablePane.Row implement Iterable<Component>

Modified:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java?rev=811192&r1=811191&r2=811192&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TablePane.java Fri Sep  4 00:49:28 2009
@@ -16,8 +16,11 @@
  */
 package org.apache.pivot.wtk;
 
+import java.util.Iterator;
+
 import org.apache.pivot.collections.ArrayList;
 import org.apache.pivot.collections.Sequence;
+import org.apache.pivot.util.ImmutableIterator;
 import org.apache.pivot.util.ListenerList;
 
 
@@ -29,7 +32,7 @@
     /**
      * Represents a table pane row.
      */
-    public static final class Row implements Sequence<Component> {
+    public static final class Row implements Sequence<Component>, Iterable<Component> {
         private int height;
         private boolean relative;
         private boolean highlighted;
@@ -294,6 +297,11 @@
         public int getLength() {
             return cells.getLength();
         }
+
+        @Override
+        public Iterator<Component> iterator() {
+            return new ImmutableIterator<Component>(cells.iterator());
+        }
     }
 
     /**