package generic_pane
- Alphabetic
- Public
- Protected
Type Members
- class DefaultLastDirectoryHandler extends LastDirectoryHandler
Default implementation of the
LastDirectoryHandler
. - class DirectorySelectionField extends AnyRef
Directory selection control, accessible through
view
.Directory selection control, accessible through
view
. The text field shows the path, the button opens a dialog to select the directory. - class FileSelectionField extends AnyRef
File selection control, accessible through
view
.File selection control, accessible through
view
. The text field shows the path, the button allow browsing to select the File. - class GenericDialogFX extends GenericPaneBase
A helper for crating custom dialogs.
A helper for crating custom dialogs. Particularly suited for creation of input dialogs.
There are 3 steps to using a dialog: 1. Creation, where elements of the dialog are appended vertically using
add*(...)
methods, for instance,addStringField(label, defaultText)
2. User interaction, dialog is displayed usingshowDialog()
method 3. Reading of input, once the dialog is closed, dialog content can be read usingnext*()
methods. Content is read in the order it is added.Here is en example:
val dialog = new GenericDialogFX( title = "GenericDialogFX Demo", "Fancy description can go here." ) { addCheckbox("Check me out!", defaultValue = false) addCheckbox("Check me too!", defaultValue = true) } dialog.showDialog() if (dialog.wasOKed) { val select1 = dialog.nextBoolean() val select2 = dialog.nextBoolean() println(s"Selection 1: $select1") println(s"Selection 2: $select2") }
- See also
GenericPane
- class GenericPane extends GenericPaneBase
A helper for crating custom panes.
A helper for crating custom panes. Particularly suited for creation of input controls.
There are 4 steps to using a generic pane:
1. Creation, where elements of the pane are appended vertically using
add*(...)
methods, * for instance,addStringField(label, defaultText)
2. Adding the pane to the UI
3. User interaction, after the pane is displayed
4. Optionally, reading of input. Pane editable content can be read using
next*()
methods. Content is read in the order it is added. The whole pane content can be read multiple tiles. Remember to callresetReadout()
to ensure that reading is restarted from the beginning of the pane.Example:
// Build a pane val gp = new GenericPane() gp.addDirectoryField("Input", "images") gp.addDirectoryField("Output", "output") // Use it in some other control ... // Later ... // Print its content gp.resetReadout() println(s"Input dir : ${gp.nextString()}") println(s"Output dir: ${gp.nextString()}")
- See also
GenericDialogFX
- trait GenericPaneBase extends AnyRef
- trait LastDirectoryHandler extends AnyRef
Customize how directory selections are remembered between uses of the dialog.
- class NumberTextField extends TextField
Value Members
- object DirectorySelectionField
- object GenericDialogFX
- object Utils
Helper methods and classes to simplify ScalaFX use.
Package
org.scalafx.extras
contains basic helper methods for running tasks on threads and showing messages.Package
org.scalafx.extras.image
contains image display component with scrolling and zooming.Package
org.scalafx.extras.mvcfx
contains classes for creating with UI components based on FXML.