ScalaFX-Extras v.0.8.0
This release of ScalaFX-Extras add ability to conveniently add fields and read data from a pane using GenericPane. Add a couple bug fixes
New features
In addition to GenericDialogFX there is a GenericPane that can be used to build a Pane that can be used with more
granularity in designing UIs. It can be used as a part of other, more complex, control. Example:
import scalafx.application.JFXApp3
import scalafx.application.JFXApp3.PrimaryStage
import scalafx.geometry.Insets
import scalafx.scene.Scene
import scalafx.scene.control.Button
import scalafx.scene.layout.VBox
import scalafx.scene.paint.*
import scalafx.scene.paint.Color.*
import scalafx.scene.text.Text
object GenericPaneDemo extends JFXApp3:
override def start(): Unit =
val gp = new GenericPane():
addDirectoryField("Input", "images")
addDirectoryField("Output", "output")
stage = new PrimaryStage:
title = "GenericPane Demo"
scene = new Scene:
content = new VBox:
padding = Insets(7, 7, 7, 7)
spacing = 7
children = Seq(
gp.pane,
new Button("Print Fields"):
onAction = (_) =>
gp.resetReadout()
println(s"Input dir : ${gp.nextString()}")
println(s"Output dir: ${gp.nextString()}")
)The scalafx-extras-demos subproject has an example.
Additional features:
- The preferred width (expressed in text columns) of the text field in
FileSelectionFieldcan now be controlled. This
adds similar options toGenericPaneBase.addDirectoryFieldGenericPaneBase.addFileField
Breaking Changes
- Package name
org.scalafx.extras.generic_dialogwas changed toorg.scalafx.extras.generic_pane - The constructor of
GenericDialogFXparameter's nameparentWindowwas changes toownerWindowto avoid conflict
with similarly named parameter inGenericPaneBase
All changes:
- Add: Generic Pane [#22]
- Fix:
GenericPaneBase.addDirectoryField- is ignoring argument columns [#23] - Fix:
GenericPaneBase.addFileFieldis missing argument columns [#24] - Fix:
IllegalAccessErrorinAutoDialog(0.7.0) [#25]
To post questions please use Project Discussions or ScalaFX Users Group
Full Changelog: v.0.7.0...v.0.8.0