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

Since Scene Builder 2.0 the style classes from a css file appear in the Style Class MenuButton unsorted.

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • 8
    • javafx

    Description

      When dealing with long lists of style classes, moving up and down the MenuButton all the time looking for a particular name is quite annoying, and it takes a lot of time. If the items were sorted (as they were in Scene Builder 1.0) this would be more easy to achieve.

      Looking at the source code, it seems that this is not fixed in the last developer versions (tags 8u20-b23 and following).

      The style classes are stored in a Map 'cssClassesMap' after they are retrieved in com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleClassEditor.java class:

      cssClassesMap = CssInternal.getStyleClassesMap(editorController, selectedInstances);

      And when the MenuItem for each of these style classes is added to the MenuButton by traversing the map's KeySet (initialize method of StyleClassItem private class):

      for(String className: cssClassesMap.keySet()){...}

      Either when the map is created or when the items are added, there's a chance to have the style classes sorted.

      Attachments

        Issue Links

          Activity

            People

              jcambon Jerome Cambon
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: