Closed gtnarg closed 7 years ago
OK, trying this off the top of my head first.
To support this properly, an AbstractField
class was added with the default functionality of the old Field class. Then two subclasses were added: Field
and ButtonBarField
.
Abstract field also has an abstract inputContainer: Region
property. For the standard Field
class, this is either an HBox
or VBox
depending on the orientation
property (javafx.geometry.Orientation
). For ButtonBarField
this is a ButtonBar
. This was done so that the builders would operate on the correct parent type. I haven't thought about if this is necessary for the JavaFX version.
The Form.labelContainerWidth
function now gets a height
property, I think it didn't use to. I think there was a bug inside Field.computePrefWidth
as well, where fieldset.labelPosition == HORIZONTAL
should be changed to fieldset.labelPosition == VERTICAL
.
labelFor
)This was done as an extension function on node, it will probably be a function on AbstractField
in the JavaFX version.
That's all I can remember right now, I think this covers most of it :)
Important notice: The field
builder used to operate on the inputContainer
inside the Field
. This has been changed so that it now operates on the
field itself. If you did something like parent.isVisible = false
to hide the field, you must now change your code to isVisible = false
. This new
behavior is more as one would expect and hopefully the change won't cause any trouble to anyone.
This doesn't apply to the Java version, since there are no builders.
Okay - thanks
I'll close this issue as your PR took care of all of it!
The Form functionality feature set is behind that available in the TornadoFx (Kotlin) version.
If you provide a list of features that are missing, I will attempt to update the functionality here to be in sync.
Thanks, Grant