Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114061

Pulse stops firing while dragging a SplitPane divider

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      windows 7

      Description

      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());
          }
      }
      ------------------------------------







        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kcr Kevin Rushforth
              Reporter:
              kwwong Kinsley Wong
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: