File tree Expand file tree Collapse file tree 1 file changed +11
-20
lines changed
kit/src/main/java/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector Expand file tree Collapse file tree 1 file changed +11
-20
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2016, 2018 Gluon and/or its affiliates.
2
+ * Copyright (c) 2016, 2024, Gluon and/or its affiliates.
3
3
* Copyright (c) 2012, 2014, Oracle and/or its affiliates.
4
4
* All rights reserved. Use is subject to license terms.
5
5
*
@@ -377,25 +377,16 @@ private void expandedSectionChanged() {
377
377
if (!isInspectorLoaded ()) {
378
378
return ;
379
379
}
380
- final TitledPane tp ;
381
-
382
- switch (getExpandedSection ()) {
383
- case NONE :
384
- tp = null ;
385
- break ;
386
- case PROPERTIES :
387
- tp = propertiesTitledPane ;
388
- break ;
389
- case LAYOUT :
390
- tp = layoutTitledPane ;
391
- break ;
392
- case CODE :
393
- tp = codeTitledPane ;
394
- break ;
395
- default :
396
- throw new IllegalStateException ("Unexpected section id " + getExpandedSection ()); //NOI18N
397
- }
398
-
380
+ SectionId expandedSection = getExpandedSection ();
381
+ if (expandedSection == null ) {
382
+ return ;
383
+ }
384
+ final TitledPane tp = switch (expandedSection ) {
385
+ case NONE -> null ;
386
+ case PROPERTIES -> propertiesTitledPane ;
387
+ case LAYOUT -> layoutTitledPane ;
388
+ case CODE -> codeTitledPane ;
389
+ };
399
390
accordion .setExpandedPane (tp );
400
391
}
401
392
You can’t perform that action at this time.
0 commit comments