r/JavaFX • • Jan 26 '21

I made this! JavaFX custom TreeView from scratch

11 Upvotes

Hello everyone, two weeks ago I posted a GIF here showing my custom implementation of a TreeView.

However, the animation and the layout were inaccurate and the performance was terrible.

For testing the tree I built a simple TreeView with some dummy items and a more complex one with items from the file system.

The latter was slow and sometimes the app would crash throwing an OutOfMemoryException.

I was about to give up, but then I decided to start from scratch again and think more about each piece of code.

This is the result, and also a comparison with the old one for reference: Preview

As you can see the tree is built much faster and the memory usage is reasonable. Of course for big tree structures I suggest implementing some kind of lazy loading or other strategies.

The tree is not yet available as part of a jar because it's still unfinished, but you can find the source here: MaterialFX

I added support for single and multiple selection, cell factory, iterator and stream.

About the cell factory, in the JavaFX's tree the cell factory is a property of the TreeView class, in my implementation it is a property of the TreeItem class.

That means that every item knows how to build its own cell, so potentially you can render different cells for different items as long as you change the cell factory of course.

Beware though, this feature is still untested because I focused my attention on the most common/important features, also, despite already having unit tests I can't assure you it is bug free 😄.

Let me know what you think! 😉


r/JavaFX • • Jan 10 '21

UI Design Trends 2021 - a challenge for JavaFX

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Jan 05 '21

Deploying and packaging JavaFX app into an installer

11 Upvotes

I just finished developing my first javaFX app and I am currently looking into the best ways to deploy the app onto the client's machine. I would also want to apply some sort of continuous deployment onto the app, as I prefer not to send the client a new installer whenever I update the code.

What is the best way to achieve that?

Thank you


r/JavaFX • • Nov 30 '20

Ikonli 12.0.0 Released!

11 Upvotes

r/JavaFX • • Oct 09 '20

JavaFX Software: Window-ception

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Aug 30 '20

JavaFX in the wild! Chaos Probe: Stability Analysis Tool For Deep Learning Models built using JavaFX

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Apr 19 '20

Tutorial JavaFX Software: Client-Server Calculator (HTTP, MVC)

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Oct 19 '19

FXGLvania - Castlevania themed game using FXGL

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Jul 31 '19

Mimic .NET CodeBehind with FXML; loading views, controllers and css just got drastically simpler

Thumbnail
github.com
11 Upvotes

r/JavaFX • • Apr 08 '19

FXGL 11: Platformer Progress Demo

Thumbnail
youtube.com
11 Upvotes

r/JavaFX • • Mar 01 '19

Javafx on jdk 11

11 Upvotes

Hello,

I see a lot of people trying to asking about how to create a javafx app under jdk 11.

I would like to redirect you to the community page, where you can find tutorials and quick guides.

https://openjfx.io/

Also, feel free to contact for any question.


r/JavaFX • • Aug 28 '18

JavaFX links of the week, August 27 | JavaFX News, Demos and Insight // FX Experience

Thumbnail
fxexperience.com
11 Upvotes