Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8096453

Getting "No valid constructor defined" for Skins that are *already* instantiated (from anonymous inner class)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u20
    • 8
    • javafx
    • JavaFX 8.0b119

      When a Skin is set on a Control that is an anonymous inner class and setStyle is called, I will get the following log:

      SEVERE: No valid constructor defined in 'hs.javafx.demo.ControlPanel$1$1' for control Carousel@1a20941[styleClass=carousel].
      You must provide a constructor that accepts a single Skinnable (e.g. Control or PopupControl) parameter in hs.javafx.demo.ControlPanel$1$1.
      Jan 24, 2014 9:24:59 PM javafx.scene.control.Control loadSkinClass

      I don't see why this is occuring as I specifically already instantiated this Skin (in a factory), using the following code:

        new CircularRayCarouselSkin(skinnable) {
          @Override
          protected void postLayoutCustomizeCell(RayLayoutItem item) {
             // Customization code
          }
        };

      This makes Skins needlessly complex to switch and customize -- also see the discussion titled "Future of Skins" on the openjfx dev mailinglist.

            jgiles Jonathan Giles
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: