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

TreeView: overrun ellipsis appears instead of scrollbar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.1
    • javafx
    • FX 2.1 b10
      java 6
      windows 7

      To reproduce run following code



      import javafx.application.Application;
      import javafx.beans.property.SimpleObjectProperty;
      import javafx.beans.property.SimpleStringProperty;
      import javafx.beans.property.StringProperty;
      import javafx.beans.value.ObservableValue;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableList;
      import javafx.scene.Group;
      import javafx.scene.Node;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.*;
      import javafx.scene.layout.FlowPane;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.Pane;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;
      import javafx.util.Callback;


      /**
       *
       * @author javafx
       */
      public class Test1 extends Application {

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

          private Parent getContent() {
              Pane pane = new HBox();
              TreeItem<String> root = new TreeItem<String>("ROOT", new Rectangle(20, 20, Color.CHOCOLATE));
              root.setExpanded(true);
              TreeItem<String> firstBrunch = new TreeItem<String>("brunch 1");
              firstBrunch.setExpanded(true);
              firstBrunch.getChildren().addAll(new TreeItem<String>("first item"), new TreeItem<String>("second item", new Rectangle(20, 20, Color.DARKGREY)));
              root.getChildren().addAll(firstBrunch);
              TreeItem<String> secondBrunch = new TreeItem<String>("brunch 2");
              secondBrunch.getChildren().addAll(new TreeItem<String>("first item"), new TreeItem<String>("second item", new Rectangle(20, 20, Color.DARKGREY)));
              root.getChildren().addAll(secondBrunch);
              TreeView tree = new TreeView(root);
              tree.setFocusTraversable(false);
              tree.setMaxSize(130,140);
              pane.getChildren().add(tree);
              return pane;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              stage.setWidth(700);
              stage.setHeight(700);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.show();
          }
          
      }

            Unassigned Unassigned
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: