<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Iosevka Fixed SS16";
        panose-1:2 0 5 9 3 0 0 0 0 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Iosevka Fixed SS16";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Pedro Duque Vieira
</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">Talking about the Skin discussion:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">Right now, I think Skins do both the Controller and View part of a Control, making it really difficult to replace, extend, etc a Control's Skin...<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">I would have to think much more about this but I could see some kind of View class that Skin references. In this View class, we would define just how the control represents itself
 visually, that is, visual nodes, layout and animations. The Skin would take care of handling events from the View and updating the Model appropriately (the Model being the part that developers already interact with in a JavaFX Control - the class that extends
 Control), that is, just being a kind of Controller.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">Main purpose would be to make it as easy as possible for developers to update a Control's visuals (layout, animation, etc). Right now it's a really hard task and 99% of developers
 just prefer to create a whole new control altogether rather than replace its Skin (even if they just want to slightly tweak an existing control's visuals). <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">In this case developers would replace the "View" class with their own implementation, adding new animations, new visuals, etc... This would allow for a much easier customization of
 visuals while still maintaining about the same code in the application (the application code being everything else except the Skins' code). <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">This would also allow a new echo system of Skin libraries to start to appear. These libraries would be interchangeable and would allow developers to easily update and enhance the visuals
 of their apps by setting a skin library.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt">This is what the library I've created FXSkins does (<a href="https://urldefense.com/v3/__https:/github.com/dukke/FXSkins__;!!ACWV5N9M2RV99hQ!NYPX8s8ifvMNX3aG27LG4WAg_WT9drSFGMS0a9-mfDMwEYAP5m8T_2JFtRaRelbXeJdFOsrlRWIdrWsjr1g_lPE5ZCyKLJ8$">https://github.com/dukke/FXSkins</a>),
 that is, it allows a developer to enhance their app's visuals very easily without changing one line of code in their app. The difference is that if JavaFX Skins architecture were defined as I mentioned above it would be much easier for me to develop FXSkins
 and there would probably be more libraries like this, created by other developers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">With your permission, I’ve extracted this topic into a separate discussion.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">First I’d start with outlining the problem we are trying to solve.  What do we want to achieve?  Do we want to change a certain aspect of the existing skin, or do we want to
 provide a drastically differently looking thing with a different behavior?  Could we list some examples?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Assuming we do need to touch the skins in some way, we have one major problem: skins are currently public, but extremely opaque.  My understanding is that the original intent
 in FX was to hide everything from the developer under the premise of “future development” or “evolving implementation without introducing compatibility issues”.  It’s a good idea, provided such processes were indeed ongoing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">We have at least two choices:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">1. Simple: make skins and behaviors less opaque (protected methods, non-final classes etc.) similarly to what Swing does.  In Swing it is often possible to extend the component
 UI without much trouble.  The price: any code that depends on particular implementation detail will break after a new feature or a bug fix.  There is much resistance within this team to this choice, even though Swing has enormous success in delivering quality
 apps for more than two decades.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">2. Not so simple: identify missing APIs that will make skin extension possible and easy.  Designing the APIs in such a way that hides internal detains and yet provides enough
 flexibility is not an easy task.  Personally, I don’t think it’s even possible without opening up the skin implementation, but perhaps I am wrong.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Did I miss anything?  What do you think?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
</div>
</body>
</html>