changeset 253:53f7d8f7ca5e

RT-18904: Controls.ListView-Rotate performance dropped up to 0 fps in fx2.1-b08
author jgiles
date Thu, 12 Jan 2012 14:21:18 +1300
parents 85e7b7f8c79b
children 4e697a25d882 056d61a3b3b4
files javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListViewBehavior.java javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableViewBehavior.java javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java
diffstat 3 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Thu Jan 12 08:54:08 2012 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Thu Jan 12 14:21:18 2012 +1300
@@ -255,9 +255,11 @@
                     }
                 }
                 
-                if (! hasAnchor() && c.getAddedSize() > 0) {
-                    for (int i = 0; i < c.getAddedSize(); i++) {
-                        int index = ((List<Integer>)c.getAddedSubList()).get(i);
+                int addedSize = c.getAddedSize();
+                if (! hasAnchor() && addedSize > 0) {
+                    List<Integer> addedSubList = (List<Integer>) c.getAddedSubList();
+                    for (int i = 0; i < addedSize; i++) {
+                        int index = addedSubList.get(i);
                         if (index >= 0) {
                             setAnchor(index);
                             break;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Thu Jan 12 08:54:08 2012 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Thu Jan 12 14:21:18 2012 +1300
@@ -232,9 +232,11 @@
                     }
                 } 
                 
-                if (! hasAnchor() && c.getAddedSize() > 0) {
-                    for (int i = 0; i < c.getAddedSize(); i++) {
-                        TablePosition tp = ((List<TablePosition>)c.getAddedSubList()).get(i);
+                int addedSize = c.getAddedSize();
+                if (! hasAnchor() && addedSize > 0) {
+                    List<TablePosition> addedSubList = (List<TablePosition>) c.getAddedSubList();
+                    for (int i = 0; i < addedSize; i++) {
+                        TablePosition tp = addedSubList.get(i);
                         if (tp.getRow() >= 0) {
                             setAnchor(tp);
                             break;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Thu Jan 12 08:54:08 2012 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Thu Jan 12 14:21:18 2012 +1300
@@ -209,9 +209,11 @@
                     }
                 }
                 
-                if (! hasAnchor() && c.getAddedSize() > 0) {
-                    for (int i = 0; i < c.getAddedSize(); i++) {
-                        int index = ((List<Integer>)c.getAddedSubList()).get(i);
+                int addedSize = c.getAddedSize();
+                if (! hasAnchor() && addedSize > 0) {
+                    List<Integer> addedSubList = (List<Integer>) c.getAddedSubList();
+                    for (int i = 0; i < addedSize; i++) {
+                        int index = addedSubList.get(i);
                         if (index >= 0) {
                             setAnchor(index);
                             break;