YesNoAlert

ij_plugins.scala.console.YesNoAlert$
object YesNoAlert

Show a confirmation dialog with "Yes", "No", and "Cancel" buttons.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def apply(parent: Window, title: String, header: String, content: String): Alert
 val alert = YesNoAlert(
   parent = stage
   title = "Confirmation Dialog with Custom Actions",
   header = "Look, a Confirmation Dialog with Custom Actions.",
   content = "Choose your option."
 )

 val result = alert.showAndWait()

 result match {
   case Some(ButtonTypeYes) => println("... user chose \"Yes\"")
   case Some(ButtonTypeNo) => println("... user chose \"No\"")
   case _ => println("... user chose CANCEL or closed the dialog")
 }

Attributes

content

main content.

header

header text.

parent

parent window.

title

title of the dialog.

Returns:

selected button.

Concrete fields

val ButtonTypeCancel: ButtonType
val ButtonTypeNo: ButtonType
val ButtonTypeYes: ButtonType