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/09/25 14:26:47 UTC

svn commit: r818832 - in /incubator/pivot/trunk: demos/src/org/apache/pivot/demos/rss/ tutorials/src/org/apache/pivot/tutorials/filebrowsing/ tutorials/src/org/apache/pivot/tutorials/stocktracker/ wtk/src/org/apache/pivot/wtk/ wtk/src/org/apache/pivot/...

Author: gbrown
Date: Fri Sep 25 12:26:46 2009
New Revision: 818832

URL: http://svn.apache.org/viewvc?rev=818832&view=rev
Log:
Update ListView.ItemRenderer and TableView.CellRenderer per PIVOT-305.

Modified:
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ChangeCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewColorRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java Fri Sep 25 12:26:46 2009
@@ -133,7 +133,7 @@
         }
 
         @Override
-        public void render(Object item, ListView listView, boolean selected,
+        public void render(Object item, int index, ListView listView, boolean selected,
             boolean checked, boolean highlighted, boolean disabled) {
             if (item != null) {
                 Element itemElement = (Element)item;

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java Fri Sep 25 12:26:46 2009
@@ -63,14 +63,18 @@
                 fileBrowserSheet.open(window, new SheetCloseListener() {
                     @Override
                     public void sheetClosed(Sheet sheet) {
-                        Sequence<File> selectedFiles = fileBrowserSheet.getSelectedFiles();
+                        if (sheet.getResult()) {
+                            Sequence<File> selectedFiles = fileBrowserSheet.getSelectedFiles();
 
-                        ListView listView = new ListView();
-                        listView.setListData(new ArrayList<File>(selectedFiles));
-                        listView.setSelectMode(ListView.SelectMode.NONE);
-                        listView.getStyles().put("backgroundColor", null);
-
-                        Alert.alert(MessageType.INFO, "You selected:", listView, window);
+                            ListView listView = new ListView();
+                            listView.setListData(new ArrayList<File>(selectedFiles));
+                            listView.setSelectMode(ListView.SelectMode.NONE);
+                            listView.getStyles().put("backgroundColor", null);
+
+                            Alert.alert(MessageType.INFO, "You selected:", listView, window);
+                        } else {
+                            Alert.alert(MessageType.INFO, "You didn't select anything.", window);
+                        }
                     }
                 });
             }

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ChangeCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ChangeCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ChangeCellRenderer.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ChangeCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -26,9 +26,11 @@
     public static final Color DOWN_COLOR = new Color(0xff, 0x00, 0x00);
 
     @Override
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
-        super.render(value, tableView, column, rowSelected, rowHighlighted, rowDisabled);
+        super.render(value, rowIndex, columnIndex, tableView, columnName,
+            rowSelected, rowHighlighted, rowDisabled);
 
         if (value != null
             && !rowSelected) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java Fri Sep 25 12:26:46 2009
@@ -70,18 +70,27 @@
          * The item to render, or <tt>null</tt> if called to calculate
          * preferred size.
          *
+         * @param index
+         * The index of the item being rendered, or <tt>-1</tt> if called to
+         * calculate preferred size.
+         *
          * @param listView
-         * The host component.
+         * The list view that contains the item.
          *
          * @param selected
-         * If <tt>true</tt>, the renderer should present a selected state for
+         * If <tt>true</tt>, the item is selected.
          * the item.
          *
+         * @param checked
+         * If <tt>true</tt>, the item is checked.
+         *
          * @param highlighted
-         * If <tt>true</tt>, the renderer should present a highlighted state
-         * for the item.
+         * If <tt>true</tt>, the item is highlighted.
+         *
+         * @param disabled
+         * If <tt>true</tt>, the item is disabled.
          */
-        public void render(Object item, ListView listView, boolean selected,
+        public void render(Object item, int index, ListView listView, boolean selected,
             boolean checked, boolean highlighted, boolean disabled);
     }
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java Fri Sep 25 12:26:46 2009
@@ -378,7 +378,37 @@
      * Table cell renderer interface.
      */
     public interface CellRenderer extends Renderer {
-        public void render(Object value, TableView tableView, TableView.Column column,
+        /**
+         * Prepares the renderer for layout or paint.
+         *
+         * @param value
+         * The cell value to render, or <tt>null</tt> if called to calculate
+         * preferred size.
+         *
+         * @param rowIndex
+         * The index of the row being rendered, or <tt>-1</tt> if called to
+         * calculate preferred size.
+         *
+         * @param columnIndex
+         * The index of the column being rendered.
+         *
+         * @param tableView
+         * The table view that contains the cell.
+         *
+         * @param columnName
+         * The name of the column being rendered.
+         *
+         * @param rowSelected
+         * If <tt>true</tt>, the row is selected.
+         *
+         * @param rowHighlighted
+         * If <tt>true</tt>, the row is highlighted.
+         *
+         * @param rowDisabled
+         * If <tt>true</tt>, the row is disabled.
+         */
+        public void render(Object value, int rowIndex, int columnIndex,
+            TableView tableView, String columnName,
             boolean rowSelected, boolean rowHighlighted, boolean rowDisabled);
     }
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewColorRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewColorRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewColorRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewColorRenderer.java Fri Sep 25 12:26:46 2009
@@ -72,7 +72,7 @@
     }
 
     @Override
-    public void render(Object item, ListView listView, boolean selected,
+    public void render(Object item, int index, ListView listView, boolean selected,
         boolean checked, boolean highlighted, boolean disabled) {
         if (item != null) {
             ColorItem colorItem;
@@ -93,6 +93,6 @@
             listItem.setText(colorItem.getName());
         }
 
-        super.render(listItem, listView, selected, checked, highlighted, disabled);
+        super.render(listItem, index, listView, selected, checked, highlighted, disabled);
     }
 }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java Fri Sep 25 12:26:46 2009
@@ -225,7 +225,7 @@
 
         // Render the item data
         ListViewItemRenderer itemRenderer = (ListViewItemRenderer)listView.getItemRenderer();
-        itemRenderer.render(listItem, listView, false, false, false, false);
+        itemRenderer.render(listItem, index, listView, false, false, false, false);
         itemRenderer.setSize(itemBounds.width, itemBounds.height);
 
         // Calculate the text bounds

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java Fri Sep 25 12:26:46 2009
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public void render(Object item, ListView listView, boolean selected,
+    public void render(Object item, int index, ListView listView, boolean selected,
         boolean checked, boolean highlighted, boolean disabled) {
         renderStyles(listView, selected, highlighted, disabled);
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -52,13 +52,13 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         if (value != null) {
             boolean checkboxSelected = false;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -40,7 +40,8 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         renderStyles(tableView, rowSelected, rowDisabled);
 
@@ -48,7 +49,6 @@
             Object cellData = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -52,7 +52,8 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         renderStyles(tableView, rowSelected, rowDisabled);
 
@@ -60,7 +61,6 @@
             String formattedDate = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -38,7 +38,8 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         renderStyles(tableView, rowSelected, rowDisabled);
 
@@ -46,7 +47,6 @@
             String formattedFileSize = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -63,13 +63,13 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         if (value != null) {
             Image image = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -311,19 +311,19 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         if (value == null) {
             for (Class<?> key : cellRenderers) {
                 TableView.CellRenderer renderer = cellRenderers.get(key);
-                renderer.render(null, tableView, column, rowSelected,
-                    rowHighlighted, rowDisabled);
+                renderer.render(null, rowIndex, columnIndex, tableView, columnName,
+                    rowSelected, rowHighlighted, rowDisabled);
             }
         } else {
             Object cellData = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {
@@ -347,7 +347,8 @@
                 cellRenderer.setSize(width, height);
             }
 
-            cellRenderer.render(value, tableView, column, rowSelected, rowHighlighted, rowDisabled);
+            cellRenderer.render(value, rowIndex, columnIndex, tableView, columnName,
+                rowSelected, rowHighlighted, rowDisabled);
         }
     }
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java Fri Sep 25 12:26:46 2009
@@ -61,7 +61,8 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public void render(Object value, TableView tableView, TableView.Column column,
+    public void render(Object value, int rowIndex, int columnIndex,
+        TableView tableView, String columnName,
         boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
         renderStyles(tableView, rowSelected, rowDisabled);
 
@@ -69,7 +70,6 @@
             String formattedNumber = null;
 
             // Get the row and cell data
-            String columnName = column.getName();
             if (columnName != null) {
                 Dictionary<String, Object> rowData;
                 if (value instanceof Dictionary<?, ?>) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java Fri Sep 25 12:26:46 2009
@@ -178,7 +178,7 @@
         }
 
         @Override
-        public void render(Object item, ListView listView, boolean selected,
+        public void render(Object item, int index, ListView listView, boolean selected,
             boolean checked, boolean highlighted, boolean disabled) {
             label.getStyles().put("font", listView.getStyles().get("font"));
 
@@ -232,10 +232,9 @@
         }
 
         @Override
-        public void render(Object value, TableView tableView, TableView.Column column,
+        public void render(Object value, int rowIndex, int columnIndex,
+            TableView tableView, String columnName,
             boolean rowSelected, boolean rowHighlighted, boolean rowDisabled) {
-            String columnName = column.getName();
-
             if (value != null) {
                 File file = (File)value;
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java Fri Sep 25 12:26:46 2009
@@ -110,7 +110,7 @@
         ListView.ItemRenderer renderer = listView.getItemRenderer();
 
         for (Object item : listData) {
-            renderer.render(item, listView, false, false, false, false);
+            renderer.render(item, -1, listView, false, false, false, false);
             preferredWidth = Math.max(preferredWidth, renderer.getPreferredWidth(-1));
         }
 
@@ -216,7 +216,7 @@
             Graphics2D rendererGraphics = (Graphics2D)graphics.create(itemX, itemY,
                 width, itemHeight);
 
-            renderer.render(item, listView, selected, checked, highlighted, disabled);
+            renderer.render(item, itemIndex, listView, selected, checked, highlighted, disabled);
             renderer.setSize(width, itemHeight);
             renderer.paint(rendererGraphics);
             rendererGraphics.dispose();
@@ -264,7 +264,7 @@
     public int getItemHeight() {
         ListView listView = (ListView)getComponent();
         ListView.ItemRenderer renderer = listView.getItemRenderer();
-        renderer.render(null, listView, false, false, false, false);
+        renderer.render(null, -1, listView, false, false, false, false);
 
         int itemHeight = renderer.getPreferredHeight(-1);
         if (listView.getCheckmarksEnabled()) {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java?rev=818832&r1=818831&r2=818832&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java Fri Sep 25 12:26:46 2009
@@ -134,7 +134,8 @@
                     List<?> tableData = tableView.getTableData();
 
                     for (Object rowData : tableData) {
-                        cellRenderer.render(rowData, tableView, column, false, false, false);
+                        cellRenderer.render(rowData, -1, i, tableView, column.getName(),
+                            false, false, false);
                         columnWidth = Math.max(cellRenderer.getPreferredWidth(-1), columnWidth);
                     }
                 }
@@ -212,7 +213,8 @@
                     List<?> tableData = tableView.getTableData();
 
                     for (Object rowData : tableData) {
-                        cellRenderer.render(rowData, tableView, column, false, false, false);
+                        cellRenderer.render(rowData, -1, i, tableView, column.getName(),
+                            false, false, false);
                         columnWidth = Math.max(cellRenderer.getPreferredWidth(-1), columnWidth);
                     }
                 }
@@ -240,7 +242,7 @@
         for (int i = 0; i < n; i++) {
             TableView.Column column = columns.get(i);
             TableView.CellRenderer cellRenderer = column.getCellRenderer();
-            cellRenderer.render(null, tableView, column, false, false, false);
+            cellRenderer.render(null, -1, i, tableView, column.getName(), false, false, false);
 
             rowHeight = Math.max(rowHeight, cellRenderer.getPreferredHeight(-1));
         }
@@ -352,8 +354,8 @@
                 Graphics2D rendererGraphics = (Graphics2D)graphics.create(columnX, rowY,
                     columnWidth, rowHeight);
 
-                cellRenderer.render(rowData, tableView, column, rowSelected,
-                    rowHighlighted, rowDisabled);
+                cellRenderer.render(rowData, rowIndex, columnIndex, tableView, column.getName(),
+                    rowSelected, rowHighlighted, rowDisabled);
                 cellRenderer.setSize(columnWidth, rowHeight);
                 cellRenderer.paint(rendererGraphics);