Contains implicit methods to convert from `javafx.event` Classes to their ScalaFX counterparts.
Contains implicit methods to convert from `javafx.event` Classes to their ScalaFX counterparts.
- Companion
- object
Value members
Deprecated methods
NOTE: use of handle
is deprecated in Scala 2.12 and newer, you can use standard Scala syntax:
NOTE: use of handle
is deprecated in Scala 2.12 and newer, you can use standard Scala syntax:
button.onAction = _ => {
println("Handling button action")
doSomething()
}
For Scala 2.11 and older, you can use handle
to create a simple event handler when information about event is not be used.
Enables following use:
button.onAction = handle {
println("Handling button action")
doSomething()
}
- Type Params
- J
JavaFX Event subclass.
- Value Params
- handler
code executed when event is handled.
- Returns
JavaFX EventHandler which will wrap the input code
handler
.- Deprecated
Implicits
Implicits
Converts a closure to a JavaFX EventHandler. It is used when the event properties ''will be used''.
Converts a closure to a JavaFX EventHandler. It is used when the event properties ''will be used''.
Enables following use:
button.onAction = (e:ActionEvent) => {
println("Handling button action: " + e)
doSomething(e)
}
- Type Params
- J
JavaFX Event subclass.
- Value Params
- handler
Closure that that takes scalafx.event.Event as argument.
- Returns
JavaFX EventHandler which handle method will call handler
Converts a closure to a JavaFX EventHandler. It is used when information about event is not be used.
Converts a closure to a JavaFX EventHandler. It is used when information about event is not be used.
Enables following use:
button.onAction = () => {
println("Handling button action")
doSomething()
}
- Type Params
- T
JavaFX Event subclass.
- Value Params
- handler
Closure that ''will not'' handle event.
- Returns
JavaFX EventHandler which handle method will call handler
Converts a `javafx.event.ActionEvent` instance to its ScalaFX counterpart.
Converts a `javafx.event.ActionEvent` instance to its ScalaFX counterpart.
- Value Params
- ae
JavaFX ActionEvent
- Returns
ScalaFX ActionEvent
Converts a `javafx.event.Event` instance to its ScalaFX counterpart.
Converts a `javafx.event.Event` instance to its ScalaFX counterpart.
- Value Params
- e
JavaFX Event
- Returns
ScalaFX Event
Converts a `javafx.event.EventType` instance to its ScalaFX counterpart.
Converts a `javafx.event.EventType` instance to its ScalaFX counterpart.
- Type Params
- T
Event Type
- Value Params
- e
JavaFX EventType
- Returns
ScalaFX EventType
Converts a `javafx.event.WeakEventHandler` instance to its ScalaFX counterpart.
Converts a `javafx.event.WeakEventHandler` instance to its ScalaFX counterpart.
- Type Params
- T
Event Type
- Value Params
- weh
JavaFX WeakEventHandler
- Returns
ScalaFX WeakEventHandler
- Since
8.0