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

[CSS] CSS Error when placing labels into a Tooltip

    XMLWordPrintable

Details

    Description

      public class FXTest extends Application {

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

      @Override
      public void start(final Stage primaryStage) throws Exception {
      final Tooltip t = new Tooltip();
      VBox box = new VBox();
      box.getChildren().add(new Label("Hello"));
      box.getChildren().add(new Label("World!"));
      t.setGraphic(box);

      Button b = new Button("Open Tooltip");
      b.setOnAction(new EventHandler<ActionEvent>() {

      @Override
      public void handle(ActionEvent event) {
      t.show(primaryStage);
      }
      });

      Scene s = new Scene(b,400,400);
      primaryStage.setScene(s);
      primaryStage.show();
      }

      }

      Run this sample and notice that:
      a) the text is black on black
      b) you'll receive CSS-Errors like

      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      Jän 04, 2014 2:14:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss

      Attachments

        Issue Links

          Activity

            People

              dgrieve David Grieve
              tschindl Tom Schindl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: