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

Doc error: Skinnable methods over-specified to Control

XMLWordPrintable

      Basically, any collaborator in the scenegraph could implement skinnable, not only controls. Actually, there is at least one (PopupControl) that isn't.

      So all methods in the interface Skinnable should specify _Skinnable_ (vs _Control_ as they do now)

      for instance:

          /**
           * Sets the skin that will render this {@link Control}
           * @param value the skin value for this control
           */
          public void setSkin(Skin<?> value);

      should be changed to (modulo doc conventions, not entirely certain about lower/upper casing nor self-references?)

          /**
           * Sets the skin that will render this skinnable.
           * @param value the skin value for this skinnable
           */
          public void setSkin(Skin<?> value);

      Apart from that, the description of Skinnable needs some love - it's an implementation note, not very expressive and stating the obvious:

          The Skinnable interface is implemented by the Control class, and therefore is implemented by all Control implementations.
       
      Should be changed to describe _what_ it is for, maybe somehow the inverse of Skin:

         A Skinnable delegates its visual representation to its {@link Skin}. ...

      Without updating the description, the change might be small enough to go into JDK-8252389 (but as discussed its PR: if we want to change the description as well, we'll need a separate issue anyway)

            fastegal Jeanette Winzenburg
            fastegal Jeanette Winzenburg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: