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

Shapes: Stroke invalid render after set style from runLater called from another thread

    Details

      Description

      Code to reproduce :
       
          @Override
          public void start(Stage stage) throws Exception {
              final String STYLE = "-fx-fill: green;"
                                           + "-fx-stroke: red;"
                                           + "-fx-stroke-width: 6;"
                                           + "-fx-stroke-type: inside;";
              BorderPane root = new BorderPane();
              final QuadCurve cubic1 = getCubic();
              final QuadCurve cubic2 = getCubic();
              cubic2.setStyle(STYLE);

              ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
              service.schedule(new Runnable() {
                  @Override
                  public void run() {
                      Platform.runLater(new Runnable() {
                          @Override
                          public void run() {
                              cubic1.setStyle(STYLE);
                          }
                      });

                  }
              }, 5, TimeUnit.SECONDS);


              VBox panel = new VBox(30);
              panel.getChildren().addAll(new Button("Button"), cubic1, cubic2);
              root.setCenter(panel);
              Scene scene = new Scene(root, 600, 300);
              stage.setScene(scene);
              stage.setTitle(VersionInfo.getRuntimeVersion());
              stage.show();
          }

        Attachments

          Activity

            People

            • Assignee:
              kcr Kevin Rushforth
              Reporter:
              slugovoy Sergey Lugovoy (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: