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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      JavaFX 8.0b119

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: