changeset 2192:1743ebb8a2b4

RT-27612: TreeTableView and TreeTableCell freak IntelliJ out (generics) Summary: Added generic information to CellEditEvent constructor parameter, and removed it from several internal methods in TableUtil.
author Richard Bair <richard.bair@oracle.com>
date Thu, 10 Jan 2013 13:10:31 -0800
parents c1ce504649ca
children 587643f3fc09
files javafx-ui-controls/src/javafx/scene/control/TableUtil.java javafx-ui-controls/src/javafx/scene/control/TreeTableColumn.java
diffstat 2 files changed, 12 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/TableUtil.java	Thu Jan 10 12:25:55 2013 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableUtil.java	Thu Jan 10 13:10:31 2013 -0800
@@ -28,7 +28,6 @@
 import java.util.Collections;
 import java.util.List;
 import javafx.beans.InvalidationListener;
-import javafx.beans.WeakInvalidationListener;
 import javafx.collections.ListChangeListener;
 
 /**
@@ -37,13 +36,13 @@
  */
 class TableUtil {
     
-    static <S> void removeTableColumnListener(List<? extends TableColumnBase<S,?>> list,
+    static void removeTableColumnListener(List<? extends TableColumnBase> list,
                         final InvalidationListener columnVisibleObserver,
                         final InvalidationListener columnSortableObserver,
                         final InvalidationListener columnSortTypeObserver) {
     
         if (list == null) return;
-        for (TableColumnBase<S,?> col : list) {
+        for (TableColumnBase col : list) {
             col.visibleProperty().removeListener(columnVisibleObserver);
             col.sortableProperty().removeListener(columnSortableObserver);
             col.sortTypeProperty().removeListener(columnSortTypeObserver);
@@ -55,13 +54,13 @@
         }
     }
 
-    static <S> void addTableColumnListener(List<? extends TableColumnBase<S,?>> list,
+    static void addTableColumnListener(List<? extends TableColumnBase> list,
                         final InvalidationListener columnVisibleObserver,
                         final InvalidationListener columnSortableObserver,
                         final InvalidationListener columnSortTypeObserver) {
         
         if (list == null) return;
-        for (TableColumnBase<S,?> col : list) {
+        for (TableColumnBase col : list) {
             col.visibleProperty().addListener(columnVisibleObserver);
             col.sortableProperty().addListener(columnSortableObserver);
             col.sortTypeProperty().addListener(columnSortTypeObserver);
@@ -73,19 +72,19 @@
         }
     }
 
-    static <S> void removeColumnsListener(List<? extends TableColumnBase<S,?>> list, ListChangeListener cl) {
+    static void removeColumnsListener(List<? extends TableColumnBase> list, ListChangeListener cl) {
         if (list == null) return;
 
-        for (TableColumnBase<S,?> col : list) {
+        for (TableColumnBase col : list) {
             col.getColumns().removeListener(cl);
             removeColumnsListener(col.getColumns(), cl);
         }
     }
 
-    static <S> void addColumnsListener(List<? extends TableColumnBase<S,?>> list, ListChangeListener cl) {
+    static void addColumnsListener(List<? extends TableColumnBase> list, ListChangeListener cl) {
         if (list == null) return;
 
-        for (TableColumnBase<S,?> col : list) {
+        for (TableColumnBase col : list) {
             col.getColumns().addListener(cl);
             addColumnsListener(col.getColumns(), cl);
         }
--- a/javafx-ui-controls/src/javafx/scene/control/TreeTableColumn.java	Thu Jan 10 12:25:55 2013 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TreeTableColumn.java	Thu Jan 10 13:10:31 2013 -0800
@@ -24,10 +24,6 @@
  */
 package javafx.scene.control;
 
-import com.sun.javafx.css.Styleable;
-import com.sun.javafx.css.CssMetaData;
-import com.sun.javafx.event.EventHandlerManager;
-import com.sun.javafx.scene.control.skin.TableViewSkinBase;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -49,6 +45,9 @@
 import javafx.event.EventType;
 import javafx.scene.Node;
 import javafx.util.Callback;
+import com.sun.javafx.css.CssMetaData;
+import com.sun.javafx.css.Styleable;
+import com.sun.javafx.scene.control.skin.TableViewSkinBase;
 
 /**
  * A {@link TreeTableView} is made up of a number of TreeTableColumn instances. Each
@@ -728,7 +727,7 @@
          * @param newValue The value input by the end user.
          */
         public CellEditEvent(TreeTableView<S> table, TreeTablePosition<S,T> pos,
-                EventType<TreeTableColumn.CellEditEvent> eventType, T newValue) {
+                EventType<TreeTableColumn.CellEditEvent<S,T>> eventType, T newValue) {
             super(table, Event.NULL_SOURCE_TARGET, eventType);
 
             if (table == null) {