<div dir="ltr">One thing worth considering is that the approach of putting everything in a third party library makes it much harder to find things. JavaFX has a lot of capabilities that you can't find out about unless you spend time maintaining an encyclopedic knowledge of hundreds of GitHub repositories. This isn't unique to JavaFX obviously, lots of frameworks and ecosystems have the same issue. But there is tremendous value in standard libraries, in having things be in one place where browsing the docs or using autocomplete is sufficient to discover them.<div><br></div><div>Consider if there was no javafx.controls module! Instead for every widget you had to find them on GitHub and they all came from different authors, had different levels of documentation, might conflict with each other and so on. Some toolkits do work that way (e.g. reactjs, compose) but I didn't enjoy it much.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 22 Jan 2023 at 17:38, Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com">thiago.sayao@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">label = "%key"<div dir="auto"><br></div><div dir="auto">tableViewBuilder.enableI18n(true).build();</div><div dir="auto"><br></div><div dir="auto">It's just an idea. It also can be done setting a i18n transformer class on the builder.</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Em dom., 22 de jan. de 2023 13:24, Michael Strauß <<a href="mailto:michaelstrau2@gmail.com" target="_blank">michaelstrau2@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This looks interesting, but I'd rather have this as a library.<br>
One question: how does this approach work with language localization,<br>
given that "label" is a constant?<br>
<br>
On Sun, Jan 22, 2023 at 1:08 AM Thiago Milczarek Sayão<br>
<<a href="mailto:thiago.sayao@gmail.com" rel="noreferrer" target="_blank">thiago.sayao@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> TableView data usually comes from a database and is mapped to java objects (I don't have actual statistics on this but it's probably a true assertion).<br>
> It Would be very useful if we could just copy database mapped objects to javafx observables and say: Display it on a tableview.<br>
> Configuration of each column would be done as an annotation, like this:<br>
><br>
> public class EmployeeObservable {<br>
> @Column(label = "Registration", style = "-fx-alignment: right")<br>
> private IntegerProperty registration = new SimpleIntegerProperty();<br>
><br>
> @Column(label = "Name")<br>
> private StringProperty name = new SimpleStringProperty();<br>
><br>
> @Column(label = "Salary", converter = BigDecimalCurrencyConverter.class)<br>
> private ObjectProperty<BigDecimal> salary = new SimpleObjectProperty<>();<br>
><br>
> //boilerplate here<br>
> }<br>
><br>
><br>
> Other annotation options:<br>
><br>
> @Column(ignore = true)<br>
><br>
> @Column(graphicsConverter = CheckBoxGraphicsConverter.class)<br>
><br>
> And to apply it:<br>
><br>
> TableViewBuilder<EmployeeObservable> builder = new TableViewBuilder<>(tableView, EmployeeObservable.class);<br>
> builder.build();<br>
><br>
><br>
> I actually have implemented this and it's very useful. I can't share it because I've done it for a private company, but it's easy to re-do it.<br>
><br>
> I'm not sure if it would go in a general purpose toolkit, but I thought it would be nice to share (the idea).<br>
><br>
> -- Thiago.<br>
><br>
</blockquote></div></div>
</blockquote></div>