Restructure Builders.kt and Nodes.kt into Controls.kt, ItemControls.kt and Layouts.kt
See original GitHub issueFor a while I’ve been bothered by the structure of Builders.kt vs Nodes.kt. We have stuff in Builders.kt that are not builders, but rather just extension functions that probably belong in Nodes.kt. (Example: TableView<S>.column
- this does not change the hierarchy, and is not an extension of Pane
).
Maybe it’s time to consider organising this differently. We could create one file for List/Table-like controls, and include both builders and extensions for these controls in that file. Similarly, all text based builders and extensions like TextField and TextArea could go into one file etc.
This will make it much easier to see what’s available (and what’s missing) for a certain control or group of controls.
I’m still very fond of keeping everything in the tornadofx
package, so you still only need a single import to work with the whole framework.
This change would not affect usage of the framework in any way.
Thoughts or other suggestions?
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (15 by maintainers)
Top GitHub Comments
Single package framework sounds good. I also think the files should be restructured a bit.
Controls.kt
andLayouts.kt
seem plausible. There could beItemControls
instead ofListControls
for all that have items (ComboBox
,ListView
,TableView
, …). UnfortunatelyTreeView
doesn’t fit into the item concept.BTW: I started using
asyncItems()
,observable()
andcolumn()
. Very useful additions. 👍Well, actually - as functionality grows, maybe a better way to structure this will present itself. There might become a need for a more fine grained structure. For now however, these three files are quite manageable. If anyone wants to group functions or add some comments that very welcome!
I’ll close this ticket as the main objective was achieved. @ronsmits will probably have some comments with regards to issue https://github.com/edvin/tornadofx/issues/100 😃