changeset 4211:d6d09c8c7236

Fix small regression due to RT-31173: custom skins could no longer be set on PopupControl but now they can. Thanks to Claudine Zillmann for notification of this.
author jgiles
date Fri, 05 Jul 2013 12:02:56 +1200
parents 2dfd53d0965c
children 51cabebc81a9
files modules/controls/src/main/java/javafx/scene/control/Control.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/control/Control.java	Wed Jul 03 15:33:22 2013 +1200
+++ b/modules/controls/src/main/java/javafx/scene/control/Control.java	Fri Jul 05 12:02:56 2013 +1200
@@ -693,7 +693,7 @@
             Constructor<?> skinConstructor = null;
             for (Constructor<?> c : constructors) {
                 Class<?>[] parameterTypes = c.getParameterTypes();
-                if (parameterTypes.length == 1 && Control.class.isAssignableFrom(parameterTypes[0])) {
+                if (parameterTypes.length == 1 && Skinnable.class.isAssignableFrom(parameterTypes[0])) {
                     skinConstructor = c;
                     break;
                 }
@@ -703,7 +703,7 @@
                 final String msg =
                     "No valid constructor defined in '" + skinClassName + "' for control " + control +
                         ".\r\nYou must provide a constructor that accepts a single "
-                        + "Control parameter in " + skinClassName + ".";
+                        + "Skinnable (e.g. Control or PopupControl) parameter in " + skinClassName + ".";
                 final List<CssError> errors = StyleManager.getErrors();
                 if (errors != null) {
                     CssError error = new CssError(msg);