changeset 4003:9d368dc0822d

Removed commented out code that used reflection.
author psomashe
date Tue, 18 Jun 2013 16:39:45 -0700
parents b4f3debd7092
children 8c4c7f85a7c7
files javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleList.java javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleListItem.java
diffstat 2 files changed, 0 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleList.java	Wed Jun 19 09:18:39 2013 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleList.java	Tue Jun 18 16:39:45 2013 -0700
@@ -122,32 +122,6 @@
      */
     @Override
     public Object[] getSelection() {
-        /**
-         * For now the following code is being commented out due to the use of getMethod
-         * as flagged by findbugs and reported in RT-28367.  When this code is finally
-         * implemented the issue raised by RT-28367 should be resolved in some manner
-         * other than throwing UnsupportedOperationException.
-         * 
-         * 
-        // Fix this later to allocate and fill the correctly sized array.
-        //      For now it will work for single selection lists.
-        Object[] selection = new Object[1];  // it'll be a Glass AccessibleBaseProvider
-        //  selection[1] = null;  // Is this needed?  Probably already null.
-        Object selected = listView.getSelectionModel().getSelectedItem();
-        try {
-            java.lang.reflect.Method method = selected.getClass().getMethod("impl_getAccessible");
-            AccessibleProvider provider = (AccessibleProvider)method.invoke(selected);
-        // if (selected instanceof Accessible) {
-           // AccessibleProvider provider = ((Accessible)selected).impl_getAccessible();
-            if (provider instanceof AccessibleNode) {
-                selection[1] = ((AccessibleNode)provider).getAccessibleElement();
-            }
-        } catch (Exception ex) {
-        }
-        return selection;
-         * 
-         *
-         */
         throw new UnsupportedOperationException();
     }
 
@@ -187,32 +161,6 @@
      */
     @Override   
     public Object getItem(int row, int col) {
-        Object item = null;
-        // get the cell and then its associated provider
-        /**
-         * For now the following code is being commented out due to the use of getMethod
-         * as flagged by findbugs and reported in RT-28367.  When this code is finally
-         * implemented the issue raised by RT-28367 should be resolved in some manner
-         * other than throwing UnsupportedOperationException.
-         * 
-         * 
-        // TODO fix this to return the appropriate item
-        listView.getItems().get(row);
-        for (Node cell : listView.lookupAll(".cell")) {
-            if (cell instanceof Cell) {
-                try {
-                    java.lang.reflect.Method method = cell.getClass().getMethod("impl_getAccessible");
-                    AccessibleProvider provider = (AccessibleProvider)method.invoke(cell);
-                    if (provider instanceof AccessibleNode) {
-                        item = ((AccessibleNode)provider).getAccessibleElement();
-                    }
-                } catch (Exception ex) {}
-            }
-        }
-        return item;
-         *
-         * 
-         */
         throw new UnsupportedOperationException();
     }
 
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleListItem.java	Wed Jun 19 09:18:39 2013 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleListItem.java	Tue Jun 18 16:39:45 2013 -0700
@@ -140,23 +140,6 @@
      */
     @Override
     public Object getSelectionContainer() {
-        /**
-         * For now the following code is being commented out due to the use of getMethod
-         * as flagged by findbugs and reported in RT-28367.  When this code is finally
-         * implemented the issue raised by RT-28367 should be resolved in some manner
-         * other than throwing UnsupportedOperationException.
-         *
-         * 
-        Object item = null;
-        try {
-            java.lang.reflect.Method method = listView.getClass().getMethod("impl_getAccessible");
-            AccessibleProvider provider = (AccessibleProvider)method.invoke(listView);
-            item = ((AccessibleNode)provider).getAccessibleElement();
-            } catch (Exception ex) {}
-        return item;
-         *
-         * 
-         */
         throw new UnsupportedOperationException();
     }
 
@@ -209,26 +192,6 @@
      */
     @Override
     public Object getContainingGrid() {
-        /**
-         * For now the following code is being commented out due to the use of getMethod
-         * as flagged by findbugs and reported in RT-28367.  When this code is finally
-         * implemented the issue raised by RT-28367 should be resolved in some manner
-         * other than throwing UnsupportedOperationException.
-         *
-         *
-        Object container = null;
-        try {
-            java.lang.reflect.Method method =
-                listView.getClass().getMethod("impl_getAccessible");
-            AccessibleProvider provider = (AccessibleProvider)method.invoke(listView);
-            if (provider instanceof AccessibleNode) {
-                container = ((AccessibleNode)provider).getAccessibleElement();
-            }                   
-        } catch (Exception ex) {}
-        return container;
-         *
-         * 
-         */
         throw new UnsupportedOperationException();
     }