/VirtualizedFX

Primary LanguageJavaGNU Lesser General Public License v3.0LGPL-3.0

HitCount GitHub Workflow Status GitHub issues GitHub pull requests GitHub

VirtualizedFX

VirtualizedFX is yet another attempt at creating an efficient and flexible virtual flow for JavaFX. For those who don't know what a VirtualFlow is I suggest you reading these articles which also helped me a lot in the realuzation of VirtualizedFX: [1], [2], [3], [4].

Unlike other VirtualFlows, VirtualizedFX's code is well documented, well organized and fairly simple which not only makes the project easier to maintain but also easier to understand, also it doesn't depend on any third party library/software.

As of now VirtualizedFX offers only a basic Virtual Flow to implement ListViews, TableViews and maybe also TreeViews. The cells must have fixes sizes depending on the orientation (fixed width for horizontal flows, and fixed height for vertical flows) and this is the most efficient form of Virtual Flow. In the future I would also like to implement more complex Virtual Flows, one that doesn't care about cells sizes, one specifically for TreeViews and who knows what else.

SimpleVirtualFlow

SimpleVirtualFlow is the basic implementation of a Virtual Flow offered by VirtualizedFX. Without talking about that blob/spaghetti coding that is the JavaFX VirtualFlow, let's compare it to Flowless.
  • The base idea of cells is the same. For VirtualizedFX Cells are just dumb controls they do not have any logic and they aren't even nodes. This makes the Virtual Flow extremely flexible and efficient.
  • Cells are always reused, this makes the code easier, and the Virtual Flow more efficient as creating new Nodes is way more heavy on performance rather than updating them, consider that the user can scroll at very fast speeds, and creating new cells at those speeds is a no go for a component that has efficiency as a top priority.
  • There are empty cells, or to be more precise, they are hidden if they are not needed. This allows to do some cool tricks with the Virtual Flow, for example you could create paginated lists or tables. In such cases for example the last page may not have enough items to fill the viewport so the unneeded cells are hidden.

Getting Started

In this section you can learn what do you need to use my library in your projects.

Build

To build VirtualizeFX, execute the following command:

gradlew build

NOTE : VirtualizedFX requires Java 11 and above.

Usage

Gradle
repositories {
    mavenCentral()
}

dependencies {
    implementation 'io.github.palexdev:virtualizedfx:11.2.4'
}
Maven
<dependency>
    <groupId>io.github.palexdev</groupId>
    <artifactId>virtualizedfx</artifactId>
    <version>11.2.4</version>
</dependency>

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU LGPLv3 License. See LICENSE for more information.

Contact

Alex - alessandro.parisi406@gmail.com
Discord

Project Link: https://github.com/palexdev/VirtualizedFX

Donation

Implementing a new Virtual Flow from scratch has been a really hard task, such a low level component. But the satisfaction in having today something so complex that works so good is immense. If you are using VirtualizedFX in your projects and feel like it, you can make a small donation here: Donate, it would really make my day.

Supporters:

(If you want your github page to be linked here and you didn't specify your username in the donation, feel free to contact me by email and tell me. Also contact me if for some some reason you don't want to be listed here)

  • Your name can be here by supporting me at this link, Support