EventIncludes

scalafx.event.EventIncludes
See theEventIncludes companion trait
object EventIncludes extends EventIncludes

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Deprecated and Inherited methods

def handle[J <: Event, R](handler: => R): EventHandler[J]

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 parameters

J

JavaFX Event subclass.

Value parameters

handler

code executed when event is handled.

Attributes

Returns

JavaFX EventHandler which will wrap the input code handler.

Deprecated
true
Inherited from:
EventIncludes

Implicits

Inherited implicits

implicit def eventClosureWrapperWithParam[J <: Event, S <: SFXDelegate[J], R](handler: S => R)(implicit jfx2sfx: J => S): EventHandler[J]

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 parameters

J

JavaFX Event subclass.

Value parameters

handler

Closure that that takes scalafx.event.Event as argument.

Attributes

Returns

JavaFX EventHandler which handle method will call handler

Inherited from:
EventIncludes
implicit def eventClosureWrapperWithZeroParam[T <: Event, R](handler: () => R): EventHandler[T]

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 parameters

T

JavaFX Event subclass.

Value parameters

handler

Closure that ''will not'' handle event.

Attributes

Returns

JavaFX EventHandler which handle method will call handler

Inherited from:
EventIncludes
implicit def jfxActionEvent2sfx(ae: ActionEvent): ActionEvent

Converts a `javafx.event.ActionEvent` instance to its ScalaFX counterpart.

Converts a `javafx.event.ActionEvent` instance to its ScalaFX counterpart.

Value parameters

ae

JavaFX ActionEvent

Attributes

Returns

ScalaFX ActionEvent

Inherited from:
EventIncludes
implicit def jfxEvent2sfx(e: Event): Event

Converts a `javafx.event.Event` instance to its ScalaFX counterpart.

Converts a `javafx.event.Event` instance to its ScalaFX counterpart.

Value parameters

e

JavaFX Event

Attributes

Returns

ScalaFX Event

Inherited from:
EventIncludes
implicit def jfxEventDispatchChain2sfx(e: EventDispatchChain): EventDispatchChain

Attributes

Inherited from:
EventIncludes
implicit def jfxEventDispatcher2sfx(e: EventDispatcher): EventDispatcher

Attributes

Inherited from:
EventIncludes
implicit def jfxEventTarget2sfx(e: EventTarget): EventTarget

Attributes

Inherited from:
EventIncludes
implicit def jfxEventType2sfx[T <: Event](e: EventType[T]): EventType[T]

Converts a `javafx.event.EventType` instance to its ScalaFX counterpart.

Converts a `javafx.event.EventType` instance to its ScalaFX counterpart.

Type parameters

T

Event Type

Value parameters

e

JavaFX EventType

Attributes

Returns

ScalaFX EventType

Inherited from:
EventIncludes
implicit def jfxWeakEventHandler2sfx[T <: Event](weh: WeakEventHandler[T]): WeakEventHandler[T]

Converts a `javafx.event.WeakEventHandler` instance to its ScalaFX counterpart.

Converts a `javafx.event.WeakEventHandler` instance to its ScalaFX counterpart.

Type parameters

T

Event Type

Value parameters

weh

JavaFX WeakEventHandler

Attributes

Returns

ScalaFX WeakEventHandler

Since

8.0

Inherited from:
EventIncludes