Skip to content

Commit

Permalink
Add release notes for version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsacha committed Jul 14, 2022
1 parent d40adbe commit 97c22e3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions notes/0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### ScalaFX-Extras Release v.0.6.0

This release add a new class for convenient creation of input dialogs: `GenericDialogFX`. You can easily add controls to
he dialog then
read their values after the dialog was closed

```scala
// Create a dialog
val dialog =
new GenericDialogFX(
title = "GenericDialogFX Demo",
header = "Fancy description can go here."
) {
// Add fields
addCheckbox("Check me out!", defaultValue = false)
addCheckbox("Check me too!", defaultValue = true)
}

// Show dialog to the user
dialog.showDialog()

// Read input provided by the user
if (dialog.wasOKed) {
val select1 = dialog.nextBoolean()
val select2 = dialog.nextBoolean()

println(s"Selection 1: $select1")
println(s"Selection 2: $select2")
} else {
println("Dialog was cancelled.")
}
```

The `scalafx-extras-demos` subproject has a more elaborated example.

Enhancements:

* Support creation of custom dialogs, like ImageJ's GenericDialog #16
* Let any standard dialog be displayed with a one-liner #17

To post questions please use [Project Discussions][Discussions] or [ScalaFX Users Group][scalafx-users]

[Discussions]: https://github.com/scalafx/scalafx-extras/discussions

[scalafx-users]: https://groups.google.com/forum/#!forum/scalafx-users

[Issue #16]: https://github.com/scalafx/scalafx-extras/issues/16

[Issue #17]: https://github.com/scalafx/scalafx-extras/issues/17

0 comments on commit 97c22e3

Please sign in to comment.