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

Vertical SplitPane: dividers doesn't render properly with style "-fx-orientation: vertical"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:
    • Environment:

      java6
      fx b40
      windows 7

      Description

      To reproduce run following code



      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.SplitPane;
      import javafx.scene.control.SplitPaneBuilder;
      import javafx.scene.layout.StackPaneBuilder;
      import javafx.scene.layout.VBox;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;

      public class SplitPaneTest extends Application {

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

          private Parent getContent() {

              VBox list = new VBox();
              list.setManaged(false);
              SplitPane pane = SplitPaneBuilder.create().items(
                      StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.WHITESMOKE)).build(),
                      StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.BLUE)).build(),
                      StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.RED)).build())
                      .prefWidth(150)
                      .prefHeight(150)
                      .build();
              pane.setFocusTraversable(false);
              pane.setStyle("-fx-orientation: vertical;-fx-border-color:red; -fx-background-color:green;");
              pane.setMaxSize(150,150);
              list.getChildren().addAll(pane);
              return list;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              Scene scene = new Scene(getContent(),800,300);
              stage.setScene(scene);
              stage.show();
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              kwwong Kinsley Wong
              Reporter:
              anazarov Andrey Nazarov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported: