-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
8
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.
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.
- duplicates
-
JDK-8093079 Suggested Style Class Menu not alphabetically ordered
- Resolved