Return to Snippet

Revision: 50478
at August 24, 2011 08:32 by laurenceosx


Updated Code
def doAction( aClosure ) {
	// Example: button1.onAction = doAction( { println "click" } );
	return [
		handle: { aClosure.call(it) }
	] as javafx.event.EventHandler<javafx.event.ActionEvent>;
}

Revision: 50477
at August 24, 2011 08:29 by laurenceosx


Initial Code
def doAction( aClosure ) {
	// button1.onAction = doAction( { println "click" } );
	return [
		handle: { aClosure.call(it) }
	] as javafx.event.EventHandler<javafx.event.ActionEvent>;
}

Initial URL

                                

Initial Description

                                

Initial Title
JavaFX2 Button Click with Groovy

Initial Tags

                                

Initial Language
Groovy