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/17 21:52:58 UTC

svn commit: r816357 - in /incubator/pivot/trunk: demos/src/org/apache/pivot/demos/itunes/ demos/src/org/apache/pivot/demos/million/ demos/src/org/apache/pivot/demos/tables/ tutorials/src/org/apache/pivot/tutorials/ tutorials/src/org/apache/pivot/tutori...

Author: gbrown
Date: Thu Sep 17 19:52:56 2009
New Revision: 816357

URL: http://svn.apache.org/viewvc?rev=816357&view=rev
Log:
Restore table view sorting functionality to all features, demos, and tutorials.

Modified:
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/itunes/search_demo.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/large_data.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/FixedColumnTable.java
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/fixed_column_table.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/stocktracker.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/tables.wtkx
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableViewSortListener.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/TerraTableViewHeaderSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_skin.wtkx
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_sheet_test.wtkx

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/itunes/search_demo.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/itunes/search_demo.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java Thu Sep 17 19:52:56 2009
@@ -36,7 +36,9 @@
 import org.apache.pivot.wtk.ListButton;
 import org.apache.pivot.wtk.PushButton;
 import org.apache.pivot.wtk.TableView;
+import org.apache.pivot.wtk.TableViewSortListener;
 import org.apache.pivot.wtk.Window;
+import org.apache.pivot.wtk.content.TableViewRowComparator;
 import org.apache.pivot.wtkx.WTKXSerializer;
 
 public class LargeData implements Application {
@@ -193,19 +195,19 @@
             }
         });
 
-        // TODO
-        /*
-        tableViewHeader.getTableViewHeaderPressListeners().add(new TableView.SortHandler() {
+        tableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
             @Override
-            public void headerPressed(TableViewHeader tableViewHeader, int index) {
+            @SuppressWarnings("unchecked")
+            public void sortChanged(TableView tableView) {
+                List<Object> tableData = (List<Object>)tableView.getTableData();
+
                 long startTime = System.currentTimeMillis();
-                super.headerPressed(tableViewHeader, index);
+                tableData.setComparator(new TableViewRowComparator(tableView));
                 long endTime = System.currentTimeMillis();
 
                 statusLabel.setText("Data sorted in " + (endTime - startTime) + " ms.");
             }
         });
-        */
 
         window.open(display);
     }

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/large_data.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/million/large_data.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/FixedColumnTable.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/FixedColumnTable.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/FixedColumnTable.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/FixedColumnTable.java Thu Sep 17 19:52:56 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.pivot.demos.tables;
 
+import org.apache.pivot.collections.List;
 import org.apache.pivot.collections.Map;
 import org.apache.pivot.collections.Sequence;
 import org.apache.pivot.wtk.Application;
@@ -24,7 +25,9 @@
 import org.apache.pivot.wtk.Span;
 import org.apache.pivot.wtk.TableView;
 import org.apache.pivot.wtk.TableViewSelectionListener;
+import org.apache.pivot.wtk.TableViewSortListener;
 import org.apache.pivot.wtk.Window;
+import org.apache.pivot.wtk.content.TableViewRowComparator;
 import org.apache.pivot.wtkx.WTKXSerializer;
 
 public class FixedColumnTable implements Application {
@@ -102,34 +105,31 @@
         });
 
         // Keep header state in sync
-        // TODO Add sort listeners to both table views
-        /*
-        primaryTableViewHeader.getTableViewHeaderPressListeners().add(new TableView.SortHandler() {
-            @Override
-            public void headerPressed(TableViewHeader tableViewHeader, int index) {
-                super.headerPressed(tableViewHeader, index);
-
-                TableView.ColumnSequence columns = fixedTableView.getColumns();
-                for (int i = 0, n = columns.getLength(); i < n; i++) {
-                    TableView.Column column = columns.get(i);
-                    column.setSortDirection((SortDirection)null);
+        primaryTableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
+            @Override
+            @SuppressWarnings("unchecked")
+            public void sortChanged(TableView tableView) {
+                if (!tableView.getSort().isEmpty()) {
+                    fixedTableView.clearSort();
                 }
+
+                List<Object> tableData = (List<Object>)tableView.getTableData();
+                tableData.setComparator(new TableViewRowComparator(tableView));
             }
         });
 
-        fixedTableViewHeader.getTableViewHeaderPressListeners().add(new TableView.SortHandler() {
+        fixedTableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
             @Override
-            public void headerPressed(TableViewHeader tableViewHeader, int index) {
-                super.headerPressed(tableViewHeader, index);
-
-                TableView.ColumnSequence columns = primaryTableView.getColumns();
-                for (int i = 0, n = columns.getLength(); i < n; i++) {
-                    TableView.Column column = columns.get(i);
-                    column.setSortDirection((SortDirection)null);
+            @SuppressWarnings("unchecked")
+            public void sortChanged(TableView tableView) {
+                if (!tableView.getSort().isEmpty()) {
+                    primaryTableView.clearSort();
                 }
+
+                List<Object> tableData = (List<Object>)tableView.getTableData();
+                tableData.setComparator(new TableViewRowComparator(tableView));
             }
         });
-        */
 
         window.open(display);
     }

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/fixed_column_table.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/tables/fixed_column_table.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java Thu Sep 17 19:52:56 2009
@@ -70,6 +70,7 @@
 import org.apache.pivot.wtk.SliderValueListener;
 import org.apache.pivot.wtk.Spinner;
 import org.apache.pivot.wtk.TableView;
+import org.apache.pivot.wtk.TableViewSortListener;
 import org.apache.pivot.wtk.TextArea;
 import org.apache.pivot.wtk.Theme;
 import org.apache.pivot.wtk.TreeView;
@@ -79,6 +80,7 @@
 import org.apache.pivot.wtk.content.ListItem;
 import org.apache.pivot.wtk.content.NumericSpinnerData;
 import org.apache.pivot.wtk.content.TableViewHeaderData;
+import org.apache.pivot.wtk.content.TableViewRowComparator;
 import org.apache.pivot.wtk.content.TreeBranch;
 import org.apache.pivot.wtk.content.TreeNode;
 import org.apache.pivot.wtk.effects.ReflectionDecorator;
@@ -543,12 +545,14 @@
                 }
 
                 sortableTableView.setTableData(tableData);
-
-                // TODO
-                /*
-                // Install header press listener
-                sortableTableViewHeader.getTableViewHeaderPressListeners().add(new TableView.SortHandler());
-                */
+                sortableTableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
+                    @Override
+                    @SuppressWarnings("unchecked")
+                    public void sortChanged(TableView tableView) {
+                        List<Object> tableData = (List<Object>)tableView.getTableData();
+                        tableData.setComparator(new TableViewRowComparator(tableView));
+                    }
+                });
 
                 customTableView.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
                     @Override

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java Thu Sep 17 19:52:56 2009
@@ -50,10 +50,12 @@
 import org.apache.pivot.wtk.TableView;
 import org.apache.pivot.wtk.TableViewRowListener;
 import org.apache.pivot.wtk.TableViewSelectionListener;
+import org.apache.pivot.wtk.TableViewSortListener;
 import org.apache.pivot.wtk.TaskAdapter;
 import org.apache.pivot.wtk.TextInput;
 import org.apache.pivot.wtk.TextInputTextListener;
 import org.apache.pivot.wtk.Window;
+import org.apache.pivot.wtk.content.TableViewRowComparator;
 import org.apache.pivot.wtk.text.TextNode;
 import org.apache.pivot.wtkx.WTKX;
 import org.apache.pivot.wtkx.WTKXSerializer;
@@ -130,6 +132,15 @@
             }
         });
 
+        stocksTableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
+            @Override
+            @SuppressWarnings("unchecked")
+            public void sortChanged(TableView tableView) {
+                List<Object> tableData = (List<Object>)tableView.getTableData();
+                tableData.setComparator(new TableViewRowComparator(tableView));
+            }
+        });
+
         stocksTableView.getComponentKeyListeners().add(new ComponentKeyListener.Adapter() {
             @Override
             public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/stocktracker.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/stocktracker.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/tables.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/tables.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

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=816357&r1=816356&r2=816357&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 Thu Sep 17 19:52:56 2009
@@ -987,10 +987,9 @@
             }
         }
 
-        public void sortChanged(TableView tableView,
-            Sequence<Dictionary.Pair<String, SortDirection>> previousSort) {
+        public void sortChanged(TableView tableView) {
             for (TableViewSortListener listener : this) {
-                listener.sortChanged(tableView, previousSort);
+                listener.sortChanged(tableView);
             }
         }
     }
@@ -1062,6 +1061,9 @@
     private TableViewSelectionListenerList tableViewSelectionListeners = new TableViewSelectionListenerList();
     private TableViewSortListenerList tableViewSortListeners = new TableViewSortListenerList();
 
+    public static final String COLUMN_NAME_KEY = "columnName";
+    public static final String SORT_DIRECTION_KEY = "sortDirection";
+
     /**
      * Creates a new table view populated with an empty array list.
      */
@@ -1591,16 +1593,46 @@
     /**
      * Sets the table view's sort.
      *
+     * @param columnName
+     * @param sortDirection
+     */
+    @SuppressWarnings("unchecked")
+    public Dictionary<String, SortDirection> setSort(String columnName, SortDirection sortDirection) {
+        Dictionary.Pair<String, SortDirection> sort =
+            new Dictionary.Pair<String, SortDirection>(columnName, sortDirection);
+
+        setSort(new ArrayList<Dictionary.Pair<String, SortDirection>>(sort));
+
+        return getSort();
+    }
+
+    /**
+     * Sets the table view's sort.
+     *
      * @param sort
      * A sequence of key/value pairs representing the sort. Keys represent column names and
      * values represent sort direction.
      */
-    public void setSort(Sequence<Dictionary.Pair<String, SortDirection>> sort) {
+    public Dictionary<String, SortDirection> setSort(Sequence<Dictionary.Pair<String, SortDirection>> sort) {
         if (sort == null) {
             throw new IllegalArgumentException();
         }
 
-        // TODO
+        sortMap.clear();
+        sortList.clear();
+
+        for (int i = 0, n = sort.getLength(); i < n; i++) {
+            Dictionary.Pair<String, SortDirection> pair = sort.get(i);
+
+            if (!sortMap.containsKey(pair.key)) {
+                sortMap.put(pair.key, pair.value);
+                sortList.add(pair.key);
+            }
+        }
+
+        tableViewSortListeners.sortChanged(this);
+
+        return getSort();
     }
 
     /**
@@ -1611,12 +1643,48 @@
      *
      * @see #setSort(Sequence)
      */
-    public void setSort(String sort) {
+    public final Dictionary<String, SortDirection> setSort(String sort) {
         if (sort == null) {
             throw new IllegalArgumentException();
         }
 
-        // TODO
+        try {
+            setSort(parseSort(sort));
+        } catch (SerializationException exception) {
+            throw new IllegalArgumentException(exception);
+        }
+
+        return getSort();
+    }
+
+    @SuppressWarnings("unchecked")
+    private Sequence<Dictionary.Pair<String, SortDirection>> parseSort(String json)
+        throws SerializationException {
+        ArrayList<Dictionary.Pair<String, SortDirection>> sort =
+            new ArrayList<Dictionary.Pair<String, SortDirection>>();
+
+        List<?> list = JSONSerializer.parseList(json);
+        for (Object item : list) {
+            Map<String, ?> map = (Map<String, ?>)item;
+
+            Dictionary.Pair<String, SortDirection> pair =
+                new Dictionary.Pair<String, SortDirection>((String)map.get(COLUMN_NAME_KEY),
+                    SortDirection.valueOf(((String)map.get(SORT_DIRECTION_KEY)).toLowerCase()));
+            sort.add(pair);
+        }
+
+        return sort;
+    }
+
+    /**
+     * Clears the sort.
+     */
+    public void clearSort() {
+        if (!sortMap.isEmpty()) {
+            sortMap.clear();
+            sortList.clear();
+            tableViewSortListeners.sortChanged(this);
+        }
     }
 
     /**

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableViewSortListener.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableViewSortListener.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableViewSortListener.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableViewSortListener.java Thu Sep 17 19:52:56 2009
@@ -16,14 +16,30 @@
  */
 package org.apache.pivot.wtk;
 
-import org.apache.pivot.collections.Dictionary;
-import org.apache.pivot.collections.Sequence;
-
 /**
  * Table view sort listener interface.
  */
 public interface TableViewSortListener {
     /**
+     * Table view sort listener adapter.
+     */
+    public static class Adapter implements TableViewSortListener {
+        public void sortAdded(TableView tableView, String columnName) {
+        }
+
+        public void sortUpdated(TableView tableView, String columnName,
+            SortDirection previousSortDirection) {
+        }
+
+        public void sortRemoved(TableView tableView, String columnName,
+            SortDirection sortDirection) {
+        }
+
+        public void sortChanged(TableView tableView) {
+        }
+    }
+
+    /**
      * Called when a sort has been added to a table view.
      *
      * @param tableView
@@ -55,8 +71,6 @@
      * Called when a table view's sort has changed.
      *
      * @param tableView
-     * @param previousSort
      */
-    public void sortChanged(TableView tableView,
-        Sequence<Dictionary.Pair<String, SortDirection>> previousSort);
+    public void sortChanged(TableView tableView);
 }

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=816357&r1=816356&r2=816357&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 Thu Sep 17 19:52:56 2009
@@ -26,6 +26,7 @@
 import java.util.Date;
 
 import org.apache.pivot.collections.ArrayList;
+import org.apache.pivot.collections.Dictionary;
 import org.apache.pivot.collections.FilteredList;
 import org.apache.pivot.collections.FilteredListListener;
 import org.apache.pivot.collections.List;
@@ -62,6 +63,7 @@
 import org.apache.pivot.wtk.Span;
 import org.apache.pivot.wtk.TableView;
 import org.apache.pivot.wtk.TableViewSelectionListener;
+import org.apache.pivot.wtk.TableViewSortListener;
 import org.apache.pivot.wtk.TextInput;
 import org.apache.pivot.wtk.TextInputTextListener;
 import org.apache.pivot.wtk.VerticalAlignment;
@@ -508,6 +510,20 @@
             }
         });
 
+        fileTableView.getTableViewSortListeners().add(new TableViewSortListener.Adapter() {
+            @Override
+            @SuppressWarnings("unchecked")
+            public void sortChanged(TableView tableView) {
+                TableView.SortDictionary sort = tableView.getSort();
+
+                if (!sort.isEmpty()) {
+                    Dictionary.Pair<String, SortDirection> pair = tableView.getSort().get(0);
+                    List<File> files = (List<File>)tableView.getTableData();
+                    files.setComparator(new FileComparator(pair.key, pair.value));
+                }
+            }
+        });
+
         fileTableView.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
             private int index = -1;
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewHeaderSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewHeaderSkin.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewHeaderSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTableViewHeaderSkin.java Thu Sep 17 19:52:56 2009
@@ -25,7 +25,6 @@
 import java.awt.geom.GeneralPath;
 
 import org.apache.pivot.collections.ArrayList;
-import org.apache.pivot.collections.Dictionary;
 import org.apache.pivot.collections.Sequence;
 import org.apache.pivot.wtk.Bounds;
 import org.apache.pivot.wtk.Component;
@@ -730,15 +729,40 @@
 
         if (button == Mouse.Button.LEFT) {
             TableViewHeader tableViewHeader = (TableViewHeader)getComponent();
+            TableView tableView = tableViewHeader.getTableView();
 
             if (count == 1
                 && pressedHeaderIndex != -1
                 && headersPressable) {
+                // Press the header
                 tableViewHeader.pressHeader(pressedHeaderIndex);
+
+                // Update the sort
+                TableViewHeader.SortMode sortMode = tableViewHeader.getSortMode();
+
+                if (sortMode != TableViewHeader.SortMode.NONE) {
+                    TableView.Column column = tableView.getColumns().get(pressedHeaderIndex);
+                    String columnName = column.getName();
+
+                    SortDirection sortDirection = tableView.getSort().get(columnName);
+                    if (sortDirection == null) {
+                        sortDirection = SortDirection.ASCENDING;
+                    } else if (sortDirection == SortDirection.ASCENDING) {
+                        sortDirection = SortDirection.DESCENDING;
+                    } else {
+                        sortDirection = SortDirection.ASCENDING;
+                    }
+
+                    if (sortMode == TableViewHeader.SortMode.SINGLE_COLUMN) {
+                        tableView.setSort(columnName, sortDirection);
+                    } else if (sortMode == TableViewHeader.SortMode.MULTI_COLUMN) {
+                        tableView.getSort().put(columnName, sortDirection);
+                    }
+
+                    consumed = true;
+                }
             } else if (count == 2
                 && columnsResizable) {
-                TableView tableView = tableViewHeader.getTableView();
-
                 if (tableView != null) {
                     int headerIndex = getHeaderAt(x);
 
@@ -750,6 +774,7 @@
                             && column.getWidth() != -1
                             && x > headerBounds.x + headerBounds.width - RESIZE_HANDLE_SIZE) {
                             // TODO PIVOT-248
+                            consumed = true;
                         }
                     }
                 }
@@ -841,8 +866,7 @@
         repaintComponent();
     }
 
-    public void sortChanged(TableView tableView,
-        Sequence<Dictionary.Pair<String, SortDirection>> previousSort) {
+    public void sortChanged(TableView tableView) {
         repaintComponent();
     }
 }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_skin.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_skin.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/FileBrowserSheetTest.java Thu Sep 17 19:52:56 2009
@@ -36,6 +36,8 @@
         wtkxSerializer.put("fileOpenSheet", fileOpenSheet);
 
         frame = (Frame)wtkxSerializer.readObject(getClass().getResource("file_browser_sheet_test.wtkx"));
+        fileOpenSheet.setOwner(frame);
+
         frame.open(display);
     }
 

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_sheet_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_sheet_test.wtkx?rev=816357&r1=816356&r2=816357&view=diff
==============================================================================
Binary files - no diff available.