changeset 7716:36a242b77366

RT-38278 [ScrollPane] minViewport{Height,Width} are taking effect only after changing prefViewport{Height,Width} Reviewed by: jgiles
author Martin Sladecek <martin.sladecek@oracle.com>
date Tue, 19 Aug 2014 08:37:43 +0200
parents b5b649ef6d8d
children 2ec456a947bf
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Tue Aug 19 08:36:04 2014 +0200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Tue Aug 19 08:37:43 2014 +0200
@@ -135,8 +135,10 @@
         registerChangeListener(scrollpane.vvalueProperty(), "VVALUE");
         registerChangeListener(scrollpane.vmaxProperty(), "VMAX");
         registerChangeListener(scrollpane.vminProperty(), "VMIN");
-        registerChangeListener(scrollpane.prefViewportWidthProperty(), "PREF_VIEWPORT_WIDTH");
-        registerChangeListener(scrollpane.prefViewportHeightProperty(), "PREF_VIEWPORT_HEIGHT");
+        registerChangeListener(scrollpane.prefViewportWidthProperty(), "VIEWPORT_SIZE_HINT");
+        registerChangeListener(scrollpane.prefViewportHeightProperty(), "VIEWPORT_SIZE_HINT");
+        registerChangeListener(scrollpane.minViewportWidthProperty(), "VIEWPORT_SIZE_HINT");
+        registerChangeListener(scrollpane.minViewportHeightProperty(), "VIEWPORT_SIZE_HINT");
     }
 
     private final InvalidationListener nodeListener = new InvalidationListener() {
@@ -621,7 +623,7 @@
             vsb.setMax(getSkinnable().getVmax());
         } else if ("VMIN".equals(p)) {
             vsb.setMin(getSkinnable().getVmin());
-        } else if ("PREF_VIEWPORT_WIDTH".equals(p) || "PREF_VIEWPORT_HEIGHT".equals(p)) {
+        } else if ("VIEWPORT_SIZE_HINT".equals(p)) {
             // change affects pref size, so requestLayout on control
             getSkinnable().requestLayout();
         }