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

[Pagination] PageCount property changing lead to exception, when unidirectionally binded.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7u6
    • 7u6
    • javafx
    • 2.2.0b13.

      Run code:

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Pagination;
      import javafx.scene.control.Slider;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaApplication44 extends Application {

          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(Stage stage) throws Exception {
              VBox vb = new VBox();
              Pagination pagination = new Pagination(10);
              pagination.setPageCount(10);
              
              Slider slider = new Slider();
              slider.setMin(-10);
              slider.setMax(10);
              slider.setValue(10);
              slider.setShowTickLabels(true);
              slider.setShowTickMarks(true);
              
              pagination.pageCountProperty().bind(slider.valueProperty());
              
              vb.getChildren().addAll(pagination, slider);
              
              Scene scene = new Scene(vb, 300, 300);
              stage.setScene(scene);
              stage.show();
          }
      }


      Change slider's value to negative value.

            kwwong Kinsley Wong (Inactive)
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: