A grid component for javafx
Grid is a JavaFX (8) component that is intended for different kinds of small games that are based on a grid of squares like chess or sudoku.
Examples are:
The grid will resize itself automatically so that all available space is used. The aspect ratio of the squares will not be influenced by the resizing.
When the window is resized the grid will also automatically scale down/up.
The number of columns and rows of the grid can be controlled by javafx properties. This means that the grid will automatically add/remove new cells when the number of columns/rows is increased or decreased.
Every cell has a state that defines how it is rendered. The available states are defined by the developer with an enum.
There is a separation of the GridView
and GridModel
.