To reproduce. (You may need to do this several times to reproduce this bug.)
1. Click and drag the divider to the left or right
2. Click and drag the divider again in the opposite direction.
When the divider stops moving the bug is reproduced. Notice the divider position is still being updated but the pulse stops firing. The pulse will continue to fire after another mouse or window resize event.
========== test code ==========
import com.sun.javafx.tk.TKPulseListener;
import com.sun.javafx.tk.Toolkit;
import javafx.application.Application;
import javafx.scene.control.SplitPaneBuilder;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.scene.layout.StackPaneBuilder;
public class RT15407 extends Application implements TKPulseListener {
public static void main(String[] args) {
launch(args);
}
public void start(Stage stage) {
VBox list = new VBox(25);
stage.setX(100);
stage.setY(100);
Scene scene = new Scene(list, 300, 300);
stage.setScene(scene);
// stage.setVisible(true);
stage.show();
final SplitPane pane = SplitPaneBuilder.create().items(
StackPaneBuilder.create().children().alignment(Pos.CENTER).build(),
StackPaneBuilder.create().children().alignment(Pos.CENTER).build()
).prefWidth(200).prefHeight(200).build();
pane.getDividers().get(0).positionProperty().addListener(new InvalidationListener() {
public void invalidated(Observable o) {
System.out.println("DIVIDER POSITION " + o);
}
});
list.getChildren().add(pane);
Toolkit tk = Toolkit.getToolkit();
tk.addSceneTkPulseListener(this);
}
public void pulse() {
System.out.println("PULSE " + System.currentTimeMillis());
}
}
------------------------------------