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

[ScrollBar] arrows don't change orientation, when control's orientation changes.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 7u6
    • fx2.1
    • javafx
    • 2.1.0b08

      See attached movie and attached code:

      Problem: if orientation has changed from horizontal to vertical, arrows' orientation was not changed.

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.geometry.Orientation;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.ScrollBar;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class ScrollBarProblem extends Application {

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

          @Override
          public void start(Stage stage) throws Exception {
              Button someButton = new Button("SomeButton");
              final ScrollBar slider = new ScrollBar();

              someButton.setOnAction(new EventHandler<ActionEvent>() {

                  @Override
                  public void handle(ActionEvent t) {
                      slider.setOrientation(Orientation.VERTICAL);
                  }
              });

              VBox pane = new VBox();
              pane.getChildren().addAll(slider, someButton);
              Scene scene = new Scene(pane, 200, 200);
              stage.setScene(scene);
              stage.show();
          }
      }

            miflemi Mick Fleming
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: