Skip to content

ScalaFX-Extras v.0.8.0

Compare
Choose a tag to compare
@jpsacha jpsacha released this 24 Apr 00:01
· 53 commits to master since this release
v.0.8.0
52b88e2

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 FileSelectionField can now be controlled. This
    adds similar options to
    • GenericPaneBase.addDirectoryField
    • GenericPaneBase.addFileField

Breaking Changes

  • Package name org.scalafx.extras.generic_dialog was changed to org.scalafx.extras.generic_pane
  • The constructor of GenericDialogFX parameter's name parentWindow was changes to ownerWindow to avoid conflict
    with similarly named parameter in GenericPaneBase

All changes:

  • Add: Generic Pane [#22]
  • Fix: GenericPaneBase.addDirectoryField - is ignoring argument columns [#23]
  • Fix: GenericPaneBase.addFileField is missing argument columns [#24]
  • Fix: IllegalAccessError in AutoDialog (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