Dialog

introprog.Dialog
object Dialog

A module with utilities for creating standard GUI dialogs.

Attributes

Source
Dialog.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Dialog.type

Members list

Value members

Concrete methods

def file(button: String = ..., startDir: String = ...): String

Show a file choice dialog starting in startDir with confirm button text.

Show a file choice dialog starting in startDir with confirm button text.

Value parameters

button

the text displayed in this file choice dialog's confirm button

startDir

the starting directory of this file choice dialog

Attributes

Returns

the file path entered by user upon pressing confirm button, an empty String if user pressed the file choice dialog's cancel button

Source
Dialog.scala
def input(message: String, init: String = ...): String

Show a message asking for input with init value. Return user input.

Show a message asking for input with init value. Return user input.

Value parameters

init

intitial value displayed in input dialog

message

prompt text displayed for user

Attributes

Returns

user input, or an empty string on Cancel

Source
Dialog.scala
def isOK(question: String = ..., title: String = ...): Boolean

Show a confirmation dialog with question and OK and Cancel buttons.

Show a confirmation dialog with question and OK and Cancel buttons.

Attributes

Source
Dialog.scala
def select(message: String, buttons: Seq[String], title: String = ...): String

Show a selection dialog with buttons. Return a String with the chosen button text.

Show a selection dialog with buttons. Return a String with the chosen button text.

Value parameters

buttons

the sequence of buttons to be displayed in this dialog

message

text describing the choice to be made by the user

title

the title of this dialog

Attributes

Returns

a String with the chosen button text

Source
Dialog.scala
def selectColor(message: String = ..., default: Color = ...): Color

Show a color selection dialog and return the color that the user selected.

Show a color selection dialog and return the color that the user selected.

Attributes

Source
Dialog.scala
def show(message: String): Unit

Show a dialog with a message text.

Show a dialog with a message text.

Attributes

Source
Dialog.scala