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

Changes to CSS files are ignored when the stylesheet is re-loaded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      FX2.0 beta b37

      Description

      I'm trying to re-load a css file while the application is running but any changes that were made to the css file since it was previously loaded is ignored. The idea is to enable a designer to make changes to the application's css file while the application is running and then hit a "re-load" button to refresh the stylesheet. The strange thing is that if you save the stylesheet under a different name and load the new file the styles get applied as expected. Even after loading another css file, if the original file is loaded again it still updates the style to reflect the contents of the original css file before it was changed.

      To reproduce:
      Unzip the attachment. Compile and run the java file.
      1) Click "Browse..." and navigate to the 'style1.css' file included in the attached zip file.
      2) Click "Load" to load the contents of the css file
      3) Using a text editor, make changes to 'style1.css' and save them
      4) Click "Load" again. At this point the changes should be visible in the application but they are ignored.
      5) Using the text editor, save the changed css file under a new name.
      6) Click the "Browse..." button and load the css file that was saved under a new name
      7) Click "Load". At this point the changed styles are applied and visible in the application
      8) Now "Browse..." and "Load" the 'style2.css' file just to make sure we have a completely different style applied.
      9) Now "Browse..." and "Load" 'style1.css' again. The style of the application will be updated to reflect the original content of style1.css and not the current content of style1.css.

      Also: The "Clear" button will remove all stylesheets from the application. This does clear the font style.

        Attachments

          Activity

            People

            Assignee:
            dgrieve David Grieve
            Reporter:
            aswanepoejfx Abraham Swanepoel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: