org.scalafx.extras.generic_pane

Members list

Type members

Classlikes

Default implementation of the LastDirectoryHandler.

Default implementation of the LastDirectoryHandler.

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DirectorySelectionField(val title: String, val ownerWindow: Option[Window], val lastDirectoryHandler: LastDirectoryHandler, val columns: Int)

Directory selection control, accessible through view. The text field shows the path, the button opens a dialog to select the directory.

Directory selection control, accessible through view. The text field shows the path, the button opens a dialog to select the directory.

Value parameters

columns

width of the text field

lastDirectoryHandler

customize how directory selections are remembered between uses of the dialog.

ownerWindow

the owner window of the displayed dialog

title

dialogs title

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
class FileSelectionField(val title: String, val ownerWindow: Option[Window], val lastDirectoryHandler: LastDirectoryHandler, val columns: Int)

File selection control, accessible through view. The text field shows the path, the button allow browsing to select the File.

File selection control, accessible through view. The text field shows the path, the button allow browsing to select the File.

Value parameters

columns

width of the text field

lastDirectoryHandler

customize how directory selections are remembered between uses of the dialog.

ownerWindow

the owner window of the displayed dialog

title

dialogs title

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class GenericDialogFX(val title: String, val header: String, ownerWindow: Option[Window], val lastDirectoryHandler: LastDirectoryHandler) extends GenericPaneBase

A helper for crating custom dialogs. Particularly suited for creation of input 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 using showDialog() method
  3. Reading of input, once the dialog is closed, dialog content can be read using next*() 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")
   }

Value parameters

header

dialog header

lastDirectoryHandler

customize how directory selections are remembered between uses of the dialog. Used with addDirectoryField and addFileField.

ownerWindow

optional owner window that will be blocked when this dialog is displayed.

title

dialogs title

Attributes

See also

GenericPane

Companion
object
Supertypes
class Object
trait Matchable
class Any
class GenericPane(val lastDirectoryHandler: LastDirectoryHandler) extends GenericPaneBase

A helper for crating custom panes. Particularly suited for creation of input controls.

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 call resetReadout() 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()}")

Value parameters

lastDirectoryHandler

customize how directory selections are remembered between uses of the dialog. Used with addDirectoryField and addFileField.

Attributes

See also

GenericDialogFX

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Customize how directory selections are remembered between uses of the dialog.

Customize how directory selections are remembered between uses of the dialog.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class NumberTextField(decimalPlaces: Int) extends TextField

Attributes

Supertypes
class TextField
trait AlignmentDelegate[TextField]
class TextInputControl
class Control
trait Skinnable
class Region
class Parent
class Node
trait Styleable
class EventTarget
trait SFXDelegate[TextField]
class Object
trait Matchable
class Any
Show all
object Utils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Utils.type