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

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

    Details

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

      2.1.0b08

      Description

      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();
          }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: