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

Hyperlink not visible inside selected TreeItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u60
    • 8u5, 8u20
    • javafx
    • windows 7 64bit, 32 bits jre

    Description

      An hyperlink is not visible when inside a selected TreeItem, the hyperlink color is the same as the background color.
      Should the color be white ?
      Was working correctly in javafx 2.2

      This is a snippet :
      package _Test;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Hyperlink;
      import javafx.scene.control.SelectionMode;
      import javafx.scene.control.TreeItem;
      import javafx.scene.control.TreeView;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      public class Test extends Application {

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

      @Override
      public void start(Stage primaryStage) throws Exception {
      primaryStage.setTitle("Hello World!");
      StackPane root = new StackPane();

      TreeView<String> view = new TreeView<String>();
              TreeItem<String> rootNode = new TreeItem<String>();
              view.setRoot(rootNode);
              view.setShowRoot(false);
              view.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
              
              TreeItem<String> item = new TreeItem<String>("T");
              item.setGraphic(new Hyperlink("Test"));
              rootNode.getChildren().add(item);
              item = new TreeItem<String>("T");
              item.setGraphic(new Hyperlink("Test2"));
              rootNode.getChildren().add(item);
              item = new TreeItem<String>("T");
              item.setGraphic(new Hyperlink("Test3"));
              rootNode.getChildren().add(item);
      root.getChildren().add(view);
      primaryStage.setScene(new Scene(root, 300, 250));
      primaryStage.show();
      }
      }

      Launch it, select an item, the hypelink becomes invisible

      Attachments

        Issue Links

          Activity

            People

              jgiles Jonathan Giles
              pchaleatjfx Philippe Chaleat (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: