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

Styleable.getStyleClass() should be a Set, not a List

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 8
    • javafx
    • java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b100)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b42, mixed mode)

      Ubuntu 13.04

      You'd think that calling something like this will always remove the *green-rect* style:

      rect.getStyleClass().remove("green-rect");

      but it actually wont if some framework/library/other class/etc. added the *green-rect" style twice.

      This is VERY counter-intuitive and error prome.

      Full example:

      https://bitbucket.org/walczak_it/prodoko-base/src/92b0de66d4c6b03812e651d04173a241b2639586/prodoko-sandbox/src/main/java/StyleClassesTestApp.java?at=master

      https://bitbucket.org/walczak_it/prodoko-base/src/92b0de66d4c6b03812e651d04173a241b2639586/prodoko-sandbox/src/main/resources/styleClassesTest.css?at=master
      return 0;
      it will show a green rectangle.

            Unassigned Unassigned
            awalczakijfx Adam Walczak (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Imported: