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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 7u6
    • Component/s: javafx
    • Environment:

      2.2.0b13.

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: