<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>One note here regarding that a lot of things are final in JavaFX:</div>

<div>
<div> </div>

<div>The problem is not that everything is final - this is intended and makes sense, since we speak mostly of properties here. Overriding those will not give you any benefit.</div>

<div>You mostly want to override e.g. Controls if you add something new to it (a new property) or may just want to set another default skin.</div>

<div>This design is mostly superior than e.g. Swing, where you can override things and easily break something if not too careful.</div>

<div>Pretty sure that this were some lessons learned from the development of Swing.</div>

<div> </div>

<div>The biggest problem is rather that a lot of methods are package private or 'Accessors' are used to call specific methods, which is not just a questionable design but also restrict the usage.</div>

<div> </div>

<div>It is often not possible to override even a minor feature inside the skin.</div>

<div>So you may rather want to recreate the skin then, and copy the existing skin and just change some stuff. But this will mostly not work either, as there is a lot of internal API usage, e.g. Accessors or some com.sun.javafx.scene.control.skin.Utils usage.</div>

<div> </div>

<div>
<div>Want to set the width of a TableColumn? Well, the internal com.sun.javafx.scene.control.TableColumnBaseHelper.TableColumnBaseAccessor can do that, you can not.</div>

<div>Get the width of a text String? Well, you can use com.sun.javafx.scene.control.skin.Utils.computeTextWidth...</div>

<div> </div>

<div>Offtopic: Maybe we should collect the things which should be public in our opinion at one point to (better) get this started as well?</div>
</div>
</div>

<div>
<div> </div>

<div>-- Marius</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Montag, 04. März 2024 um 08:13 Uhr<br/>
<b>Von:</b> "Robert Lichtenberger" <r.lichtenberger@gmail.com><br/>
<b>An:</b> openjfx-dev@openjdk.org<br/>
<b>Betreff:</b> Re: Validation Support</div>

<div name="quoted-content">First off, as the original author of ValidatorFX I feel flattered by the<br/>
suggestion of including it into the JavaFX core :-).<br/>
<br/>
Some thoughts / insights I gained from developing ValidatorFX:<br/>
<br/>
* ValidatorFX is (with the possible exception of GraphicDecoration.java)<br/>
rather trivial code and also very small (< 1k lines of library code).<br/>
But it seems to have filled a market gap according (a few thousand<br/>
unique ip downloads every month, issues from ca. a dozen people so far,<br/>
even a few PRs). These "market gaps" get filled rarely because they are<br/>
not a commercially attractive opportunity. On the other hand if you<br/>
decide (like I did with ValidatorFX) to take your closed source solution<br/>
and make it open source, you are "rewarded" by increased overhead at<br/>
first. But the market gaps exist and hinder broader JavaFX adoption.<br/>
<br/>
* ValidatorFX is probably only one part needed for application<br/>
developers. The other part is a form library that allows to layout<br/>
fields, have buttons (that are connected to field validation, etc.). It<br/>
looks like this is written again and again by every application developer.<br/>
<br/>
* To answer John's question if JavaFX could do more to help make tools<br/>
like ValidatorFX easy to build:<br/>
<br/>
** There's the TooltipWrapper class in ValidatorFX which works around<br/>
JDK-8090379. Not a big deal but something many application developers<br/>
will probably be annoyed by.<br/>
<br/>
** On a more general note, if I were the king of the JavaFX universe for<br/>
one day, I would forbid anyone to make classes or methods final. As an<br/>
application developer I prefer to be able to tweak things easily, even<br/>
if they may break in the future (which they will anyway ...). Don't take<br/>
that decision away from me, it's patronizing. But I guess this is one of<br/>
those things that depend very much on which side of the equation you<br/>
are, so don't take my troll bait :-).<br/>
<br/>
<br/>
--Robert<br/>
<br/>
<br/>
Am 03.03.24 um 02:10 schrieb John Hendrikx:<br/>
> Hi Dirk,<br/>
><br/>
> That is a very nice framework, and although I wouldn't be against its<br/>
> inclusion in FX, I'm more wondering if JavaFX could do more to help<br/>
> make tools like ValidatorFX easy to build.<br/>
><br/>
> I'm not quite sure how one can use not having validation as an<br/>
> argument against using FX, when there clearly are free alternatives<br/>
> available.  Surely not everything can or should be part of the base<br/>
> framework?  A line must be drawn somewhere, especially when there are<br/>
> very few core FX developers.<br/>
><br/>
> I'd much rather see work being done on things that can't be provided<br/>
> by 3rd parties, preferably by opening up more parts of FX with well<br/>
> specified API's.<br/>
><br/>
> --John<br/>
><br/>
> On 01/03/2024 11:59, Dirk Lemmermann wrote:<br/>
>> Hi everyone,<br/>
>><br/>
>> I updated the validation framework ValidatorFX today in our project<br/>
>> to the latest release and I really like it a lot. It is a small<br/>
>> compact API and works with any observable as opposed to the<br/>
>> validation support provided by ControlsFX.<br/>
>><br/>
>> Using it made me wonder whether it would make sense to bundle it or<br/>
>> something like it directly with JavaFX. Developers often mention<br/>
>> missing validation support as a drawback of using JavaFX. Adding this<br/>
>> would take one item off from the list of arguments against using JavaFX.<br/>
>><br/>
>> Many UI frameworks do have built-in validation support, e.g. Vaadin<br/>
>> [0], Angular, [1], or QT [2]<br/>
>><br/>
>> What do you think?<br/>
>><br/>
>> —Dirk<br/>
>><br/>
>> [0]<br/>
>> <a href="https://vaadin.com/docs/latest/binding-data/components-binder-validation" target="_blank">https://vaadin.com/docs/latest/binding-data/components-binder-validation</a><br/>
>> [1] <a href="https://angular.io/guide/form-validation" target="_blank">https://angular.io/guide/form-validation</a><br/>
>> [2] <a href="https://doc.qt.io/qt-6/qtquick-input-textinput.html" target="_blank">https://doc.qt.io/qt-6/qtquick-input-textinput.html</a><br/>
>></div>
</div>
</div>
</div></div></body></html>