Generated Object

javafx.event.EventHandler

Attributes

onEvent either a Groovy closure or a javafx.event.EventHandler<KeyEvent>, see javafx.event.EventHandler and javafx.scene.input.KeyEvent. The closure takes a KeyEvent object as its argument.

Content

None

Usage

Used to pass key typed events to a javafx node.

Examples

circle ( centerX: 50, centerY: 50, radius: 25,
                fill: rgb(0,0,255), onKeyTyped: {println 'mouse clicked event'})



circle (centerX: 100, centerY: 50, radius: 25, fill: red) {
    onKeyTyped(onEvent: { event-> println 'key pressed event ' + event.character})
}