dlsc-software-consulting-gmbh / GemsFX

A collection of JavaFX controls and utilities.
Apache License 2.0
445 stars 52 forks source link

Introducing Spacer Component for Dynamic Growth Direction in HBox and VBox #79

Closed leewyatt closed 8 months ago

leewyatt commented 9 months ago

Summary: To enhance the layout management in our JavaFX application, we have encapsulated a new component named Spacer.

Background: We frequently use the Region inside HBox and VBox, allowing it to auto-grow to separate two components. This frequent use case led us to create a more efficient solution.

Details: The Spacer component is designed to automatically determine its growth direction based on its parent component, whether it's an HBox or a VBox. This dynamic direction determination enables us to achieve effective separation between components without manually setting the growth direction every time.

Benefits:

Simplifies layout management. Reduces the need for repetitive code when separating components in HBox and VBox. Provides a more intuitive way to handle dynamic component spacing. We believe this new Spacer component will streamline the layout process and make the user interface development more efficient. Feedback and further testing are welcomed.