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

[Pagination] Incorrect rendering.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • jdk1.8.0_b64


      1. Click "create control";
      2. Click "set disabled";
      The selected buuton ("1" by default) should be rendered over the right arrow.
      If bug doesn't appear set control enabled and disabled again or
      repeat steps 1, 2;

      package javafxapplication68;

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.geometry.Pos;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.Pagination;
      import javafx.scene.control.TextField;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaFXApplication68 extends Application {

          VBox vbControlContainer;
          Pagination testedControl;
          
          @Override
          public void start(Stage stage) {

              VBox vbLeft = new VBox(20d);
              
              vbControlContainer = new VBox(5d);
              vbControlContainer.setAlignment(Pos.CENTER);
              vbControlContainer.setMinWidth(300);
              vbControlContainer.setPrefWidth(300);
              vbControlContainer.setMaxWidth(300);
              vbControlContainer.setMinHeight(300);
              vbControlContainer.setPrefHeight(300);
              vbControlContainer.setMaxHeight(300);
              vbControlContainer.setStyle("-fx-border-color:RED");
              
              VBox vbSecond = new VBox(5d);
              vbSecond.setStyle("-fx-border-color:GREEN");
              
              Button btnSetDisabled = new Button("set disabled");
              btnSetDisabled.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent t) {
                      if (testedControl != null) {
                          testedControl.setDisable(true);
                      }
                  }
              });
              
              Button btnSetEnabled = new Button("set disabled");
              btnSetEnabled.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent t) {
                      if (testedControl != null) {
                          testedControl.setDisable(false);
                      }
                  }
              });
              
              Button btnCreateControl = new Button("crete control");
              btnCreateControl.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent t) {
                      testedControl = new Pagination();
                      testedControl.maxPageIndicatorCountProperty().set(3);
                      vbControlContainer.getChildren().clear();
                      vbControlContainer.getChildren().add(testedControl);
                  }
              } );
              
              vbSecond.getChildren().addAll(btnCreateControl, btnSetDisabled, btnSetEnabled);
              
              vbLeft.getChildren().addAll(vbControlContainer, vbSecond);
              
              HBox root = new HBox(20d);
              VBox vbRight = new VBox(5d);
              vbRight.setStyle("-fx-border-color:BLUE");
              
              VBox vb = new VBox(5d);
              for (int i = 0; i < 5; i++) {
                  HBox hb = new HBox(5d);
                  for (int j = 0; j < 10; j++) {
                      hb.getChildren().add(new TextField("Label " + j));
                  }
                  vb.getChildren().add(hb);
              }
              
              vbRight.getChildren().addAll(vb);
              root.getChildren().addAll(vbLeft, vbRight);
              
              Scene scene = new Scene(root, 800, 600);

              stage.setScene(scene);
              stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
              stage.show();
          }

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

      }

        1. Paginations-disabled.png
          2 kB
          Dmitry Zinkevich

            jgiles Jonathan Giles
            dzinkevi Dmitry Zinkevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: