Java Code Examples for javafx.scene.control.Button.setOnMouseExited()

The following are Jave code examples for showing how to use setOnMouseExited() of the javafx.scene.control.Button class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: voogasalad-ltub   File: GameChooser.java   Source Code and License Vote up 5 votes
private void getRotation(Button button){

		RotateTransition rotation = new RotateTransition(Duration.seconds(3), button);
		rotation.setCycleCount(Animation.INDEFINITE);
		rotation.setByAngle(360);
		
		button.setOnMouseEntered(e -> rotation.play());
		button.setOnMouseExited(e -> rotation.pause());
	}