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

[CSS] javafx.scene.CssStyleHelper WARNING

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8u20, 8u25, 8u40
    • javafx
    • Linux Xubuntu 32
      8_20, 8_25 and the 8_40-ea-b11

      I am getting a lot of warnings, some regarding my style sheet:
      ott 24, 2014 5:16:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-pdfsam-dark-text-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet file:/home/torakiki/repos/pdfsam/pdfsam-fx/target/classes/themes/defaults.css

      And some not:
      ott 24, 2014 5:16:17 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-control-inner-background' while resolving lookups for '-fx-background-color' from rule '*.list-cell' in stylesheet jar:file:/usr/lib/jvm/jdk1.8.0_40/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss

      I have consistent steps to make it happen on my application but I've not been able to create a SSCCE for it. The application layout looks good but the application hangs a little while spitting out all those warnings.
      I don't know exactly how to investigate it, is there anything I could verify to understand weather it's a jdk bug or an application bug?

      UPDATE:
      I finally could spend some time on this and I managed to create steps to reproduce it. The idea is to have two stage, one is the application, the second one contains application log messages added to a ListView either if the stage is shown or not.

      public class App extends Application {

      private TestListView logs;

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

      @Override
      public void start(Stage primaryStage) throws Exception {
      VBox main = new VBox();
      VBox secondPane = new VBox();
      logs = new TestListView();
      secondPane.getChildren().add(logs);
      Scene secondScene = new Scene(secondPane);
      Stage secondStage = new Stage();
      secondStage.setScene(secondScene);
      Button showLogs = new Button("show");
      showLogs.setOnAction(e -> secondStage.show());

      Button addText = new Button("add");
      addText.setOnAction(e -> logs.appendLog("MyMessage"));
      main.getChildren().addAll(addText, showLogs);
      Scene mainScene = new Scene(main);
      primaryStage.setScene(mainScene);
      primaryStage.show();
      }

      public static class TestListView extends ListView<String> {

      public TestListView() {
      setId("log-view");
      getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
      setCellFactory(new Callback<ListView<String>, ListCell<String>>() {
      @Override
      public ListCell<String> call(ListView<String> list) {
      return new TextCell();
      }
      });
      }

      void appendLog(String message) {
      getItems().add(message);
      scrollTo(getItems().size() - 1);
      }

      static class TextCell extends ListCell<String> {
      @Override
      public void updateItem(String item, boolean empty) {
      super.updateItem(item, empty);
      if (item != null) {
      setText(item);
      } else {
      setText("");
      }
      }
      }
      }
      }

      STEPS:
      -Click "show" to show the log window
      -Click "add" to add a message to the log window
      -Hide the log window
      -Click "add" to add a message to the log window while it's closed
      -Click "add" to add a message to the log window while it's closed

      A number of warning are shown:
      dic 13, 2014 12:02:41 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.list-cell' in stylesheet jar:file:/usr/lib/jvm/jdk1.8.0_25/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      dic 13, 2014 12:02:41 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve '-fx-control-inner-background-alt' while resolving lookups for '-fx-background-color' from rule '*.list-cell' in stylesheet jar:file:/usr/lib/jvm/jdk1.8.0_25/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
      .......

      This was tested on Xubuntu and both jdk 1.8.0_25 and 1.8.0_40-ea-b11

            Unassigned Unassigned
            avacondiojfx Andrea Vacondio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: