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

Assign a Class Style or Stylesheet not working propertly since FX8 (JDK8 b54)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • None
    • Windows 7 32 bits JDK8 b54

      Assigning a Class Style from code using getStyleClass().add() doesn't work in FX 8 (JDK8 b54).

      It seems like there is a node class cache that is not being invalidated like previus versions.

      In some cases, when you set a style element (Ej. setStyle("-fx-border-width:1px 1px 0px 1px;")) on a parent node, after setting the Class Style, cache (or whatever) is invalidated and there is a style update (sometimes a partial update).

      However, if you remove a class style assigned in FXML with getStyleClass().remove(...). style is removed with no problems.


      With Stylesheet, issue is different.
      When you load a Stylesheet for a component with pane.getStylesheets().add(...), stylesheet is applied only in the parent (pane in this case). If this parent contains another components (buttons, labels, etc...) stylesheets are not used by them since JDK8 b54.

            dgrieve David Grieve
            rruizjfx Ricardo Ruiz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: