Browse Source

Merge branch 'master' into Issue_525

# Conflicts:
#	jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java
rickard 1 year ago
parent
commit
b28bb2e3cd
100 changed files with 923 additions and 432 deletions
  1. 2 2
      .github/workflows/gradle.yml
  2. 3 3
      .github/workflows/release.yml
  3. 2 2
      BasicGameTemplate/nbproject/project.properties
  4. 2 2
      JME3TestsTemplate/nbproject/project.properties
  5. 3 2
      ant-jme/src/com/jme/ant/LoadWikiImages.java
  6. 1 1
      branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties
  7. 3 3
      build.gradle
  8. 1 1
      build.xml
  9. 1 1
      gradle.properties
  10. BIN
      gradle/wrapper/gradle-wrapper.jar
  11. 3 1
      gradle/wrapper/gradle-wrapper.properties
  12. 22 13
      gradlew
  13. 11 10
      gradlew.bat
  14. BIN
      harness-override/app.exe
  15. BIN
      harness-override/app64.exe
  16. 4 4
      harness-override/override.properties
  17. 6 57
      jdks/download-jdks.sh
  18. 1 1
      jme3-android/nbproject/project.properties
  19. 1 1
      jme3-android/src/com/jme3/gde/android/AndroidImportantFiles.java
  20. 3 3
      jme3-android/src/com/jme3/gde/android/Installer.java
  21. 1 1
      jme3-angelfont/nbproject/project.properties
  22. 1 1
      jme3-assetbrowser/nbproject/project.properties
  23. 0 2
      jme3-assetbrowser/src/com/jme3/gde/assetbrowser/AssetBrowser.java
  24. 0 1
      jme3-assetbrowser/src/com/jme3/gde/assetbrowser/AssetBrowserTopComponent.java
  25. 1 1
      jme3-assetpack-support/nbproject/project.properties
  26. 0 1
      jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java
  27. 2 1
      jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/OnlineBrowser.java
  28. 0 1
      jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/properties/SelectionPropertyEditor.java
  29. 2 2
      jme3-assetpack-support/src/com/jme3/gde/assetpack/online/OnlinePacksConnector.java
  30. 22 16
      jme3-assetpack-support/src/com/jme3/gde/assetpack/project/AssetPackProject.java
  31. 0 1
      jme3-assetpack-support/src/com/jme3/gde/assetpack/project/wizards/CreateProjectWizardPanel1.java
  32. 9 12
      jme3-assetpack-support/src/com/jme3/gde/assetpack/project/wizards/ImportVisualPanel2.java
  33. 1 1
      jme3-blender/nbproject/project.properties
  34. 2 1
      jme3-blender/src/com/jme3/gde/blender/scripts/Scripts.java
  35. 1 1
      jme3-cinematics/nbproject/project.properties
  36. 1 1
      jme3-code-check/nbproject/project.properties
  37. 1 1
      jme3-codepalette/nbproject/project.properties
  38. 1 1
      jme3-core-baselibs/nbproject/project.properties
  39. 1 1
      jme3-core-libraries/nbproject/project.properties
  40. 1 1
      jme3-core-updatecenters/nbproject/project.properties
  41. 1 1
      jme3-core/nbproject/project.properties
  42. 6 6
      jme3-core/src/com/jme3/gde/core/appstates/AppStateNode.java
  43. 2 3
      jme3-core/src/com/jme3/gde/core/appstates/NewAppStateVisualPanel1.java
  44. 13 14
      jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java
  45. 0 1
      jme3-core/src/com/jme3/gde/core/assets/SpatialAssetDataObject.java
  46. 0 2
      jme3-core/src/com/jme3/gde/core/assets/actions/ConvertModel.java
  47. 1 1
      jme3-core/src/com/jme3/gde/core/assets/nodes/AssetChildren.java
  48. 8 6
      jme3-core/src/com/jme3/gde/core/codeless/CodelessProject.java
  49. 0 1
      jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectLogicalView.java
  50. 0 1
      jme3-core/src/com/jme3/gde/core/completion/ModelGenerator.java
  51. 2 6
      jme3-core/src/com/jme3/gde/core/dnd/AssetTransferable.java
  52. 0 1
      jme3-core/src/com/jme3/gde/core/dnd/MaterialDropTargetListener.java
  53. 0 1
      jme3-core/src/com/jme3/gde/core/editor/nodes/NodePanel.java
  54. 1 1
      jme3-core/src/com/jme3/gde/core/filters/AbstractFilterNode.java
  55. 2 1
      jme3-core/src/com/jme3/gde/core/filters/actions/EnableFiterAction.java
  56. 0 1
      jme3-core/src/com/jme3/gde/core/filters/impl/JmeFilter.java
  57. 0 1
      jme3-core/src/com/jme3/gde/core/icons/IconList.java
  58. 4 3
      jme3-core/src/com/jme3/gde/core/j2seproject/ProjectExtensionManager.java
  59. 1 1
      jme3-core/src/com/jme3/gde/core/j2seproject/actions/UpgradeProjectWizardPanel2.java
  60. 4 5
      jme3-core/src/com/jme3/gde/core/properties/ColorRGBAPropertyEditor.java
  61. 26 20
      jme3-core/src/com/jme3/gde/core/properties/EmitterShapePropertyEditor.java
  62. 3 9
      jme3-core/src/com/jme3/gde/core/properties/LightPropertyEditor.java
  63. 1 1
      jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java
  64. 7 9
      jme3-core/src/com/jme3/gde/core/properties/UserDataProperty.java
  65. 18 13
      jme3-core/src/com/jme3/gde/core/properties/preview/TexturePreview.java
  66. 3 4
      jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java
  67. 36 43
      jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java
  68. 9 7
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java
  69. 1 1
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java
  70. 1 2
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatialChildren.java
  71. 2 2
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainGrid.java
  72. 0 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainQuad.java
  73. 5 12
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTrack.java
  74. 11 16
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVehicleWheel.java
  75. 0 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/ExtractSubAnimationDialog.java
  76. 2 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/ParticleInfluencerPicker.java
  77. 4 4
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataDialog.java
  78. 2 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataPicker.java
  79. 0 2
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/animation/AnimClipProperty.java
  80. 1 1
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlVisualPanel1.form
  81. 2 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlVisualPanel1.java
  82. 74 0
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometryCylinderAction.java
  83. 11 3
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometryQuadAction.java
  84. 13 11
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClip.java
  85. 2 2
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClipChildren.java
  86. 7 1
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimComposer.java
  87. 12 0
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties
  88. 227 0
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateCylinderPanel.form
  89. 226 0
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateCylinderPanel.java
  90. 20 8
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateQuadPanel.form
  91. 20 8
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateQuadPanel.java
  92. 2 1
      jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java
  93. 1 1
      jme3-dark-laf/nbproject/project.properties
  94. 0 1
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DMUtils.java
  95. 0 5
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyIconFactory.java
  96. 0 4
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyValidator.java
  97. 1 1
      jme3-desktop-executables/nbproject/project.properties
  98. 10 11
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java
  99. 1 1
      jme3-documentation/nbproject/project.properties
  100. 1 1
      jme3-glsl-highlighter/nbproject/project.properties

+ 2 - 2
.github/workflows/gradle.yml

@@ -12,10 +12,10 @@ jobs:
 
 
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
-    - name: Set up JDK 17
+    - name: Set up JDK 21
       uses: actions/setup-java@v1
       uses: actions/setup-java@v1
       with:
       with:
-        java-version: 17
+        java-version: 21
 
 
     - name: Grant execute permission for gradle
     - name: Grant execute permission for gradle
       run: chmod +x gradlew
       run: chmod +x gradlew

+ 3 - 3
.github/workflows/release.yml

@@ -9,11 +9,11 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
-    - name: Set up JDK 17
+    - name: Set up JDK 21
       uses: actions/setup-java@v3
       uses: actions/setup-java@v3
       with:
       with:
         distribution: temurin
         distribution: temurin
-        java-version: 17
+        java-version: 21
     - name: Grant execute permission for gradle
     - name: Grant execute permission for gradle
       run: chmod +x gradlew
       run: chmod +x gradlew
     - name: Build the SDK
     - name: Build the SDK
@@ -26,7 +26,7 @@ jobs:
     - name: Build Installers
     - name: Build Installers
       run: ant -Dstorepass="$NBM_SIGN_PASS" -Dpack200.enabled=false set-spec-version build-installers unset-spec-version
       run: ant -Dstorepass="$NBM_SIGN_PASS" -Dpack200.enabled=false set-spec-version build-installers unset-spec-version
       env:
       env:
-        BUILD_X86: true
+        BUILD_X86: false
         BUILD_X64: true
         BUILD_X64: true
         BUILD_OTHER: true
         BUILD_OTHER: true
     - name: Fix Platform Independent Build
     - name: Fix Platform Independent Build

+ 2 - 2
BasicGameTemplate/nbproject/project.properties

@@ -49,8 +49,8 @@ javac.compilerargs=
 javac.deprecation=false
 javac.deprecation=false
 javac.processorpath=\
 javac.processorpath=\
     ${javac.classpath}
     ${javac.classpath}
-javac.source=17
-javac.target=17
+javac.source=21
+javac.target=21
 javac.test.classpath=\
 javac.test.classpath=\
     ${javac.classpath}:\
     ${javac.classpath}:\
     ${build.classes.dir}
     ${build.classes.dir}

+ 2 - 2
JME3TestsTemplate/nbproject/project.properties

@@ -41,8 +41,8 @@ javac.classpath=\
 # Space-separated list of extra javac options
 # Space-separated list of extra javac options
 javac.compilerargs=
 javac.compilerargs=
 javac.deprecation=false
 javac.deprecation=false
-javac.source=17
-javac.target=17
+javac.source=21
+javac.target=21
 javac.test.classpath=\
 javac.test.classpath=\
     ${javac.classpath}:\
     ${javac.classpath}:\
     ${build.classes.dir}
     ${build.classes.dir}

+ 3 - 2
ant-jme/src/com/jme/ant/LoadWikiImages.java

@@ -9,6 +9,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.FileReader;
 import java.io.InputStream;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URL;
 import java.net.URL;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.Task;
@@ -48,7 +49,7 @@ public class LoadWikiImages extends Task {
                                 name = name.substring(0, markIdx);
                                 name = name.substring(0, markIdx);
                             }
                             }
                             name = name.replaceAll(":", "/");
                             name = name.replaceAll(":", "/");
-                            URL url = new URL(host + link);
+                            URL url = URI.create(host + link).toURL();
                             InputStream in = null;
                             InputStream in = null;
                             FileOutputStream out = null;
                             FileOutputStream out = null;
                             try {
                             try {
@@ -83,7 +84,7 @@ public class LoadWikiImages extends Task {
                             }
                             }
                             //make external folder and clean filename
                             //make external folder and clean filename
                             name = "external/" + name.replaceAll("[_[^\\w\\däüöÄÜÖ\\/\\+\\-\\. ]]", "_");
                             name = "external/" + name.replaceAll("[_[^\\w\\däüöÄÜÖ\\/\\+\\-\\. ]]", "_");
-                            URL url = new URL(host + link);
+                            URL url = URI.create((host + link)).toURL();
                             InputStream in = url.openStream();
                             InputStream in = url.openStream();
                             File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
                             File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
                             log("Getting external image: " + host + link);
                             log("Getting external image: " + host + link);

+ 1 - 1
branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties

@@ -1,3 +1,3 @@
-LBL_Copyright=<p><em>Copyright &copy; 2023 jMonkeyEngine.\n<br>Please visit <a style="color: #f3c802;" href="http://jmonkeyengine.org">http://jmonkeyengine.org</a> for more information.</em></p><p>Icons sets : <ul><li><a style="color: #f3c802;" href="https://game-icons.net/">Lorc, Delapouite & contributors @ game-icons.net</a></li><li><a style="color: #f3c802;" href="http://brankic1979.com/icons/">Brankic1979</a></li><li><a style="color: #f3c802;" href="http://www.entypo.com/index.php">Entypo+</a></li><li><a style="color: #f3c802;" href="https://hub.jmonkeyengine.org/u/ogli">Ogli</a> (edited by <a style="color: #f3c802;" href="https://hub.jmonkeyengine.org/u/grizeldi">grizeldi</a>)</li><ul> </p>
+LBL_Copyright=<p><em>Copyright &copy; 2024 jMonkeyEngine.\n<br>Please visit <a style="color: #f3c802;" href="http://jmonkeyengine.org">http://jmonkeyengine.org</a> for more information.</em></p><p>Icons sets : <ul><li><a style="color: #f3c802;" href="https://game-icons.net/">Lorc, Delapouite & contributors @ game-icons.net</a></li><li><a style="color: #f3c802;" href="http://brankic1979.com/icons/">Brankic1979</a></li><li><a style="color: #f3c802;" href="http://www.entypo.com/index.php">Entypo+</a></li><li><a style="color: #f3c802;" href="https://hub.jmonkeyengine.org/u/ogli">Ogli</a> (edited by <a style="color: #f3c802;" href="https://hub.jmonkeyengine.org/u/grizeldi">grizeldi</a>)</li><ul> </p>
 updates_not_found=<p style="margin: 0"><b>Updates:</b> jMonkeyEngine SDK is updated to version {0}</p>\n 
 updates_not_found=<p style="margin: 0"><b>Updates:</b> jMonkeyEngine SDK is updated to version {0}</p>\n 
 URL_ON_IMG=http://jmonkeyengine.org/
 URL_ON_IMG=http://jmonkeyengine.org/

+ 3 - 3
build.gradle

@@ -41,7 +41,7 @@ dependencies {
     corelibs dep("org.jmonkeyengine:jme3-awt-dialogs:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-awt-dialogs:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-lwjgl:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-lwjgl:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-effects:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-effects:$jmeVersion-$jmeVersionTag", true, true)
-    corelibs dep("com.github.stephengold:Minie:7.7.0", false, false) // replacement for bullet-native
+    corelibs dep("com.github.stephengold:Minie:7.8.1", false, false) // replacement for bullet-native
     corelibs dep("com.github.stephengold:Heart:8.7.0", true, true) // requirement for Minie
     corelibs dep("com.github.stephengold:Heart:8.7.0", true, true) // requirement for Minie
     corelibs dep(fileTree("lib"), false, false)
     corelibs dep(fileTree("lib"), false, false)
     corelibs dep("org.jmonkeyengine:jme3-jogg:$jmeVersion-$jmeVersionTag", true, true)
     corelibs dep("org.jmonkeyengine:jme3-jogg:$jmeVersion-$jmeVersionTag", true, true)
@@ -608,7 +608,7 @@ file('.').eachDir{
         buildSdk.inputs.dir it
         buildSdk.inputs.dir it
     }
     }
 }
 }
-buildSdk.outputs.dir "build"
+//buildSdk.outputs.dir "build"
 
 
 task run(dependsOn: buildSdk) {
 task run(dependsOn: buildSdk) {
     doLast {
     doLast {
@@ -666,7 +666,7 @@ task fixPlatformIndependent(dependsOn: patchPlatformIndependent, type: Zip) {
 }
 }
 
 
 wrapper {
 wrapper {
-    gradleVersion = '7.5.1'
+    gradleVersion = '8.6'
 }
 }
 
 
 //jar.dependsOn(buildSdk)
 //jar.dependsOn(buildSdk)

+ 1 - 1
build.xml

@@ -220,7 +220,7 @@
             </and>
             </and>
             <then>
             <then>
                 <echo message="No platform specified, building all platforms"/>
                 <echo message="No platform specified, building all platforms"/>
-                <property name="generate.installer.for.platforms" value="windows-x86 windows-x64 linux-x64 macosx"/>
+                <property name="generate.installer.for.platforms" value="windows-x64 linux-x64 macosx"/>
             </then>
             </then>
             <else>
             <else>
                 <if>
                 <if>

+ 1 - 1
gradle.properties

@@ -8,4 +8,4 @@ jmeVersionTag = stable
 #jmeVersionTagID = 0
 #jmeVersionTagID = 0
 
 
 # Path for downloading NetBeans Base
 # Path for downloading NetBeans Base
-netbeansUrl = https://dlcdn.apache.org/netbeans/netbeans/19/netbeans-19-bin.zip
+netbeansUrl = https://dlcdn.apache.org/netbeans/netbeans/21/netbeans-21-bin.zip

BIN
gradle/wrapper/gradle-wrapper.jar


+ 3 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -1,5 +1,7 @@
 distributionBase=GRADLE_USER_HOME
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
 zipStoreBase=GRADLE_USER_HOME
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
 zipStorePath=wrapper/dists

+ 22 - 13
gradlew

@@ -55,7 +55,7 @@
 #       Darwin, MinGW, and NonStop.
 #       Darwin, MinGW, and NonStop.
 #
 #
 #   (3) This script is generated from the Groovy template
 #   (3) This script is generated from the Groovy template
-#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 #       within the Gradle project.
 #       within the Gradle project.
 #
 #
 #       You can find Gradle at https://github.com/gradle/gradle/.
 #       You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
     esac
     esac
 done
 done
 
 
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
+# This is normally unused
+# shellcheck disable=SC2034
 APP_BASE_NAME=${0##*/}
 APP_BASE_NAME=${0##*/}
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
 
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD=maximum
 MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
     fi
     fi
 else
 else
     JAVACMD=java
     JAVACMD=java
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+    if ! command -v java >/dev/null 2>&1
+    then
+        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 
 
 Please set the JAVA_HOME variable in your environment to match the
 Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation."
 location of your Java installation."
+    fi
 fi
 fi
 
 
 # Increase the maximum file descriptors if we can.
 # Increase the maximum file descriptors if we can.
 if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
     case $MAX_FD in #(
     case $MAX_FD in #(
       max*)
       max*)
+        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
         MAX_FD=$( ulimit -H -n ) ||
         MAX_FD=$( ulimit -H -n ) ||
             warn "Could not query maximum file descriptor limit"
             warn "Could not query maximum file descriptor limit"
     esac
     esac
     case $MAX_FD in  #(
     case $MAX_FD in  #(
       '' | soft) :;; #(
       '' | soft) :;; #(
       *)
       *)
+        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
         ulimit -n "$MAX_FD" ||
         ulimit -n "$MAX_FD" ||
             warn "Could not set maximum file descriptor limit to $MAX_FD"
             warn "Could not set maximum file descriptor limit to $MAX_FD"
     esac
     esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
     done
     done
 fi
 fi
 
 
-# Collect all arguments for the java command;
-#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-#     shell script including quotes and variable substitutions, so put them in
-#     double quotes to make sure that they get re-expanded; and
-#   * put everything else in single quotes, so that it's not re-expanded.
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+#     and any embedded shellness will be escaped.
+#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+#     treated as '${Hostname}' itself on the command line.
 
 
 set -- \
 set -- \
         "-Dorg.gradle.appname=$APP_BASE_NAME" \
         "-Dorg.gradle.appname=$APP_BASE_NAME" \

+ 11 - 10
gradlew.bat

@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
 
 
 set DIRNAME=%~dp0
 set DIRNAME=%~dp0
 if "%DIRNAME%"=="" set DIRNAME=.
 if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
 set APP_BASE_NAME=%~n0
 set APP_BASE_NAME=%~n0
 set APP_HOME=%DIRNAME%
 set APP_HOME=%DIRNAME%
 
 
@@ -42,11 +43,11 @@ set JAVA_EXE=java.exe
 %JAVA_EXE% -version >NUL 2>&1
 %JAVA_EXE% -version >NUL 2>&1
 if %ERRORLEVEL% equ 0 goto execute
 if %ERRORLEVEL% equ 0 goto execute
 
 
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 
 goto fail
 goto fail
 
 
@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 
 
 if exist "%JAVA_EXE%" goto execute
 if exist "%JAVA_EXE%" goto execute
 
 
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 
 goto fail
 goto fail
 
 

BIN
harness-override/app.exe


BIN
harness-override/app64.exe


+ 4 - 4
harness-override/override.properties

@@ -1,6 +1,6 @@
-app.exe.hashBefore=08568a9ece42e67685df6f20a0383e70248bb0e41c1ab2ec45883bbe001b6326
-app.exe.hashAfter=c399d6eb732faadb7c2850451fd569e4854f5ae7250c66051043aca9f47b22ca
-app64.exe.hashBefore=ee790adfcf8436d7b128ddb43d6f6df1a8404df7612972b2bef7022b4f27bf69
-app64.exe.hashAfter=b50451b5b264504cb61998a8363cc7fbefe6db4d7df55c2b490cc293ede3bfe2
+app.exe.hashBefore=b82006e55944fa7d2eb4c42b15096013beeda8892886165ecc345a7393267a77
+app.exe.hashAfter=c5097cdfdef1a3e3cc1b55ba7651dae454241ed6cfe08ce212f45cacd7923a24
+app64.exe.hashBefore=360204bde78249a9fd386517727b1b7c7f79d9d2e42601b9f2ed93564962b622
+app64.exe.hashAfter=1f1c28cfd34f2e74aaf658da0660f3a3718651829c3ff65b53f9c053b756ea75
 pre7_app.exe.hashBefore=f4ea42a1ec2572b2a65a6d9baef0dd1f7293980c44c5d031c5b2ea5752352e49
 pre7_app.exe.hashBefore=f4ea42a1ec2572b2a65a6d9baef0dd1f7293980c44c5d031c5b2ea5752352e49
 pre7_app.exe.hashAfter=fa8ae6457dad70a65cecb623ef0f60a86c92e856705eaeb2f22e43310fa9226f
 pre7_app.exe.hashAfter=fa8ae6457dad70a65cecb623ef0f60a86c92e856705eaeb2f22e43310fa9226f

+ 6 - 57
jdks/download-jdks.sh

@@ -10,60 +10,9 @@
 
 
 set -e # Quit on Error
 set -e # Quit on Error
 
 
-jdk_major_version="17"
-jdk_version="0.8.1"
-jdk_build_version="1"
-platforms=( "x64_linux" "x86-32_windows" "x64_windows" "x64_mac" )
-
-# DEPRECATED (not required anymore)
-function install_xar {
-    # This is needed to open Mac OS .pkg files on Linux...
-    echo ">> Compiling xar, just for you..."
-    wget -q https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz
-    tar xf xar-1.5.2.tar.gz
-    cd xar-1.5.2
-    ./configure -q > /dev/null
-    make -s > /dev/null
-    cd ../
-    echo "<< OK!"
-}
-
-# DEPRECATED (not required anymore)
-function install_seven_zip {
-    # This is due to not having root privilegs for apt-get
-    if [ -x "$(command -v 7z)" ]; then
-        return 0
-    fi
-
-    echo "> Installing 7zip"
-
-    if [ -x "7zip/bin/7z" ]; then
-        echo ">> Found cached 7zip, adjusting path"
-        cd 7zip/bin
-        PATH=`pwd`:$PATH
-        cd ../../
-        return 0
-    fi
-
-    echo ">> Compiling 7zip from source"
-    mkdir -p 7zip/bin
-    mkdir -p 7zip/lib
-    cd 7zip
-    wget -q http://downloads.sourceforge.net/project/p7zip/p7zip/15.09/p7zip_15.09_src_all.tar.bz2
-    tar xf p7zip*
-    rm *.bz2
-    cd p7zip*
-    make all3 > /dev/null
-    ./install.sh ../bin ../lib /dev/null /dev/null
-    #mv -v bin/ ../
-    cd ../
-    rm -rf p7zip*
-    cd bin
-    PATH=`pwd`:$PATH
-    cd ../lib
-    PATH=`pwd`:$PATH
-    cd ../../
-}
+jdk_major_version="21"
+jdk_version="0.2"
+jdk_build_version="13"
 
 
 function download_jdk {
 function download_jdk {
     echo ">>> Downloading the JDK for $1"
     echo ">>> Downloading the JDK for $1"
@@ -308,14 +257,14 @@ else
     then
     then
         build_mac_jdk &
         build_mac_jdk &
         build_other_jdk linux x64 x64 &
         build_other_jdk linux x64 x64 &
-        build_other_jdk windows x86-32 x86 &
+        # Windows 32bit not by default build_other_jdk windows x86-32 x86 &
         build_other_jdk windows x64 x64 &
         build_other_jdk windows x64 x64 &
     else
     else
         build_mac_jdk
         build_mac_jdk
         build_other_jdk linux x64 x64
         build_other_jdk linux x64 x64
-        build_other_jdk windows x86-32 x86
+        ## Windows 32bit not by default build_other_jdk windows x86-32 x86
         build_other_jdk windows x64 x64
         build_other_jdk windows x64 x64
-        #Linux 32bit not supported... build_other_jdk linux x86-32
+        # Linux 32bit not supported... build_other_jdk linux x86-32
     fi
     fi
     
     
 fi
 fi

+ 1 - 1
jme3-android/nbproject/project.properties

@@ -1,6 +1,6 @@
 #Updated by build script
 #Updated by build script
 #Thu, 25 Aug 2011 21:00:54 +0200
 #Thu, 25 Aug 2011 21:00:54 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-android/src/com/jme3/gde/android/AndroidImportantFiles.java

@@ -82,7 +82,7 @@ public class AndroidImportantFiles implements ImportantFiles {
         } catch (DataObjectNotFoundException ex) {
         } catch (DataObjectNotFoundException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }
-        return list.toArray(new Node[list.size()]);
+        return list.toArray(Node[]::new);
     }
     }
 
 
     @Override
     @Override

+ 3 - 3
jme3-android/src/com/jme3/gde/android/Installer.java

@@ -33,7 +33,7 @@ package com.jme3.gde.android;
 
 
 import com.jme3.gde.core.errorreport.ExceptionUtils;
 import com.jme3.gde.core.errorreport.ExceptionUtils;
 import java.net.MalformedURLException;
 import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
 import org.netbeans.api.autoupdate.UpdateUnitProvider;
 import org.netbeans.api.autoupdate.UpdateUnitProvider;
 import org.netbeans.api.autoupdate.UpdateUnitProviderFactory;
 import org.netbeans.api.autoupdate.UpdateUnitProviderFactory;
 import org.openide.modules.ModuleInstall;
 import org.openide.modules.ModuleInstall;
@@ -55,9 +55,9 @@ public class Installer extends ModuleInstall {
             if (implVers != null) {
             if (implVers != null) {
                 try {
                 try {
                     UpdateUnitProvider updateUnitProvider = UpdateUnitProviderFactory.getDefault()
                     UpdateUnitProvider updateUnitProvider = UpdateUnitProviderFactory.getDefault()
-                                .create("NBANDROID", "NBANDROID Update Center", new URL(
+                                .create("NBANDROID", "NBANDROID Update Center", URI.create(
                                         String.format("http://server.arsi.sk:8080/updates/%s-updates.xml", implVers)
                                         String.format("http://server.arsi.sk:8080/updates/%s-updates.xml", implVers)
-                                ));
+                                ).toURL());
                     updateUnitProvider.setEnable(true);
                     updateUnitProvider.setEnable(true);
                 } catch (MalformedURLException ex) {
                 } catch (MalformedURLException ex) {
                     ExceptionUtils.caughtException(ex, "Note: This could be a problem related to your internet connection/firewall etc.");
                     ExceptionUtils.caughtException(ex, "Note: This could be a problem related to your internet connection/firewall etc.");

+ 1 - 1
jme3-angelfont/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:50 +0200
 #Thu, 25 Aug 2011 20:26:50 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.module.author=Normen Hansen
 nbm.module.author=Normen Hansen

+ 1 - 1
jme3-assetbrowser/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:49 +0200
 #Thu, 25 Aug 2011 20:26:49 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 0 - 2
jme3-assetbrowser/src/com/jme3/gde/assetbrowser/AssetBrowser.java

@@ -44,7 +44,6 @@ import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.util.ProjectSelection;
 import com.jme3.gde.core.util.ProjectSelection;
 import com.jme3.gde.materials.JMEMaterialDataObject;
 import com.jme3.gde.materials.JMEMaterialDataObject;
 import com.jme3.gde.materials.multiview.MaterialOpenSupport;
 import com.jme3.gde.materials.multiview.MaterialOpenSupport;
-import com.jme3.gde.scenecomposer.OpenSceneComposer;
 import com.jme3.gde.scenecomposer.SceneComposerTopComponent;
 import com.jme3.gde.scenecomposer.SceneComposerTopComponent;
 import com.jme3.gde.textureeditor.JmeTextureDataObject;
 import com.jme3.gde.textureeditor.JmeTextureDataObject;
 import com.jme3.gde.textureeditor.OpenTexture;
 import com.jme3.gde.textureeditor.OpenTexture;
@@ -62,7 +61,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 import javax.swing.JOptionPane;
 import javax.swing.JOptionPane;
-import org.netbeans.api.project.Project;
 import org.openide.DialogDisplayer;
 import org.openide.DialogDisplayer;
 import org.openide.NotifyDescriptor;
 import org.openide.NotifyDescriptor;
 import org.openide.filesystems.FileAttributeEvent;
 import org.openide.filesystems.FileAttributeEvent;

+ 0 - 1
jme3-assetbrowser/src/com/jme3/gde/assetbrowser/AssetBrowserTopComponent.java

@@ -36,7 +36,6 @@ import org.openide.awt.ActionID;
 import org.openide.awt.ActionReference;
 import org.openide.awt.ActionReference;
 import org.openide.util.NbBundle;
 import org.openide.util.NbBundle;
 import org.openide.windows.TopComponent;
 import org.openide.windows.TopComponent;
-import org.openide.util.NbBundle.Messages;
 
 
 /**
 /**
  * Top component which displays something.
  * Top component which displays something.

+ 1 - 1
jme3-assetpack-support/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:49 +0200
 #Thu, 25 Aug 2011 20:26:49 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 0 - 1
jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java

@@ -8,7 +8,6 @@ import com.jme3.asset.ModelKey;
 import com.jme3.gde.assetpack.actions.AddAssetAction;
 import com.jme3.gde.assetpack.actions.AddAssetAction;
 import com.jme3.gde.assetpack.project.wizards.FileDescription;
 import com.jme3.gde.assetpack.project.wizards.FileDescription;
 import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.assets.ProjectAssetManager;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.material.Material;
 import com.jme3.material.Material;
 import com.jme3.material.MaterialList;
 import com.jme3.material.MaterialList;
 import com.jme3.scene.Node;
 import com.jme3.scene.Node;

+ 2 - 1
jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/OnlineBrowser.java

@@ -14,6 +14,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
+import java.net.URI;
 import java.net.URL;
 import java.net.URL;
 import java.util.logging.Level;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
@@ -43,7 +44,7 @@ public class OnlineBrowser extends javax.swing.JPanel implements HyperlinkListen
         this.lib = lib;
         this.lib = lib;
         jEditorPane1.addHyperlinkListener(this);
         jEditorPane1.addHyperlinkListener(this);
         try {
         try {
-            URL url = new URL("http://jmonkeyengine.org/assetpacks/list.php");
+            URL url = URI.create("http://jmonkeyengine.org/assetpacks/list.php").toURL();
             jEditorPane1.setPage(url);
             jEditorPane1.setPage(url);
         } catch (IOException ex) {
         } catch (IOException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);

+ 0 - 1
jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/properties/SelectionPropertyEditor.java

@@ -37,7 +37,6 @@ import java.awt.Rectangle;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyEditor;
 import java.beans.PropertyEditor;
-import java.util.Iterator;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 

+ 2 - 2
jme3-assetpack-support/src/com/jme3/gde/assetpack/online/OnlinePacksConnector.java

@@ -31,7 +31,7 @@ public class OnlinePacksConnector {
             int size = (int) FileUtil.toFileObject(file).getSize();
             int size = (int) FileUtil.toFileObject(file).getSize();
             Logger.getLogger(OnlinePacksConnector.class.getName()).log(Level.FINE, "Upload file size: {0}", size);
             Logger.getLogger(OnlinePacksConnector.class.getName()).log(Level.FINE, "Upload file size: {0}", size);
 
 
-            URL url = new URL(urlString);
+            URL url = URI.create(urlString).toURL();
             String boundary = MultiPartFormOutputStream.createBoundary();
             String boundary = MultiPartFormOutputStream.createBoundary();
             URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
             URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
             urlConn.setRequestProperty("Accept", "*/*");
             urlConn.setRequestProperty("Accept", "*/*");
@@ -77,7 +77,7 @@ public class OnlinePacksConnector {
 
 
     private static boolean test(String urlString, String user, String pass) {
     private static boolean test(String urlString, String user, String pass) {
         try {
         try {
-            URL url = new URL(urlString);
+            URL url = URI.create(urlString).toURL();
             String boundary = MultiPartFormOutputStream.createBoundary();
             String boundary = MultiPartFormOutputStream.createBoundary();
             URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
             URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
             urlConn.setRequestProperty("Accept", "*/*");
             urlConn.setRequestProperty("Accept", "*/*");

+ 22 - 16
jme3-assetpack-support/src/com/jme3/gde/assetpack/project/AssetPackProject.java

@@ -270,12 +270,14 @@ public class AssetPackProject implements Project {
 
 
         @Override
         @Override
         public boolean isActionEnabled(String command, Lookup lookup) throws IllegalArgumentException {
         public boolean isActionEnabled(String command, Lookup lookup) throws IllegalArgumentException {
-            if ((command.equals(ActionProvider.COMMAND_DELETE))) {
-                return true;
-            } else if ((command.equals(ActionProvider.COMMAND_COPY))) {
-                return true;
-            } else {
-                throw new IllegalArgumentException(command);
+            switch (command) {
+                case ActionProvider.COMMAND_DELETE -> {
+                    return true;
+                }
+                case ActionProvider.COMMAND_COPY -> {
+                    return true;
+                }
+                default -> throw new IllegalArgumentException(command);
             }
             }
         }
         }
     }
     }
@@ -352,16 +354,20 @@ public class AssetPackProject implements Project {
 
 
         @Override
         @Override
         public JComponent create(Category category) {
         public JComponent create(Category category) {
-            if (category.getName().equals("General")) {
-                panel1 =
-                        new GeneralSettingsPanel(project);
-                return panel1;
-            } else if (category.getName().equals("License")) {
-                panel2 =
-                        new LicensePanel(project);
-                return panel2;
-            } else {
-                return new JPanel();
+            switch (category.getName()) {
+                case "General" -> {
+                    panel1 =
+                            new GeneralSettingsPanel(project);
+                    return panel1;
+                }
+                case "License" -> {
+                    panel2 =
+                            new LicensePanel(project);
+                    return panel2;
+                }
+                default -> {
+                    return new JPanel();
+                }
             }
             }
 
 
         }
         }

+ 0 - 1
jme3-assetpack-support/src/com/jme3/gde/assetpack/project/wizards/CreateProjectWizardPanel1.java

@@ -5,7 +5,6 @@
 package com.jme3.gde.assetpack.project.wizards;
 package com.jme3.gde.assetpack.project.wizards;
 
 
 import java.awt.Component;
 import java.awt.Component;
-import java.io.File;
 import javax.swing.event.ChangeListener;
 import javax.swing.event.ChangeListener;
 import org.openide.WizardDescriptor;
 import org.openide.WizardDescriptor;
 import org.openide.util.HelpCtx;
 import org.openide.util.HelpCtx;

+ 9 - 12
jme3-assetpack-support/src/com/jme3/gde/assetpack/project/wizards/ImportVisualPanel2.java

@@ -86,18 +86,15 @@ public final class ImportVisualPanel2 extends JPanel {
     private String pathString() {
     private String pathString() {
         String string = "";
         String string = "";
         String type = (String) wiz.getProperty("type");
         String type = (String) wiz.getProperty("type");
-        if (type.equals("model")) {
-            string += "/Models/";
-        } else if (type.equals("scene")) {
-            string += "/Scenes/";
-        } else if (type.equals("texture")) {
-            string += "/Textures/";
-        } else if (type.equals("sound")) {
-            string += "/Sounds/";
-        } else if (type.equals("shader")) {
-            string += "/Shaders/";
-        } else if (type.equals("other")) {
-            string += "/Misc/";
+        switch (type) {
+            case "model" -> string += "/Models/";
+            case "scene" -> string += "/Scenes/";
+            case "texture" -> string += "/Textures/";
+            case "sound" -> string += "/Sounds/";
+            case "shader" -> string += "/Shaders/";
+            case "other" -> string += "/Misc/";
+            default -> {
+            }
         }
         }
         String category = ((String) wiz.getProperty("categories")).split(",")[0].trim();
         String category = ((String) wiz.getProperty("categories")).split(",")[0].trim();
         string += category + "/";
         string += category + "/";

+ 1 - 1
jme3-blender/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:50 +0200
 #Thu, 25 Aug 2011 20:26:50 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 2 - 1
jme3-blender/src/com/jme3/gde/blender/scripts/Scripts.java

@@ -7,6 +7,7 @@ package com.jme3.gde.blender.scripts;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
+import java.net.URI;
 import java.net.URL;
 import java.net.URL;
 import java.util.logging.Level;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
@@ -41,7 +42,7 @@ public class Scripts {
                 InputStream in = null;
                 InputStream in = null;
                 OutputStream out = null;
                 OutputStream out = null;
                 try {
                 try {
-                    URL url = new URL("nbres:" + root + name);
+                    URL url = URI.create("nbres:" + root + name).toURL();
                     file = FileUtil.createData(folder, name);
                     file = FileUtil.createData(folder, name);
                     in = url.openStream();
                     in = url.openStream();
                     out = file.getOutputStream();
                     out = file.getOutputStream();

+ 1 - 1
jme3-cinematics/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:50 +0200
 #Thu, 25 Aug 2011 20:26:50 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-code-check/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:50 +0200
 #Thu, 25 Aug 2011 20:26:50 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-codepalette/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:49 +0200
 #Thu, 25 Aug 2011 20:26:49 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-core-baselibs/nbproject/project.properties

@@ -1,4 +1,4 @@
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-core-libraries/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:48 +0200
 #Thu, 25 Aug 2011 20:26:48 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-core-updatecenters/nbproject/project.properties

@@ -1,4 +1,4 @@
 #Thu, 25 Aug 2011 20:26:49 +0200
 #Thu, 25 Aug 2011 20:26:49 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 spec.version.base=3.5.2
 spec.version.base=3.5.2

+ 1 - 1
jme3-core/nbproject/project.properties

@@ -1,7 +1,7 @@
 #Thu, 25 Aug 2011 20:26:48 +0200
 #Thu, 25 Aug 2011 20:26:48 +0200
 file.reference.DDSUtils.jar=release/modules/ext/DDSUtils.jar
 file.reference.DDSUtils.jar=release/modules/ext/DDSUtils.jar
 #Thu, 25 Aug 2011 19:32:54 +0200
 #Thu, 25 Aug 2011 19:32:54 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 6 - 6
jme3-core/src/com/jme3/gde/core/appstates/AppStateNode.java

@@ -199,12 +199,12 @@ public class AppStateNode extends AbstractNode implements ScenePropertyChangeLis
     }
     }
 
 
     public void propertyChange(final String type, final String name, final Object before, final Object after) {
     public void propertyChange(final String type, final String name, final Object before, final Object after) {
-        if (SceneExplorerProperty.PROP_USER_CHANGE.equals(type)) {
-            firePropertyChange(name, before, after);
-        } else if (SceneExplorerProperty.PROP_SCENE_CHANGE.equals(type)) {
-            firePropertyChange(name, before, after);
-        } else if (SceneExplorerProperty.PROP_INIT_CHANGE.equals(type)) {
-            firePropertyChange(name, before, after);
+        if (null != type) switch (type) {
+            case SceneExplorerProperty.PROP_USER_CHANGE -> firePropertyChange(name, before, after);
+            case SceneExplorerProperty.PROP_SCENE_CHANGE -> firePropertyChange(name, before, after);
+            case SceneExplorerProperty.PROP_INIT_CHANGE -> firePropertyChange(name, before, after);
+            default -> {
+            }
         }
         }
     }
     }
 }
 }

+ 2 - 3
jme3-core/src/com/jme3/gde/core/appstates/NewAppStateVisualPanel1.java

@@ -31,7 +31,7 @@
  */
  */
 package com.jme3.gde.core.appstates;
 package com.jme3.gde.core.appstates;
 
 
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Iterator;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
@@ -92,8 +92,7 @@ public final class NewAppStateVisualPanel1 extends JPanel {
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
 
 
-                    HashSet<SearchScope> set = new HashSet<SearchScope>();
-                    set.add(ClassIndex.SearchScope.SOURCE);
+                    Set<SearchScope> set = EnumSet.of(ClassIndex.SearchScope.SOURCE);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                         final ElementHandle<TypeElement> elementHandle = it.next();
                         final ElementHandle<TypeElement> elementHandle = it.next();

+ 13 - 14
jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@@ -33,7 +33,6 @@ package com.jme3.gde.core.assets;
 
 
 import com.jme3.asset.AssetEventListener;
 import com.jme3.asset.AssetEventListener;
 import com.jme3.asset.AssetKey;
 import com.jme3.asset.AssetKey;
-import com.jme3.asset.AssetManager;
 import com.jme3.asset.DesktopAssetManager;
 import com.jme3.asset.DesktopAssetManager;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeListener;
@@ -87,12 +86,12 @@ public class ProjectAssetManager extends DesktopAssetManager {
     private static final Logger logger = Logger.getLogger(ProjectAssetManager.class.getName());
     private static final Logger logger = Logger.getLogger(ProjectAssetManager.class.getName());
     private final Mutex mutex = new Mutex();
     private final Mutex mutex = new Mutex();
     private final Project project;
     private final Project project;
-    private final List<ClassPathChangeListener> classPathListeners = Collections.synchronizedList(new LinkedList<ClassPathChangeListener>());
-    private final List<ClassPath> classPaths = Collections.synchronizedList(new LinkedList<ClassPath>());
-    private final List<ClassPathItem> classPathItems = Collections.synchronizedList(new LinkedList<ClassPathItem>());
-    private final List<AssetEventListener> assetEventListeners = Collections.synchronizedList(new LinkedList<AssetEventListener>());
-    private final List<String> folderNames = new LinkedList<String>();
-    private final List<FileObject> jarItems = new LinkedList<FileObject>();
+    private final List<ClassPathChangeListener> classPathListeners = Collections.synchronizedList(new LinkedList<>());
+    private final List<ClassPath> classPaths = Collections.synchronizedList(new LinkedList<>());
+    private final List<ClassPathItem> classPathItems = Collections.synchronizedList(new LinkedList<>());
+    private final List<AssetEventListener> assetEventListeners = Collections.synchronizedList(new LinkedList<>());
+    private final List<String> folderNames = new LinkedList<>();
+    private final List<FileObject> jarItems = new LinkedList<>();
     private URLClassLoader loader;
     private URLClassLoader loader;
 
 
     public ProjectAssetManager(Project prj, String folderName) {
     public ProjectAssetManager(Project prj, String folderName) {
@@ -275,12 +274,12 @@ public class ProjectAssetManager extends DesktopAssetManager {
     private PropertyChangeListener classPathListener = new PropertyChangeListener() {
     private PropertyChangeListener classPathListener = new PropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent evt) {
         public void propertyChange(PropertyChangeEvent evt) {
             logger.log(Level.FINE, "Classpath event: {0}", evt);
             logger.log(Level.FINE, "Classpath event: {0}", evt);
-            if (ClassPath.PROP_ROOTS.equals(evt.getPropertyName())) {
-                updateClassLoader();
-            } else if (ClassPath.PROP_ENTRIES.equals(evt.getPropertyName())) {
-                updateClassLoader();
-            } else if (ClassPath.PROP_INCLUDES.equals(evt.getPropertyName())) {
-                updateClassLoader();
+            if (null != evt.getPropertyName()) switch (evt.getPropertyName()) {
+                case ClassPath.PROP_ROOTS -> updateClassLoader();
+                case ClassPath.PROP_ENTRIES -> updateClassLoader();
+                case ClassPath.PROP_INCLUDES -> updateClassLoader();
+                default -> {
+                }
             }
             }
         }
         }
     };
     };
@@ -659,7 +658,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
      * @param folderName the folderName to set
      * @param folderName the folderName to set
      */
      */
     public void setFolderName(String folderName) {
     public void setFolderName(String folderName) {
-        if (folderNames.size() > 0) {
+        if (!folderNames.isEmpty()) {
             this.folderNames.remove(0);
             this.folderNames.remove(0);
         }
         }
         this.folderNames.add(0, folderName);
         this.folderNames.add(0, folderName);

+ 0 - 1
jme3-core/src/com/jme3/gde/core/assets/SpatialAssetDataObject.java

@@ -44,7 +44,6 @@ import org.openide.filesystems.FileObject;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObjectExistsException;
 import org.openide.loaders.DataObjectExistsException;
 import org.openide.loaders.MultiFileLoader;
 import org.openide.loaders.MultiFileLoader;
-import org.openide.util.Exceptions;
 
 
 /**
 /**
  *
  *

+ 0 - 2
jme3-core/src/com/jme3/gde/core/assets/actions/ConvertModel.java

@@ -32,7 +32,6 @@
 package com.jme3.gde.core.assets.actions;
 package com.jme3.gde.core.assets.actions;
 
 
 import com.jme3.export.Savable;
 import com.jme3.export.Savable;
-import com.jme3.gde.core.assets.AssetDataObject;
 import com.jme3.gde.core.assets.BinaryModelDataObject;
 import com.jme3.gde.core.assets.BinaryModelDataObject;
 import com.jme3.gde.core.assets.SpatialAssetDataObject;
 import com.jme3.gde.core.assets.SpatialAssetDataObject;
 import com.jme3.gde.core.util.notify.MessageUtil;
 import com.jme3.gde.core.util.notify.MessageUtil;
@@ -42,7 +41,6 @@ import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
 import org.netbeans.api.progress.ProgressHandle;
 import org.netbeans.api.progress.ProgressHandle;
-import org.openide.util.Exceptions;
 
 
 public final class ConvertModel implements ActionListener {
 public final class ConvertModel implements ActionListener {
     protected static final Logger logger = Logger.getLogger(ConvertModel.class.getName());
     protected static final Logger logger = Logger.getLogger(ConvertModel.class.getName());

+ 1 - 1
jme3-core/src/com/jme3/gde/core/assets/nodes/AssetChildren.java

@@ -68,7 +68,7 @@ public class AssetChildren extends FilterNode.Children {
             }
             }
         }
         }
 
 
-        return result.toArray(new Node[0]);
+        return result.toArray(Node[]::new);
     }
     }
 
 
     private boolean accept(Node node) {
     private boolean accept(Node node) {

+ 8 - 6
jme3-core/src/com/jme3/gde/core/codeless/CodelessProject.java

@@ -143,12 +143,14 @@ class CodelessProject implements Project {
 
 
         @Override
         @Override
         public boolean isActionEnabled(String command, Lookup lookup) throws IllegalArgumentException {
         public boolean isActionEnabled(String command, Lookup lookup) throws IllegalArgumentException {
-            if ((command.equals(ActionProvider.COMMAND_DELETE))) {
-                return true;
-            } else if ((command.equals(ActionProvider.COMMAND_COPY))) {
-                return true;
-            } else {
-                throw new IllegalArgumentException(command);
+            switch (command) {
+                case ActionProvider.COMMAND_DELETE -> {
+                    return true;
+                }
+                case ActionProvider.COMMAND_COPY -> {
+                    return true;
+                }
+                default -> throw new IllegalArgumentException(command);
             }
             }
         }
         }
     }
     }

+ 0 - 1
jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectLogicalView.java

@@ -15,7 +15,6 @@ import org.openide.nodes.AbstractNode;
 import org.openide.nodes.Children;
 import org.openide.nodes.Children;
 import org.openide.nodes.Node;
 import org.openide.nodes.Node;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;
-import org.openide.util.ImageUtilities;
 import org.openide.util.lookup.AbstractLookup;
 import org.openide.util.lookup.AbstractLookup;
 import org.openide.util.lookup.InstanceContent;
 import org.openide.util.lookup.InstanceContent;
 
 

+ 0 - 1
jme3-core/src/com/jme3/gde/core/completion/ModelGenerator.java

@@ -36,7 +36,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.List;
 import javax.swing.text.Document;
 import javax.swing.text.Document;
 import javax.swing.text.JTextComponent;
 import javax.swing.text.JTextComponent;
-import org.netbeans.api.editor.mimelookup.MimeRegistration;
 import org.netbeans.spi.editor.codegen.CodeGenerator;
 import org.netbeans.spi.editor.codegen.CodeGenerator;
 import org.netbeans.spi.editor.codegen.CodeGeneratorContextProvider;
 import org.netbeans.spi.editor.codegen.CodeGeneratorContextProvider;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;

+ 2 - 6
jme3-core/src/com/jme3/gde/core/dnd/AssetTransferable.java

@@ -4,14 +4,10 @@
  */
  */
 package com.jme3.gde.core.dnd;
 package com.jme3.gde.core.dnd;
 
 
-import com.jme3.gde.core.dnd.AssetNameHolder;
-import com.jme3.gde.core.dnd.StringDataFlavor;
-import com.jme3.gde.core.dnd.TextureDataFlavor;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
 import java.awt.datatransfer.Transferable;
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.io.IOException;
 import java.io.IOException;
-import javax.swing.JPanel;
 
 
 /**
 /**
  *
  *
@@ -20,8 +16,8 @@ import javax.swing.JPanel;
  */
  */
 public class AssetTransferable<T extends DataFlavor> implements Transferable {
 public class AssetTransferable<T extends DataFlavor> implements Transferable {
 
 
-    private DataFlavor[] flavors;
-    private AssetNameHolder string;
+    private final DataFlavor[] flavors;
+    private final AssetNameHolder string;
 
 
     public AssetTransferable(AssetNameHolder name, T flavor) {
     public AssetTransferable(AssetNameHolder name, T flavor) {
         this.string = name;
         this.string = name;

+ 0 - 1
jme3-core/src/com/jme3/gde/core/dnd/MaterialDropTargetListener.java

@@ -9,7 +9,6 @@ import com.jme3.math.Vector2f;
 import java.awt.Cursor;
 import java.awt.Cursor;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
 import java.awt.datatransfer.Transferable;
-import java.awt.dnd.DropTargetContext;
 import java.awt.dnd.DropTargetDragEvent;
 import java.awt.dnd.DropTargetDragEvent;
 import java.awt.dnd.DropTargetDropEvent;
 import java.awt.dnd.DropTargetDropEvent;
 import java.awt.dnd.DropTargetEvent;
 import java.awt.dnd.DropTargetEvent;

+ 0 - 1
jme3-core/src/com/jme3/gde/core/editor/nodes/NodePanel.java

@@ -49,7 +49,6 @@ import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.ParallelGroup;
 import javax.swing.GroupLayout.ParallelGroup;
 import javax.swing.GroupLayout.SequentialGroup;
 import javax.swing.GroupLayout.SequentialGroup;
 import javax.swing.Icon;
 import javax.swing.Icon;
-import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JPanel;

+ 1 - 1
jme3-core/src/com/jme3/gde/core/filters/AbstractFilterNode.java

@@ -255,7 +255,7 @@ public abstract class AbstractFilterNode extends AbstractNode implements FilterN
             }
             }
         }
         }
         
         
-        return methodList.toArray(new Method[methodList.size()]);
+        return methodList.toArray(Method[]::new);
     }
     }
     
     
     /**
     /**

+ 2 - 1
jme3-core/src/com/jme3/gde/core/filters/actions/EnableFiterAction.java

@@ -41,6 +41,7 @@ import com.jme3.post.Filter;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ActionListener;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Callable;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
 
 
 public class EnableFiterAction implements ActionListener {
 public class EnableFiterAction implements ActionListener {
@@ -58,7 +59,7 @@ public class EnableFiterAction implements ActionListener {
             public Void call() throws Exception {
             public Void call() throws Exception {
                 Filter filter=context.getFilter();
                 Filter filter=context.getFilter();
                 filter.setEnabled(!filter.isEnabled());                        
                 filter.setEnabled(!filter.isEnabled());                        
-                Logger.getLogger(EnableFiterAction.class.getName()).info( (filter.isEnabled()?"Enabled":"Disabled")+" "+filter.getName());
+                Logger.getLogger(EnableFiterAction.class.getName()).log(Level.INFO, "{0} {1}", new Object[]{filter.isEnabled()?"Enabled":"Disabled", filter.getName()});
                 context.propertyChange("PROP_USER_CHANGE", "Enabled", !filter.isEnabled(), filter.isEnabled());
                 context.propertyChange("PROP_USER_CHANGE", "Enabled", !filter.isEnabled(), filter.isEnabled());
               
               
                 return null;
                 return null;

+ 0 - 1
jme3-core/src/com/jme3/gde/core/filters/impl/JmeFilter.java

@@ -34,7 +34,6 @@ package com.jme3.gde.core.filters.impl;
 import com.jme3.gde.core.filters.AbstractFilterNode;
 import com.jme3.gde.core.filters.AbstractFilterNode;
 import com.jme3.gde.core.filters.FilterNode;
 import com.jme3.gde.core.filters.FilterNode;
 import com.jme3.post.Filter;
 import com.jme3.post.Filter;
-import com.jme3.shadow.AbstractShadowFilter;
 import java.lang.reflect.Method;
 import java.lang.reflect.Method;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Node;
 import org.openide.nodes.Node;

+ 0 - 1
jme3-core/src/com/jme3/gde/core/icons/IconList.java

@@ -31,7 +31,6 @@
  */
  */
 package com.jme3.gde.core.icons;
 package com.jme3.gde.core.icons;
 
 
-import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.ImageIcon;
 import org.openide.util.ImageUtilities;
 import org.openide.util.ImageUtilities;
 
 

+ 4 - 3
jme3-core/src/com/jme3/gde/core/j2seproject/ProjectExtensionManager.java

@@ -39,6 +39,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.OutputStreamWriter;
 import java.io.StringWriter;
 import java.io.StringWriter;
 import java.net.MalformedURLException;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URL;
 import java.net.URL;
 import java.util.Properties;
 import java.util.Properties;
 import java.util.logging.Level;
 import java.util.logging.Level;
@@ -234,7 +235,7 @@ public class ProjectExtensionManager {
 
 
     public void setDataZip(String url) {
     public void setDataZip(String url) {
         try {
         try {
-            this.zipFile = new URL(url);
+            this.zipFile = URI.create(url).toURL();
         } catch (MalformedURLException ex) {
         } catch (MalformedURLException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }
@@ -251,7 +252,7 @@ public class ProjectExtensionManager {
      */
      */
     public void loadTargets(String path) {
     public void loadTargets(String path) {
         try {
         try {
-            LineNumberReader in = new LineNumberReader(new InputStreamReader(new URL(path).openStream()));
+            LineNumberReader in = new LineNumberReader(new InputStreamReader(URI.create(path).toURL().openStream()));
             StringWriter out = new StringWriter();
             StringWriter out = new StringWriter();
             String line = in.readLine();
             String line = in.readLine();
             while (line != null) {
             while (line != null) {
@@ -500,7 +501,7 @@ public class ProjectExtensionManager {
     private void writeFile(ZipInputStream str, FileObject fo) throws IOException {
     private void writeFile(ZipInputStream str, FileObject fo) throws IOException {
         OutputStream out = fo.getOutputStream();
         OutputStream out = fo.getOutputStream();
         try {
         try {
-            logger.log(Level.FINE, "Creating file " + fo.getNameExt());
+            logger.log(Level.FINE, "Creating file {0}", fo.getNameExt());
             FileUtil.copy(str, out);
             FileUtil.copy(str, out);
         } finally {
         } finally {
             out.close();
             out.close();

+ 1 - 1
jme3-core/src/com/jme3/gde/core/j2seproject/actions/UpgradeProjectWizardPanel2.java

@@ -148,7 +148,7 @@ public class UpgradeProjectWizardPanel2 implements WizardDescriptor.ValidatingPa
                         }
                         }
                     }
                     }
                     
                     
-                    edProps.setProperty("javac.classpath", newClasspath.toArray(new String[newClasspath.size()]));
+                    edProps.setProperty("javac.classpath", newClasspath.toArray(String[]::new));
                     setProgress(60);
                     setProgress(60);
                     
                     
                     if (edProps.getProperty("launch4j.exe.enabled") != null) {
                     if (edProps.getProperty("launch4j.exe.enabled") != null) {

+ 4 - 5
jme3-core/src/com/jme3/gde/core/properties/ColorRGBAPropertyEditor.java

@@ -40,7 +40,6 @@ import java.awt.Rectangle;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyEditor;
 import java.beans.PropertyEditor;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.LinkedList;
 
 
 /**
 /**
@@ -49,16 +48,16 @@ import java.util.LinkedList;
  */
  */
 public class ColorRGBAPropertyEditor implements PropertyEditor {
 public class ColorRGBAPropertyEditor implements PropertyEditor {
 
 
-    private LinkedList<PropertyChangeListener> listeners = new LinkedList<PropertyChangeListener>();
+    private final LinkedList<PropertyChangeListener> listeners = new LinkedList<>();
     private ColorRGBA color = new ColorRGBA();
     private ColorRGBA color = new ColorRGBA();
 
 
     @Override
     @Override
     public void setValue(Object value) {
     public void setValue(Object value) {
-        if (value instanceof ColorRGBA) {
+        if (value instanceof ColorRGBA colorRGBA) {
             if (color == null) {
             if (color == null) {
-                color = new ColorRGBA((ColorRGBA) value);
+                color = new ColorRGBA(colorRGBA);
             } else {
             } else {
-                color.set((ColorRGBA) value);
+                color.set(colorRGBA);
             }
             }
         }
         }
     }
     }

+ 26 - 20
jme3-core/src/com/jme3/gde/core/properties/EmitterShapePropertyEditor.java

@@ -128,28 +128,34 @@ public class EmitterShapePropertyEditor implements PropertyEditor {
         if (strings.length == 0) {
         if (strings.length == 0) {
             return;
             return;
         }
         }
-        if ("box".equals(strings[0].trim().toLowerCase())) {
-            if (strings.length == 7) {
-                StatusDisplayer.getDefault().setStatusText("try set parameterized box shape");
-                emitter = new EmitterBoxShape(
-                        new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])), new Vector3f(Float.parseFloat(strings[4]), Float.parseFloat(strings[5]), Float.parseFloat(strings[6])));
-            } else {
-                StatusDisplayer.getDefault().setStatusText("try set standard box shape");
-                emitter = new EmitterBoxShape(new Vector3f(-.5f, -.5f, -.5f), new Vector3f(.5f, .5f, .5f));
+        if (null != strings[0].trim().toLowerCase()) switch (strings[0].trim().toLowerCase()) {
+            case "box" -> {
+                if (strings.length == 7) {
+                    StatusDisplayer.getDefault().setStatusText("try set parameterized box shape");
+                    emitter = new EmitterBoxShape(
+                            new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])), new Vector3f(Float.parseFloat(strings[4]), Float.parseFloat(strings[5]), Float.parseFloat(strings[6])));
+                } else {
+                    StatusDisplayer.getDefault().setStatusText("try set standard box shape");
+                    emitter = new EmitterBoxShape(new Vector3f(-.5f, -.5f, -.5f), new Vector3f(.5f, .5f, .5f));
+                }
             }
             }
-        } else if ("point".equals(strings[0].trim().toLowerCase())) {
-            if (strings.length == 4) {
-                emitter = new EmitterPointShape(
-                        new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])));
-            } else {
-                emitter = new EmitterPointShape(Vector3f.ZERO);
+            case "point" -> {
+                if (strings.length == 4) {
+                    emitter = new EmitterPointShape(
+                            new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])));
+                } else {
+                    emitter = new EmitterPointShape(Vector3f.ZERO);
+                }
             }
             }
-        } else if ("sphere".equals(strings[0].trim().toLowerCase())) {
-            if (strings.length == 5) {
-                emitter = new EmitterSphereShape(
-                        new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])), Float.parseFloat(strings[4]));
-            } else {
-                emitter = new EmitterSphereShape(Vector3f.ZERO, .5f);
+            case "sphere" -> {
+                if (strings.length == 5) {
+                    emitter = new EmitterSphereShape(
+                            new Vector3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3])), Float.parseFloat(strings[4]));
+                } else {
+                    emitter = new EmitterSphereShape(Vector3f.ZERO, .5f);
+                }
+            }
+            default -> {
             }
             }
         }
         }
         notifyListeners(old, emitter);
         notifyListeners(old, emitter);

+ 3 - 9
jme3-core/src/com/jme3/gde/core/properties/LightPropertyEditor.java

@@ -45,8 +45,6 @@ import java.beans.PropertyEditor;
 import java.util.LinkedList;
 import java.util.LinkedList;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.locks.ReentrantLock;
 import org.netbeans.api.project.Project;
 import org.netbeans.api.project.Project;
 import org.openide.DialogDisplayer;
 import org.openide.DialogDisplayer;
 import org.openide.NotifyDescriptor;
 import org.openide.NotifyDescriptor;
@@ -61,24 +59,20 @@ import org.openide.util.Exceptions;
 
 
 
 
 public class LightPropertyEditor implements PropertyEditor {
 public class LightPropertyEditor implements PropertyEditor {
-    private final LinkedList<PropertyChangeListener> listeners = new LinkedList<PropertyChangeListener>();
-    private JmeLight jmeLight;
+    private final LinkedList<PropertyChangeListener> listeners = new LinkedList<>();
     private Light li;
     private Light li;
-    private Project proj;
 
 
     public LightPropertyEditor() {
     public LightPropertyEditor() {
     }
     }
 
 
     public LightPropertyEditor(JmeLight jmeLight, Project project) {
     public LightPropertyEditor(JmeLight jmeLight, Project project) {
-        this.jmeLight = jmeLight;
         this.li = jmeLight.getLookup().lookup(Light.class);
         this.li = jmeLight.getLookup().lookup(Light.class);
-        this.proj = project;
     }
     }
 
 
     @Override
     @Override
     public void setValue(Object value) {
     public void setValue(Object value) {
-        if (value instanceof Light) {
-            li = (Light) value;
+        if (value instanceof Light light) {
+            li = light;
         }
         }
     }
     }
 
 

+ 1 - 1
jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java

@@ -261,7 +261,7 @@ private void noTexturebuttonActionPerformed(java.awt.event.ActionEvent evt) {//G
         String[] leaves = assetManager.getTextures();
         String[] leaves = assetManager.getTextures();
         List<String> leavesList = Arrays.asList(leaves);
         List<String> leavesList = Arrays.asList(leaves);
         Collections.sort(leavesList);
         Collections.sort(leavesList);
-        TreeUtil.createTree(jTree1, leavesList.toArray(new String[0]));
+        TreeUtil.createTree(jTree1, leavesList.toArray(String[]::new));
         TreeUtil.expandTree(jTree1, (TreeNode) jTree1.getModel().getRoot(), 1);
         TreeUtil.expandTree(jTree1, (TreeNode) jTree1.getModel().getRoot(), 1);
         jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
         jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
         jTree1.addTreeSelectionListener(this);
         jTree1.addTreeSelectionListener(this);

+ 7 - 9
jme3-core/src/com/jme3/gde/core/properties/UserDataProperty.java

@@ -44,8 +44,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import javax.swing.JFrame;
 import javax.swing.JFrame;
 import org.openide.nodes.PropertySupport;
 import org.openide.nodes.PropertySupport;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;
@@ -56,11 +54,11 @@ import org.openide.util.Exceptions;
  */
  */
 public class UserDataProperty extends PropertySupport.ReadWrite<String> {
 public class UserDataProperty extends PropertySupport.ReadWrite<String> {
 
 
-    private Spatial spatial;
-    private JmeSpatial node;
+    private final Spatial spatial;
+    private final JmeSpatial node;
     private String name = "null";
     private String name = "null";
     private int type = 0;
     private int type = 0;
-    private List<ScenePropertyChangeListener> listeners = new LinkedList<ScenePropertyChangeListener>();
+    private final List<ScenePropertyChangeListener> listeners = new LinkedList<>();
 
 
     public UserDataProperty(JmeSpatial node, String name) {
     public UserDataProperty(JmeSpatial node, String name) {
         super(name, String.class, name, "");
         super(name, String.class, name, "");
@@ -103,19 +101,19 @@ public class UserDataProperty extends PropertySupport.ReadWrite<String> {
                 public Void call() throws Exception {
                 public Void call() throws Exception {
                     switch (type) {
                     switch (type) {
                         case 0:
                         case 0:
-                            spatial.setUserData(name, Integer.parseInt(val));
+                            spatial.setUserData(name, Integer.valueOf(val));
                             break;
                             break;
                         case 1:
                         case 1:
-                            spatial.setUserData(name, Float.parseFloat(val));
+                            spatial.setUserData(name, Float.valueOf(val));
                             break;
                             break;
                         case 2:
                         case 2:
-                            spatial.setUserData(name, Boolean.parseBoolean(val));
+                            spatial.setUserData(name, Boolean.valueOf(val));
                             break;
                             break;
                         case 3:
                         case 3:
                             spatial.setUserData(name, val);
                             spatial.setUserData(name, val);
                             break;
                             break;
                         case 4:
                         case 4:
-                            spatial.setUserData(name, Long.parseLong(val));
+                            spatial.setUserData(name, Long.valueOf(val));
                             break;
                             break;
                         default:
                         default:
 //                            throw new UnsupportedOperationException();
 //                            throw new UnsupportedOperationException();

+ 18 - 13
jme3-core/src/com/jme3/gde/core/properties/preview/TexturePreview.java

@@ -96,19 +96,24 @@ public class TexturePreview implements SceneListener {
                 TextureKey key = new TextureKey(textureName);
                 TextureKey key = new TextureKey(textureName);
                 Texture t = assetManager.loadTexture(key);
                 Texture t = assetManager.loadTexture(key);
                 Spatial geom = quad;
                 Spatial geom = quad;
-                if (key.getTextureTypeHint() == Texture.Type.TwoDimensional) {
-                    material.setTexture("ColorMap", t);
-                    geom.setMaterial(material);                    
-                    setLabel(infoLabel, displayName, t.getImage().getWidth(),  t.getImage().getHeight(), -1);                    
-                } else if (key.getTextureTypeHint() == Texture.Type.ThreeDimensional) {
-                    geom = quad3D;
-                    material3D.setTexture("Texture", t);
-                    geom.setMaterial(material3D);
-                    setLabel(infoLabel, displayName + " (Texture3D)", t.getImage().getWidth(),  t.getImage().getHeight(),  t.getImage().getDepth());
-                    
-                } else if (key.getTextureTypeHint() == Texture.Type.CubeMap) {
-                    geom = SkyFactory.createSky(assetManager, textureName, SkyFactory.EnvMapType.CubeMap);
-                    setLabel(infoLabel, displayName + " (CubeMap)", t.getImage().getWidth(),  t.getImage().getHeight(),  -1);                        
+                if (null != key.getTextureTypeHint()) switch (key.getTextureTypeHint()) {
+                    case TwoDimensional -> {
+                        material.setTexture("ColorMap", t);
+                        geom.setMaterial(material);
+                        setLabel(infoLabel, displayName, t.getImage().getWidth(),  t.getImage().getHeight(), -1);
+                    }
+                    case ThreeDimensional -> {
+                        geom = quad3D;
+                        material3D.setTexture("Texture", t);
+                        geom.setMaterial(material3D);
+                        setLabel(infoLabel, displayName + " (Texture3D)", t.getImage().getWidth(),  t.getImage().getHeight(),  t.getImage().getDepth());
+                    }
+                    case CubeMap -> {                        
+                        geom = SkyFactory.createSky(assetManager, textureName, SkyFactory.EnvMapType.CubeMap);
+                        setLabel(infoLabel, displayName + " (CubeMap)", t.getImage().getWidth(),  t.getImage().getHeight(),  -1);
+                    }
+                    default -> {
+                    }
                 }
                 }
 
 
                 PreviewRequest request = new PreviewRequest(TexturePreview.this, geom, width, height);
                 PreviewRequest request = new PreviewRequest(TexturePreview.this, geom, width, height);

+ 3 - 4
jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java

@@ -50,7 +50,6 @@ import com.jme3.light.LightProbe;
 import com.jme3.light.PointLight;
 import com.jme3.light.PointLight;
 import com.jme3.math.ColorRGBA;
 import com.jme3.math.ColorRGBA;
 import com.jme3.math.Vector3f;
 import com.jme3.math.Vector3f;
-import com.jme3.post.SceneProcessor;
 import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.ViewPort;
 import com.jme3.renderer.ViewPort;
 import com.jme3.renderer.queue.RenderQueue.Bucket;
 import com.jme3.renderer.queue.RenderQueue.Bucket;
@@ -62,14 +61,13 @@ import com.jme3.system.JmeCanvasContext;
 import com.jme3.system.awt.AwtPanel;
 import com.jme3.system.awt.AwtPanel;
 import com.jme3.system.awt.AwtPanelsContext;
 import com.jme3.system.awt.AwtPanelsContext;
 import com.jme3.system.awt.PaintMode;
 import com.jme3.system.awt.PaintMode;
-import com.jme3.util.SafeArrayList;
 import com.jme3.util.SkyFactory;
 import com.jme3.util.SkyFactory;
 import java.awt.Component;
 import java.awt.Component;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ActionListener;
 import java.io.IOException;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.logging.Level;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
@@ -700,7 +698,8 @@ public class SceneApplication extends LegacyApplication implements LookupProvide
 
 
     private static final ActionListener lst = (ActionEvent e) -> {
     private static final ActionListener lst = (ActionEvent e) -> {
         try {
         try {
-            HtmlBrowser.URLDisplayer.getDefault().showURL(new URL("https://wiki.jmonkeyengine.org/docs/3.4/sdk/troubleshooting.html#troubleshooting-jmonkeyengine3-sdk"));
+            HtmlBrowser.URLDisplayer.getDefault().showURL(
+                    URI.create("https://wiki.jmonkeyengine.org/docs/3.4/sdk/troubleshooting.html#troubleshooting-jmonkeyengine3-sdk").toURL());
         } catch (MalformedURLException ex) {
         } catch (MalformedURLException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }

+ 36 - 43
jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java

@@ -319,54 +319,47 @@ public abstract class AbstractCameraController extends AbstractAppState implemen
     public abstract boolean useCameraControls();
     public abstract boolean useCameraControls();
 
 
     public void onAnalog(String string, float f1, float f) {
     public void onAnalog(String string, float f1, float f) {
-        if ("MouseAxisX".equals(string)) {
-            moved = true;
-            movedR = true;
-
-            if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
-                doRotateCamera(Vector3f.UNIT_Y, -f1 * 2.5f);
-            }
-            if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
-                doPanCamera(f1 * 2.5f, 0);
-            }
-
-        } else if ("MouseAxisY".equals(string)) {
-            moved = true;
-            movedR = true;
-
-            if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
-                doRotateCamera(cam.getLeft(), -f1 * 2.5f);
-            }
-            if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
-                doPanCamera(0, -f1 * 2.5f);
+        if (null != string) switch (string) {
+            case "MouseAxisX" -> {
+                moved = true;
+                movedR = true;
+                if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
+                    doRotateCamera(Vector3f.UNIT_Y, -f1 * 2.5f);
+                }   if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
+                    doPanCamera(f1 * 2.5f, 0);
+                }
             }
             }
-
-        } else if ("MouseAxisX-".equals(string)) {
-            moved = true;
-            movedR = true;
-
-            if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
-                doRotateCamera(Vector3f.UNIT_Y, f1 * 2.5f);
+            case "MouseAxisY" -> {
+                moved = true;
+                movedR = true;
+                if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
+                    doRotateCamera(cam.getLeft(), -f1 * 2.5f);
+                }   if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
+                    doPanCamera(0, -f1 * 2.5f);
+                }
             }
             }
-            if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
-                doPanCamera(-f1 * 2.5f, 0);
+            case "MouseAxisX-" -> {
+                moved = true;
+                movedR = true;
+                if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
+                    doRotateCamera(Vector3f.UNIT_Y, f1 * 2.5f);
+                }   if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
+                    doPanCamera(-f1 * 2.5f, 0);
+                }
             }
             }
-
-        } else if ("MouseAxisY-".equals(string)) {
-            moved = true;
-            movedR = true;
-
-            if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
-                doRotateCamera(cam.getLeft(), f1 * 2.5f);
+            case "MouseAxisY-" -> {
+                moved = true;
+                movedR = true;
+                if ((buttonDownL && useCameraControls()) || (buttonDownM && !shiftModifier)) {
+                    doRotateCamera(cam.getLeft(), f1 * 2.5f);
+                }   if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
+                    doPanCamera(0, f1 * 2.5f);
+                }
             }
             }
-            if ((buttonDownR && useCameraControls()) || (buttonDownM && shiftModifier)) {
-                doPanCamera(0, f1 * 2.5f);
+            case "MouseWheel" -> doZoomCamera(.1f);
+            case "MouseWheel-" -> doZoomCamera(-.1f);
+            default -> {
             }
             }
-
-        } else if ("MouseWheel".equals(string)) {
-            doZoomCamera(.1f);
-        } else if ("MouseWheel-".equals(string)) {
-            doZoomCamera(-.1f);
         }
         }
     }
     }
 
 

+ 9 - 7
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java

@@ -289,13 +289,15 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
 
 
     @Override
     @Override
     public void propertyChange(final String type, final String name, final Object before, final Object after) {
     public void propertyChange(final String type, final String name, final Object before, final Object after) {
-        if (SceneExplorerProperty.PROP_USER_CHANGE.equals(type)) {
-            fireSave(true);
-            firePropertyChange(name, before, after);
-        } else if (SceneExplorerProperty.PROP_SCENE_CHANGE.equals(type)) {
-            firePropertyChange(name, before, after);
-        } else if (SceneExplorerProperty.PROP_INIT_CHANGE.equals(type)) {
-            firePropertyChange(name, before, after);
+        if (null != type) switch (type) {
+            case SceneExplorerProperty.PROP_USER_CHANGE -> {
+                fireSave(true);
+                firePropertyChange(name, before, after);
+            }
+            case SceneExplorerProperty.PROP_SCENE_CHANGE -> firePropertyChange(name, before, after);
+            case SceneExplorerProperty.PROP_INIT_CHANGE -> firePropertyChange(name, before, after);
+            default -> {
+            }
         }
         }
     }
     }
 
 

+ 1 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java

@@ -304,7 +304,7 @@ public class JmeSpatial extends AbstractSceneExplorerNode {
 
 
         //@TODO: multithreading.. but we only read
         //@TODO: multithreading.. but we only read
         Collection<String> dataKeys = spatial.getUserDataKeys();
         Collection<String> dataKeys = spatial.getUserDataKeys();
-        if (dataKeys.size() > 0) {
+        if (!dataKeys.isEmpty()) {
             Sheet.Set set = Sheet.createPropertiesSet();
             Sheet.Set set = Sheet.createPropertiesSet();
             set.setDisplayName("User Data");
             set.setDisplayName("User Data");
             set.setName(Spatial.class.getName() + "_UserData");
             set.setName(Spatial.class.getName() + "_UserData");

+ 1 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatialChildren.java

@@ -33,7 +33,6 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 
 
 import com.jme3.effect.ParticleEmitter;
 import com.jme3.effect.ParticleEmitter;
 import com.jme3.font.BitmapText;
 import com.jme3.font.BitmapText;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.light.AmbientLight;
 import com.jme3.light.AmbientLight;
 import com.jme3.light.DirectionalLight;
 import com.jme3.light.DirectionalLight;
 import com.jme3.light.Light;
 import com.jme3.light.Light;
@@ -68,7 +67,7 @@ public class JmeSpatialChildren extends Children.Keys<Object> {
 
 
     protected Spatial spatial;
     protected Spatial spatial;
     protected boolean readOnly = true;
     protected boolean readOnly = true;
-    protected HashMap<Object, Node> map = new HashMap<Object, Node>();
+    protected HashMap<Object, Node> map = new HashMap<>();
     private DataObject dataObject;
     private DataObject dataObject;
     boolean hasKeys; // We use this to cache the keys, unless refresh is called
     boolean hasKeys; // We use this to cache the keys, unless refresh is called
 
 

+ 2 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainGrid.java

@@ -115,7 +115,7 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
     }
     }
 
 
     public void tileAttached(Vector3f vctrf, TerrainQuad tq) {
     public void tileAttached(Vector3f vctrf, TerrainQuad tq) {
-        logger.log(Level.FINE, "Calling TerrainGrid update for node: {0}" + this);
+        logger.log(Level.FINE, "Calling TerrainGrid update for node: '{'0'}'{0}", this);
         java.awt.EventQueue.invokeLater(new Runnable() {
         java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
             public void run() {
                 refresh(false);
                 refresh(false);
@@ -124,7 +124,7 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
     }
     }
 
 
     public void tileDetached(Vector3f vctrf, TerrainQuad tq) {
     public void tileDetached(Vector3f vctrf, TerrainQuad tq) {
-        logger.log(Level.FINE, "Calling TerrainGrid update for node: {0}" + this);
+        logger.log(Level.FINE, "Calling TerrainGrid update for node: '{'0'}'{0}", this);
         java.awt.EventQueue.invokeLater(new Runnable() {
         java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
             public void run() {
                 refresh(false);
                 refresh(false);

+ 0 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainQuad.java

@@ -34,10 +34,7 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.terrain.geomipmap.TerrainQuad;
 import com.jme3.terrain.geomipmap.TerrainQuad;
 import java.awt.Image;
 import java.awt.Image;
-import java.io.IOException;
-import org.openide.cookies.SaveCookie;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
 import org.openide.nodes.Sheet;
 import org.openide.nodes.Sheet;
 
 
 /**
 /**

+ 5 - 12
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTrack.java

@@ -86,18 +86,11 @@ public class JmeTrack extends AbstractSceneExplorerNode {
     }
     }
 
 
     private void setName() {
     private void setName() {
-        if (track instanceof BoneTrack) {
-            BoneTrack boneTrack = (BoneTrack) track;
-            super.setName("BoneTrack : " + control.getSkeleton().getBone(boneTrack.getTargetBoneIndex()).getName());
-        } else if (track instanceof EffectTrack) {
-            EffectTrack effectTrack = (EffectTrack) track;
-            super.setName("EffectTrack : " + effectTrack.getEmitter().getName());            
-        } else if (track instanceof AudioTrack) {
-            AudioTrack audioTrack = (AudioTrack) track;
-            super.setName("AudioTrack : " + audioTrack.getAudio().getName());
-            
-        } else {
-            super.setName(track.getClass().getSimpleName());
+        switch (track) {
+            case BoneTrack boneTrack -> super.setName("BoneTrack : " + control.getSkeleton().getBone(boneTrack.getTargetBoneIndex()).getName());
+            case EffectTrack effectTrack -> super.setName("EffectTrack : " + effectTrack.getEmitter().getName());
+            case AudioTrack audioTrack -> super.setName("AudioTrack : " + audioTrack.getAudio().getName());
+            default -> super.setName(track.getClass().getSimpleName());
         }
         }
     }
     }
     
     

+ 11 - 16
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVehicleWheel.java

@@ -39,7 +39,6 @@ import com.jme3.light.Light;
 import com.jme3.math.Vector3f;
 import com.jme3.math.Vector3f;
 import java.awt.Image;
 import java.awt.Image;
 import java.io.IOException;
 import java.io.IOException;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
 import javax.swing.Action;
 import javax.swing.Action;
 import org.openide.actions.DeleteAction;
 import org.openide.actions.DeleteAction;
@@ -95,8 +94,8 @@ public class JmeVehicleWheel extends AbstractSceneExplorerNode{
         }
         }
 
 
         set.put(makeProperty(obj, Vector3f.class, "getLocation", "Location"));
         set.put(makeProperty(obj, Vector3f.class, "getLocation", "Location"));
-        set.put(makeProperty(obj, Vector3f.class, "getAxle", "Axis"));
-        set.put(makeProperty(obj, Vector3f.class, "getDirection", "Direction"));
+        //set.put(makeProperty(obj, Vector3f.class, "getAxle", "Axis"));
+        //set.put(makeProperty(obj, Vector3f.class, "getDirection", "Direction"));
         set.put(makeProperty(obj, boolean.class, "isFrontWheel", "setFrontWheel", "Front Wheel"));
         set.put(makeProperty(obj, boolean.class, "isFrontWheel", "setFrontWheel", "Front Wheel"));
         set.put(makeProperty(obj, float.class, "getFrictionSlip", "setFrictionSlip", "Friction Slip"));
         set.put(makeProperty(obj, float.class, "getFrictionSlip", "setFrictionSlip", "Friction Slip"));
         set.put(makeProperty(obj, float.class, "getMaxSuspensionForce", "setMaxSuspensionForce", "Max Suspension Force"));
         set.put(makeProperty(obj, float.class, "getMaxSuspensionForce", "setMaxSuspensionForce", "Max Suspension Force"));
@@ -131,26 +130,22 @@ public class JmeVehicleWheel extends AbstractSceneExplorerNode{
     @Override
     @Override
     public void destroy() throws IOException {
     public void destroy() throws IOException {
         try {
         try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    for (int i= 0; i < vehicle.getNumWheels(); i++) {
-                        if(vehicle.getWheel(i)==wheel){
-                            vehicle.removeWheel(i);
-                            return null;
-                        }
+            SceneApplication.getApplication().enqueue(() -> {
+                for (int i = 0; i < vehicle.getNumWheels(); i++) {
+                    if (vehicle.getWheel(i) == wheel) {
+                        vehicle.removeWheel(i);
+                        return null;
                     }
                     }
-                    return null;
                 }
                 }
+                return null;
             }).get();
             }).get();
-            ((AbstractSceneExplorerNode)getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
+            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
+        } catch (InterruptedException | ExecutionException ex) {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }
     }
     }
 
 
+    @Override
     public Class getExplorerObjectClass() {
     public Class getExplorerObjectClass() {
         return VehicleWheel.class;
         return VehicleWheel.class;
     }
     }

+ 0 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/ExtractSubAnimationDialog.java

@@ -38,7 +38,6 @@ import com.jme3.animation.Track;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.sceneexplorer.nodes.animation.JmeAnimControl;
 import com.jme3.gde.core.sceneexplorer.nodes.animation.JmeAnimControl;
 import com.jme3.math.Quaternion;
 import com.jme3.math.Quaternion;
-import com.jme3.math.Transform;
 import com.jme3.math.Vector3f;
 import com.jme3.math.Vector3f;
 import java.awt.Cursor;
 import java.awt.Cursor;
 import java.io.BufferedReader;
 import java.io.BufferedReader;
@@ -62,7 +61,6 @@ public class ExtractSubAnimationDialog extends javax.swing.JDialog {
 
 
     Animation _animation;
     Animation _animation;
     JmeAnimControl _animControl;
     JmeAnimControl _animControl;
-    private int _splitAnimationCount;
 
 
     /**
     /**
      * Creates new form ChannelDialog
      * Creates new form ChannelDialog
@@ -77,7 +75,6 @@ public class ExtractSubAnimationDialog extends javax.swing.JDialog {
         _radManual.setSelected(true);
         _radManual.setSelected(true);
         _txtCsvFilename.setEnabled(false);
         _txtCsvFilename.setEnabled(false);
         _btnBrowse.setEnabled(false);
         _btnBrowse.setEnabled(false);
-        _splitAnimationCount = 0;
     }
     }
 
 
     public void setAnimation(Animation animation) {
     public void setAnimation(Animation animation) {

+ 2 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/ParticleInfluencerPicker.java

@@ -40,7 +40,7 @@ import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.properties.ParticleInfluencerPropertyEditor;
 import com.jme3.gde.core.properties.ParticleInfluencerPropertyEditor;
 import com.jme3.gde.core.sceneexplorer.nodes.JmeParticleEmitter;
 import com.jme3.gde.core.sceneexplorer.nodes.JmeParticleEmitter;
 import java.awt.EventQueue;
 import java.awt.EventQueue;
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Iterator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.List;
 import java.util.Set;
 import java.util.Set;
@@ -126,8 +126,7 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
 
 
-                    HashSet<SearchScope> set = new HashSet<SearchScope>();
-                    set.add(ClassIndex.SearchScope.SOURCE);
+                    Set<SearchScope> set = EnumSet.of(ClassIndex.SearchScope.SOURCE);
 
 
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {

+ 4 - 4
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataDialog.java

@@ -163,13 +163,13 @@ public class UserDataDialog extends javax.swing.JDialog {
                     if (format.equals("String")) {
                     if (format.equals("String")) {
                         spatial.setUserData(name, data);
                         spatial.setUserData(name, data);
                     } else if (format.equals("Int")) {
                     } else if (format.equals("Int")) {
-                        spatial.setUserData(name, Integer.parseInt(data));
+                        spatial.setUserData(name, Integer.valueOf(data));
                     } else if (format.equals("Float")) {
                     } else if (format.equals("Float")) {
-                        spatial.setUserData(name, Float.parseFloat(data));
+                        spatial.setUserData(name, Float.valueOf(data));
                     } else if (format.equals("Boolean")) {
                     } else if (format.equals("Boolean")) {
-                        spatial.setUserData(name, Boolean.parseBoolean(data));
+                        spatial.setUserData(name, Boolean.valueOf(data));
                     } else if (format.equals("Long")) {
                     } else if (format.equals("Long")) {
-                        spatial.setUserData(name, Long.parseLong(data));
+                        spatial.setUserData(name, Long.valueOf(data));
                     } else if (userData != null) {
                     } else if (userData != null) {
                         spatial.setUserData(name, userData);
                         spatial.setUserData(name, userData);
                     }
                     }

+ 2 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataPicker.java

@@ -39,7 +39,7 @@ package com.jme3.gde.core.sceneexplorer.nodes.actions;
 import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial;
 import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial;
 import java.awt.EventQueue;
 import java.awt.EventQueue;
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Iterator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.List;
 import java.util.Set;
 import java.util.Set;
@@ -114,8 +114,7 @@ public class UserDataPicker extends javax.swing.JDialog {
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
 
 
-                    HashSet<SearchScope> set = new HashSet<SearchScope>();
-                    set.add(ClassIndex.SearchScope.SOURCE);
+                    Set<SearchScope> set = EnumSet.of(ClassIndex.SearchScope.SOURCE);
 
 
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {

+ 0 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/animation/AnimClipProperty.java

@@ -34,9 +34,7 @@ package com.jme3.gde.core.sceneexplorer.nodes.actions.animation;
 import com.jme3.anim.AnimClip;
 import com.jme3.anim.AnimClip;
 import com.jme3.anim.AnimComposer;
 import com.jme3.anim.AnimComposer;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.scene.SceneApplication;
-import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
 import org.openide.nodes.PropertySupport;
 import org.openide.nodes.PropertySupport;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;

+ 1 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlVisualPanel1.form

@@ -1,4 +1,4 @@
-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 
 
 <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
 <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   <AuxValues>
   <AuxValues>

+ 2 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlVisualPanel1.java

@@ -31,7 +31,7 @@
  */
  */
 package com.jme3.gde.core.sceneexplorer.nodes.actions.impl;
 package com.jme3.gde.core.sceneexplorer.nodes.actions.impl;
 
 
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Iterator;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
@@ -94,8 +94,7 @@ public final class NewCustomControlVisualPanel1 extends JPanel {
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.COMPILE),
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
                             ClassPath.getClassPath(sourceGroup.getRootFolder(), ClassPath.SOURCE));
 
 
-                    HashSet<SearchScope> set = new HashSet<SearchScope>();
-                    set.add(ClassIndex.SearchScope.SOURCE);
+                    Set<SearchScope> set = EnumSet.of(ClassIndex.SearchScope.SOURCE);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     Set<ElementHandle<TypeElement>> types = cpInfo.getClassIndex().getDeclaredTypes("", NameKind.PREFIX, set);
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                     for (Iterator<ElementHandle<TypeElement>> it = types.iterator(); it.hasNext();) {
                         final ElementHandle<TypeElement> elementHandle = it.next();
                         final ElementHandle<TypeElement> elementHandle = it.next();

+ 74 - 0
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometryCylinderAction.java

@@ -0,0 +1,74 @@
+/*
+ *  Copyright (c) 2009-2024 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.core.sceneexplorer.nodes.actions.impl;
+
+import com.jme3.gde.core.sceneexplorer.nodes.actions.AbstractNewSpatialAction;
+import com.jme3.gde.core.sceneexplorer.nodes.actions.NewGeometryAction;
+import com.jme3.gde.core.sceneexplorer.nodes.primitives.CreateCylinderPanel;
+import com.jme3.scene.Geometry;
+import com.jme3.scene.Node;
+import com.jme3.scene.Spatial;
+import com.jme3.scene.shape.Cylinder;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+
+/**
+ * Action to create a new primitive (Cylinder)
+ *
+ * @author neph1
+ */
[email protected](service = NewGeometryAction.class)
+public class NewGeometryCylinderAction extends AbstractNewSpatialAction implements NewGeometryAction {
+
+    CreateCylinderPanel form;
+
+    public NewGeometryCylinderAction() {
+        name = "Cylinder";
+        form = new CreateCylinderPanel();
+    }
+
+    @Override
+    protected Spatial doCreateSpatial(Node parent) {
+        Cylinder cylinder = new Cylinder(form.getZSamples(), form.getRadialSamples(), form.getRadius(), form.getCylinderHeight(), form.isClosed(), form.isInverted());
+        Geometry geom = form.getNewGeomPanel().handleGeometry(pm, cylinder);
+        return geom;
+    }
+
+    @Override
+    protected boolean prepareCreateSpatial() {
+        String msg = "Create new Cylinder";
+        DialogDescriptor dd = new DialogDescriptor(form, msg);
+        Object result = DialogDisplayer.getDefault().notify(dd);
+        return (result == NotifyDescriptor.OK_OPTION);
+    }
+}

+ 11 - 3
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewGeometryQuadAction.java

@@ -1,5 +1,5 @@
 /*
 /*
- *  Copyright (c) 2009-2019 jMonkeyEngine
+ *  Copyright (c) 2009-2024 jMonkeyEngine
  *  All rights reserved.
  *  All rights reserved.
  * 
  * 
  *  Redistribution and use in source and binary forms, with or without
  *  Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,10 @@ import com.jme3.gde.core.sceneexplorer.nodes.actions.AbstractNewSpatialAction;
 import com.jme3.gde.core.sceneexplorer.nodes.actions.NewGeometryAction;
 import com.jme3.gde.core.sceneexplorer.nodes.actions.NewGeometryAction;
 import com.jme3.gde.core.sceneexplorer.nodes.primitives.CreateQuadPanel;
 import com.jme3.gde.core.sceneexplorer.nodes.primitives.CreateQuadPanel;
 import com.jme3.scene.Geometry;
 import com.jme3.scene.Geometry;
+import com.jme3.scene.Mesh;
 import com.jme3.scene.Node;
 import com.jme3.scene.Node;
 import com.jme3.scene.Spatial;
 import com.jme3.scene.Spatial;
+import com.jme3.scene.shape.CenterQuad;
 import com.jme3.scene.shape.Quad;
 import com.jme3.scene.shape.Quad;
 import org.openide.DialogDescriptor;
 import org.openide.DialogDescriptor;
 import org.openide.DialogDisplayer;
 import org.openide.DialogDisplayer;
@@ -60,8 +62,14 @@ public class NewGeometryQuadAction extends AbstractNewSpatialAction implements N
 
 
     @Override
     @Override
     protected Spatial doCreateSpatial(Node parent) {
     protected Spatial doCreateSpatial(Node parent) {
-        Quad q = new Quad(form.getQuadWidth(), form.getQuadHeight(), form.isFlipCoords());
-        Geometry geom = form.getNewGeomPanel().handleGeometry(pm, q);
+        Mesh mesh;
+        if (form.isCentered()) {
+            mesh = new CenterQuad(form.getQuadWidth(), form.getQuadHeight(), form.isFlipCoords());
+        } else {
+            mesh = new Quad(form.getQuadWidth(), form.getQuadHeight(), form.isFlipCoords());
+        }
+        
+        Geometry geom = form.getNewGeomPanel().handleGeometry(pm, mesh);
         // parent.attachChild(geom); // was present in previous code, but should neither be necessary nor correct
         // parent.attachChild(geom); // was present in previous code, but should neither be necessary nor correct
         return geom;
         return geom;
     }
     }

+ 13 - 11
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClip.java

@@ -45,6 +45,7 @@ import java.beans.PropertyChangeEvent;
 import java.io.IOException;
 import java.io.IOException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
 import javax.swing.Action;
 import javax.swing.Action;
+import javax.swing.SwingUtilities;
 import org.openide.actions.DeleteAction;
 import org.openide.actions.DeleteAction;
 import org.openide.actions.RenameAction;
 import org.openide.actions.RenameAction;
 import org.openide.awt.Actions;
 import org.openide.awt.Actions;
@@ -162,19 +163,20 @@ public class JmeAnimClip extends AbstractSceneExplorerNode {
 
 
     @Override
     @Override
     public void destroy() throws IOException {
     public void destroy() throws IOException {
-        super.destroy();     
+        super.destroy();  
         final AnimComposer control = jmeControl.getLookup().lookup(AnimComposer.class);
         final AnimComposer control = jmeControl.getLookup().lookup(AnimComposer.class);
-        try {
-            lookupContents.remove(this.animClip);
-            lookupContents.remove(this);
-            SceneApplication.getApplication().enqueue(() -> {
-                control.removeAnimClip(this.animClip);
-                return null;
-            }).get();
-            setChanged();
-        } catch (InterruptedException | ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
+        if (playing) {
+            control.removeCurrentAction(AnimComposer.DEFAULT_LAYER);
+            jmeControl.setAnimClip(null);
+            
         }
         }
+        lookupContents.remove(JmeAnimClip.this.animClip);
+        lookupContents.remove(this);
+        SceneApplication.getApplication().enqueue( () -> {
+            control.removeAnimClip(this.animClip);
+            SwingUtilities.invokeLater(() -> jmeControl.refresh(false));
+        });
+        setChanged();
     }
     }
 
 
     @Override
     @Override

+ 2 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClipChildren.java

@@ -94,8 +94,8 @@ public class JmeAnimClipChildren extends Children.Keys<Object> {
 
 
     @Override
     @Override
     protected Node[] createNodes(Object key) {
     protected Node[] createNodes(Object key) {
-        if (key instanceof AnimClip) {
-            return new Node[]{ new JmeAnimClip(jmeAnimComposer, (AnimClip)key, dataObject).setReadOnly(readOnly)};
+        if (key instanceof AnimClip animClip) {
+            return new Node[]{ new JmeAnimClip(jmeAnimComposer, animClip, dataObject).setReadOnly(readOnly)};
         } else {
         } else {
             return new Node[]{ Node.EMPTY };
             return new Node[]{ Node.EMPTY };
         }
         }

+ 7 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimComposer.java

@@ -125,7 +125,7 @@ public class JmeAnimComposer extends JmeControl {
             Exceptions.printStackTrace(ex);
             Exceptions.printStackTrace(ex);
         }
         }
     }
     }
-
+    
     @Override
     @Override
     public Action[] getActions(boolean context) {
     public Action[] getActions(boolean context) {
         return new Action[]{
         return new Action[]{
@@ -149,4 +149,10 @@ public class JmeAnimComposer extends JmeControl {
         JmeAnimClipChildren children = new JmeAnimClipChildren(this);
         JmeAnimClipChildren children = new JmeAnimClipChildren(this);
         return new Node[]{ new JmeAnimComposer((AnimComposer)key, children, key2)};
         return new Node[]{ new JmeAnimComposer((AnimComposer)key, children, key2)};
     }
     }
+    
+    @Override
+    public void refresh(boolean immediate) {
+        ((JmeAnimClipChildren) jmeChildren).refreshChildren(immediate);
+        super.refresh(immediate);
+    }
 }
 }

+ 12 - 0
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties

@@ -26,3 +26,15 @@ CreateLinePanel.lblStart.text=Start Point:
 CreateQuadPanel.lblHeight.text=height
 CreateQuadPanel.lblHeight.text=height
 CreateQuadPanel.lblWidth.text=width
 CreateQuadPanel.lblWidth.text=width
 CreateSpherePanel.lblRadialSamples.text=Radial Samples:
 CreateSpherePanel.lblRadialSamples.text=Radial Samples:
+CreateCylinderPanel.lblRadius.text=Radius:
+CreateCylinderPanel.lblZSamples.toolTipText=
+CreateCylinderPanel.lblZSamples.text=Z-Samples:
+CreateCylinderPanel.lblRadialSamples.text=Radial Samples:
+CreateCylinderPanel.jPanel1.border.title=Sphere Specific Settings
+CreateCylinderPanel.abstractNewGeometryPanel1.border.title=General Geometry Settings
+CreateCylinderPanel.lblRadius.toolTipText=
+CreateCylinderPanel.checkClosed.text=Closed
+CreateCylinderPanel.checkInverted.text=Inverted
+CreateQuadPanel.checkCentered.text=centered
+CreateCylinderPanel.lblHeight.toolTipText=
+CreateCylinderPanel.lblHeight.text=Height:

+ 227 - 0
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateCylinderPanel.form

@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                  <Component id="abstractNewGeometryPanel1" max="32767" attributes="0"/>
+                  <Component id="jPanel1" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="abstractNewGeometryPanel1" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jPanel1" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel" name="abstractNewGeometryPanel1">
+      <Properties>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+            <TitledBorder title="General Geometry Settings">
+              <ResourceString PropertyName="titleX" bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.abstractNewGeometryPanel1.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </TitledBorder>
+          </Border>
+        </Property>
+      </Properties>
+    </Component>
+    <Container class="javax.swing.JPanel" name="jPanel1">
+      <Properties>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+            <TitledBorder title="Sphere Specific Settings">
+              <ResourceString PropertyName="titleX" bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.jPanel1.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </TitledBorder>
+          </Border>
+        </Property>
+      </Properties>
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="102" attributes="0">
+                          <Component id="lblRadialSamples" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                          <Component id="spinnerRadialSamples" max="32767" attributes="0"/>
+                      </Group>
+                      <Group type="102" alignment="0" attributes="0">
+                          <Component id="lblZSamples" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
+                          <Component id="spinnerZSamples" max="32767" attributes="0"/>
+                      </Group>
+                      <Group type="102" alignment="0" attributes="0">
+                          <Component id="lblRadius" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace min="-2" pref="63" max="-2" attributes="0"/>
+                          <Component id="spinnerRadius" max="32767" attributes="0"/>
+                      </Group>
+                      <Group type="102" attributes="0">
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Component id="checkInverted" alignment="0" min="-2" max="-2" attributes="0"/>
+                              <Component id="checkClosed" alignment="0" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                      </Group>
+                      <Group type="102" alignment="0" attributes="0">
+                          <Component id="lblHeight" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
+                          <Component id="spinnerHeight" max="32767" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="lblRadialSamples" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="spinnerRadialSamples" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="lblZSamples" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="spinnerZSamples" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="lblRadius" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="spinnerRadius" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="102" attributes="0">
+                          <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                          <Group type="103" groupAlignment="3" attributes="0">
+                              <Component id="lblHeight" alignment="3" min="-2" max="-2" attributes="0"/>
+                              <Component id="spinnerHeight" alignment="3" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace pref="75" max="32767" attributes="0"/>
+                      </Group>
+                      <Group type="102" alignment="1" attributes="0">
+                          <EmptySpace max="32767" attributes="0"/>
+                          <Component id="checkClosed" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                          <Component id="checkInverted" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JLabel" name="lblRadialSamples">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblRadialSamples.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="name" type="java.lang.String" value="" noResource="true"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JSpinner" name="spinnerRadialSamples">
+          <Properties>
+            <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
+              <SpinnerModel initial="10" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
+            </Property>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JCheckBox" name="checkClosed">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.checkClosed.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JSpinner" name="spinnerZSamples">
+          <Properties>
+            <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
+              <SpinnerModel initial="10" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
+            </Property>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JLabel" name="lblZSamples">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblZSamples.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblZSamples.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="name" type="java.lang.String" value="" noResource="true"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JCheckBox" name="checkInverted">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.checkInverted.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JSpinner" name="spinnerRadius">
+          <Properties>
+            <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
+              <SpinnerModel initial="0.5" numberType="java.lang.Float" stepSize="0.01" type="number"/>
+            </Property>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JLabel" name="lblRadius">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblRadius.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblRadius.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="name" type="java.lang.String" value="" noResource="true"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JLabel" name="lblHeight">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblHeight.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateCylinderPanel.lblHeight.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="name" type="java.lang.String" value="" noResource="true"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JSpinner" name="spinnerHeight">
+          <Properties>
+            <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
+              <SpinnerModel initial="0.5" numberType="java.lang.Float" stepSize="0.01" type="number"/>
+            </Property>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

+ 226 - 0
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateCylinderPanel.java

@@ -0,0 +1,226 @@
+/*
+ *  Copyright (c) 2019-2024 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.core.sceneexplorer.nodes.primitives;
+
+import com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel;
+
+/**
+ * This is the Panel which creates a new Primitive (Cylinder)
+ *
+ * @author neph1
+ */
+public class CreateCylinderPanel extends javax.swing.JPanel {
+
+    /**
+     * Creates new form CreateBoxPanel
+     */
+    public CreateCylinderPanel() {
+        initComponents();
+    }
+
+    public AbstractNewGeometryPanel getNewGeomPanel() {
+        return abstractNewGeometryPanel1;
+    }
+
+    public int getZSamples() {
+        return (int) spinnerZSamples.getValue();
+    }
+
+    public int getRadialSamples() {
+        return (int) spinnerRadialSamples.getValue();
+    }
+
+    public float getRadius() {
+        return (float) spinnerRadius.getValue();
+    }
+    
+    public float getCylinderHeight() {
+        return (float) spinnerHeight.getValue();
+    }
+
+    public boolean isClosed() {
+        return checkClosed.isSelected();
+    }
+
+    public boolean isInverted() {
+        return checkInverted.isSelected();
+    }
+
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        abstractNewGeometryPanel1 = new com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel();
+        jPanel1 = new javax.swing.JPanel();
+        lblRadialSamples = new javax.swing.JLabel();
+        spinnerRadialSamples = new javax.swing.JSpinner();
+        checkClosed = new javax.swing.JCheckBox();
+        spinnerZSamples = new javax.swing.JSpinner();
+        lblZSamples = new javax.swing.JLabel();
+        checkInverted = new javax.swing.JCheckBox();
+        spinnerRadius = new javax.swing.JSpinner();
+        lblRadius = new javax.swing.JLabel();
+        lblHeight = new javax.swing.JLabel();
+        spinnerHeight = new javax.swing.JSpinner();
+
+        abstractNewGeometryPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.abstractNewGeometryPanel1.border.title"))); // NOI18N
+
+        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.jPanel1.border.title"))); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(lblRadialSamples, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblRadialSamples.text")); // NOI18N
+        lblRadialSamples.setName(""); // NOI18N
+
+        spinnerRadialSamples.setModel(new javax.swing.SpinnerNumberModel(10, 1, null, 1));
+
+        org.openide.awt.Mnemonics.setLocalizedText(checkClosed, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.checkClosed.text")); // NOI18N
+
+        spinnerZSamples.setModel(new javax.swing.SpinnerNumberModel(10, 1, null, 1));
+
+        org.openide.awt.Mnemonics.setLocalizedText(lblZSamples, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblZSamples.text")); // NOI18N
+        lblZSamples.setToolTipText(org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblZSamples.toolTipText")); // NOI18N
+        lblZSamples.setName(""); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(checkInverted, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.checkInverted.text")); // NOI18N
+
+        spinnerRadius.setModel(new javax.swing.SpinnerNumberModel(0.5f, null, null, 0.01f));
+
+        org.openide.awt.Mnemonics.setLocalizedText(lblRadius, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblRadius.text")); // NOI18N
+        lblRadius.setToolTipText(org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblRadius.toolTipText")); // NOI18N
+        lblRadius.setName(""); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(lblHeight, org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblHeight.text")); // NOI18N
+        lblHeight.setToolTipText(org.openide.util.NbBundle.getMessage(CreateCylinderPanel.class, "CreateCylinderPanel.lblHeight.toolTipText")); // NOI18N
+        lblHeight.setName(""); // NOI18N
+
+        spinnerHeight.setModel(new javax.swing.SpinnerNumberModel(0.5f, null, null, 0.01f));
+
+        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+        jPanel1.setLayout(jPanel1Layout);
+        jPanel1Layout.setHorizontalGroup(
+            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(jPanel1Layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addComponent(lblRadialSamples)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(spinnerRadialSamples))
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addComponent(lblZSamples)
+                        .addGap(41, 41, 41)
+                        .addComponent(spinnerZSamples))
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addComponent(lblRadius)
+                        .addGap(63, 63, 63)
+                        .addComponent(spinnerRadius))
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(checkInverted)
+                            .addComponent(checkClosed))
+                        .addGap(0, 0, Short.MAX_VALUE))
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addComponent(lblHeight)
+                        .addGap(66, 66, 66)
+                        .addComponent(spinnerHeight)))
+                .addContainerGap())
+        );
+        jPanel1Layout.setVerticalGroup(
+            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(jPanel1Layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblRadialSamples)
+                    .addComponent(spinnerRadialSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblZSamples)
+                    .addComponent(spinnerZSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblRadius)
+                    .addComponent(spinnerRadius, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(lblHeight)
+                            .addComponent(spinnerHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addContainerGap(75, Short.MAX_VALUE))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(checkClosed)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(checkInverted)
+                        .addContainerGap())))
+        );
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                    .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+    }// </editor-fold>//GEN-END:initComponents
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel abstractNewGeometryPanel1;
+    private javax.swing.JCheckBox checkClosed;
+    private javax.swing.JCheckBox checkInverted;
+    private javax.swing.JPanel jPanel1;
+    private javax.swing.JLabel lblHeight;
+    private javax.swing.JLabel lblRadialSamples;
+    private javax.swing.JLabel lblRadius;
+    private javax.swing.JLabel lblZSamples;
+    private javax.swing.JSpinner spinnerHeight;
+    private javax.swing.JSpinner spinnerRadialSamples;
+    private javax.swing.JSpinner spinnerRadius;
+    private javax.swing.JSpinner spinnerZSamples;
+    // End of variables declaration//GEN-END:variables
+}

+ 20 - 8
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateQuadPanel.form

@@ -32,8 +32,8 @@
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <Component id="abstractNewGeometryPanel1" min="-2" max="-2" attributes="0"/>
               <Component id="abstractNewGeometryPanel1" min="-2" max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
-              <Component id="jPanel1" min="-2" pref="105" max="-2" attributes="0"/>
-              <EmptySpace max="32767" attributes="0"/>
+              <Component id="jPanel1" pref="136" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
           </Group>
           </Group>
       </Group>
       </Group>
     </DimensionLayout>
     </DimensionLayout>
@@ -64,13 +64,9 @@
       <Layout>
       <Layout>
         <DimensionLayout dim="0">
         <DimensionLayout dim="0">
           <Group type="103" groupAlignment="0" attributes="0">
           <Group type="103" groupAlignment="0" attributes="0">
-              <Group type="102" alignment="0" attributes="0">
+              <Group type="102" attributes="0">
                   <EmptySpace max="-2" attributes="0"/>
                   <EmptySpace max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Group type="102" attributes="0">
-                          <Component id="checkFlipCoords" min="-2" max="-2" attributes="0"/>
-                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
-                      </Group>
                       <Group type="102" attributes="0">
                       <Group type="102" attributes="0">
                           <Group type="103" groupAlignment="0" attributes="0">
                           <Group type="103" groupAlignment="0" attributes="0">
                               <Component id="lblHeight" alignment="0" min="-2" max="-2" attributes="0"/>
                               <Component id="lblHeight" alignment="0" min="-2" max="-2" attributes="0"/>
@@ -82,6 +78,13 @@
                               <Component id="spinnerY" max="32767" attributes="0"/>
                               <Component id="spinnerY" max="32767" attributes="0"/>
                           </Group>
                           </Group>
                       </Group>
                       </Group>
+                      <Group type="102" attributes="0">
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Component id="checkFlipCoords" min="-2" max="-2" attributes="0"/>
+                              <Component id="checkCentered" alignment="0" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                      </Group>
                   </Group>
                   </Group>
                   <EmptySpace max="-2" attributes="0"/>
                   <EmptySpace max="-2" attributes="0"/>
               </Group>
               </Group>
@@ -102,7 +105,9 @@
                   </Group>
                   </Group>
                   <EmptySpace max="32767" attributes="0"/>
                   <EmptySpace max="32767" attributes="0"/>
                   <Component id="checkFlipCoords" min="-2" max="-2" attributes="0"/>
                   <Component id="checkFlipCoords" min="-2" max="-2" attributes="0"/>
-                  <EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="checkCentered" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
               </Group>
               </Group>
           </Group>
           </Group>
         </DimensionLayout>
         </DimensionLayout>
@@ -144,6 +149,13 @@
             </Property>
             </Property>
           </Properties>
           </Properties>
         </Component>
         </Component>
+        <Component class="javax.swing.JCheckBox" name="checkCentered">
+          <Properties>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/core/sceneexplorer/nodes/primitives/Bundle.properties" key="CreateQuadPanel.checkCentered.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+          </Properties>
+        </Component>
       </SubComponents>
       </SubComponents>
     </Container>
     </Container>
   </SubComponents>
   </SubComponents>

+ 20 - 8
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateQuadPanel.java

@@ -1,5 +1,5 @@
 /*
 /*
- *  Copyright (c) 2019- jMonkeyEngine
+ *  Copyright (c) 2019-2024 jMonkeyEngine
  *  All rights reserved.
  *  All rights reserved.
  * 
  * 
  *  Redistribution and use in source and binary forms, with or without
  *  Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,10 @@ public class CreateQuadPanel extends javax.swing.JPanel {
     public boolean isFlipCoords() {
     public boolean isFlipCoords() {
         return checkFlipCoords.isSelected();
         return checkFlipCoords.isSelected();
     }
     }
+    
+    public boolean isCentered() {
+        return checkCentered.isSelected();
+    }
 
 
     /**
     /**
      * This method is called from within the constructor to initialize the form.
      * This method is called from within the constructor to initialize the form.
@@ -79,6 +83,7 @@ public class CreateQuadPanel extends javax.swing.JPanel {
         lblHeight = new javax.swing.JLabel();
         lblHeight = new javax.swing.JLabel();
         spinnerY = new javax.swing.JSpinner();
         spinnerY = new javax.swing.JSpinner();
         checkFlipCoords = new javax.swing.JCheckBox();
         checkFlipCoords = new javax.swing.JCheckBox();
+        checkCentered = new javax.swing.JCheckBox();
 
 
         abstractNewGeometryPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateQuadPanel.class, "CreateQuadPanel.abstractNewGeometryPanel1.border.title"))); // NOI18N
         abstractNewGeometryPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CreateQuadPanel.class, "CreateQuadPanel.abstractNewGeometryPanel1.border.title"))); // NOI18N
 
 
@@ -95,6 +100,8 @@ public class CreateQuadPanel extends javax.swing.JPanel {
 
 
         org.openide.awt.Mnemonics.setLocalizedText(checkFlipCoords, org.openide.util.NbBundle.getMessage(CreateQuadPanel.class, "CreateQuadPanel.checkFlipCoords.text")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(checkFlipCoords, org.openide.util.NbBundle.getMessage(CreateQuadPanel.class, "CreateQuadPanel.checkFlipCoords.text")); // NOI18N
 
 
+        org.openide.awt.Mnemonics.setLocalizedText(checkCentered, org.openide.util.NbBundle.getMessage(CreateQuadPanel.class, "CreateQuadPanel.checkCentered.text")); // NOI18N
+
         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
         jPanel1.setLayout(jPanel1Layout);
         jPanel1.setLayout(jPanel1Layout);
         jPanel1Layout.setHorizontalGroup(
         jPanel1Layout.setHorizontalGroup(
@@ -102,9 +109,6 @@ public class CreateQuadPanel extends javax.swing.JPanel {
             .addGroup(jPanel1Layout.createSequentialGroup()
             .addGroup(jPanel1Layout.createSequentialGroup()
                 .addContainerGap()
                 .addContainerGap()
                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addComponent(checkFlipCoords)
-                        .addGap(0, 0, Short.MAX_VALUE))
                     .addGroup(jPanel1Layout.createSequentialGroup()
                     .addGroup(jPanel1Layout.createSequentialGroup()
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(lblHeight)
                             .addComponent(lblHeight)
@@ -112,7 +116,12 @@ public class CreateQuadPanel extends javax.swing.JPanel {
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(spinnerX)
                             .addComponent(spinnerX)
-                            .addComponent(spinnerY))))
+                            .addComponent(spinnerY)))
+                    .addGroup(jPanel1Layout.createSequentialGroup()
+                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(checkFlipCoords)
+                            .addComponent(checkCentered))
+                        .addGap(0, 0, Short.MAX_VALUE)))
                 .addContainerGap())
                 .addContainerGap())
         );
         );
         jPanel1Layout.setVerticalGroup(
         jPanel1Layout.setVerticalGroup(
@@ -128,7 +137,9 @@ public class CreateQuadPanel extends javax.swing.JPanel {
                     .addComponent(spinnerY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                     .addComponent(spinnerY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addComponent(checkFlipCoords)
                 .addComponent(checkFlipCoords)
-                .addGap(35, 35, 35))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(checkCentered)
+                .addGap(8, 8, 8))
         );
         );
 
 
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -148,13 +159,14 @@ public class CreateQuadPanel extends javax.swing.JPanel {
                 .addContainerGap()
                 .addContainerGap()
                 .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addComponent(abstractNewGeometryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, Short.MAX_VALUE)
+                .addContainerGap())
         );
         );
     }// </editor-fold>//GEN-END:initComponents
     }// </editor-fold>//GEN-END:initComponents
 
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel abstractNewGeometryPanel1;
     private com.jme3.gde.core.sceneexplorer.nodes.actions.impl.AbstractNewGeometryPanel abstractNewGeometryPanel1;
+    private javax.swing.JCheckBox checkCentered;
     private javax.swing.JCheckBox checkFlipCoords;
     private javax.swing.JCheckBox checkFlipCoords;
     private javax.swing.JPanel jPanel1;
     private javax.swing.JPanel jPanel1;
     private javax.swing.JLabel lblHeight;
     private javax.swing.JLabel lblHeight;

+ 2 - 1
jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java

@@ -41,6 +41,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.OutputStream;
+import java.net.URI;
 import java.net.URL;
 import java.net.URL;
 import java.util.Properties;
 import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentHashMap;
@@ -177,7 +178,7 @@ public class ZipExtensionTool {
         URL url = null;
         URL url = null;
         try {
         try {
             String tempFileName = extractionPath + "_tmp.zip";
             String tempFileName = extractionPath + "_tmp.zip";
-            url = new URL("nbres:" + zipPath);
+            url = URI.create("nbres:" + zipPath).toURL();
             in = new BufferedInputStream(url.openStream());
             in = new BufferedInputStream(url.openStream());
             out = new BufferedOutputStream(new FileOutputStream(tempFileName));
             out = new BufferedOutputStream(new FileOutputStream(tempFileName));
             int inbyte = in.read();
             int inbyte = in.read();

+ 1 - 1
jme3-dark-laf/nbproject/project.properties

@@ -1,5 +1,5 @@
 file.reference.nimrodlf.jar=release/modules/ext/nimrodlf.jar
 file.reference.nimrodlf.jar=release/modules/ext/nimrodlf.jar
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 0 - 1
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DMUtils.java

@@ -15,7 +15,6 @@ import java.awt.image.DataBuffer;
 import java.awt.image.DataBufferFloat;
 import java.awt.image.DataBufferFloat;
 import java.awt.image.Raster;
 import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
 import java.awt.image.WritableRaster;
-import java.io.File;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import javax.imageio.ImageIO;
 import javax.imageio.ImageIO;

+ 0 - 5
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyIconFactory.java

@@ -10,12 +10,7 @@ import java.awt.Color;
 import java.awt.Component;
 import java.awt.Component;
 import java.awt.Graphics;
 import java.awt.Graphics;
 import java.awt.Image;
 import java.awt.Image;
-import java.awt.image.BandedSampleModel;
 import java.awt.image.BufferedImage;
 import java.awt.image.BufferedImage;
-import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferFloat;
-import java.awt.image.Raster;
-import java.awt.image.WritableRaster;
 import java.io.Serializable;
 import java.io.Serializable;
 import javax.swing.Icon;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.ImageIcon;

+ 0 - 4
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyValidator.java

@@ -5,11 +5,7 @@
  */
  */
 package org.jme3.netbeans.plaf.darkmonkey;
 package org.jme3.netbeans.plaf.darkmonkey;
 
 
-import java.awt.EventQueue;
-import javax.swing.JOptionPane;
-import javax.swing.UIManager;
 import org.openide.modules.OnStart;
 import org.openide.modules.OnStart;
-import org.openide.windows.OnShowing;
 
 
 /**
 /**
  * This is something that would be used once the nbm format is no longer
  * This is something that would be used once the nbm format is no longer

+ 1 - 1
jme3-desktop-executables/nbproject/project.properties

@@ -1,5 +1,5 @@
 #Thu, 25 Aug 2011 20:26:49 +0200
 #Thu, 25 Aug 2011 20:26:49 +0200
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint\:-serial
 javac.compilerargs=-Xlint -Xlint\:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 10 - 11
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java

@@ -39,7 +39,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Callable;
 import java.util.logging.Level;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
@@ -91,21 +91,20 @@ public class JreDownloader {
     private static void attemptDownload(String newUrl, File dest, int retry) {
     private static void attemptDownload(String newUrl, File dest, int retry) {
         logger.log(Level.INFO, "Attempt to download JRE from {0}", newUrl);
         logger.log(Level.INFO, "Attempt to download JRE from {0}", newUrl);
         try {
         try {
-            HttpURLConnection connection = (HttpURLConnection) new URL(newUrl).openConnection();
+            HttpURLConnection connection = (HttpURLConnection) URI.create(newUrl).toURL().openConnection();
             connection.setRequestProperty("Cookie", "gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie");
             connection.setRequestProperty("Cookie", "gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie");
             connection.setAllowUserInteraction(false);
             connection.setAllowUserInteraction(false);
             connection.setInstanceFollowRedirects(true);
             connection.setInstanceFollowRedirects(true);
             connection.connect();
             connection.connect();
             int status = connection.getResponseCode();
             int status = connection.getResponseCode();
-            if (status == HttpURLConnection.HTTP_OK) {
-                downloadFile(connection, dest, retry);
-            } else if (status == HttpURLConnection.HTTP_MOVED_TEMP || status == HttpURLConnection.HTTP_MOVED_PERM || status == HttpURLConnection.HTTP_SEE_OTHER) {
-                handleRedirect(connection, dest, retry);
-            } else if (status == HttpURLConnection.HTTP_NOT_FOUND) {
-                MessageUtil.error("Download of JRE failed because it was not found.\nMaybe you are running an old Version which isn't available for download anymore?");
-                MessageUtil.error("Go to download.oracle.com and alter the version field in the Project Properties accordingly.\nIf the Problem persists, download the .tar.gz files manually to\n" + dest.getAbsolutePath());
-            } else {
-                logger.log(Level.WARNING, "Download of JRE from {0} failed. HTTP Status Code {1} ", new Object[]{newUrl, status});
+            switch (status) {
+                case HttpURLConnection.HTTP_OK -> downloadFile(connection, dest, retry);
+                case HttpURLConnection.HTTP_MOVED_TEMP, HttpURLConnection.HTTP_MOVED_PERM, HttpURLConnection.HTTP_SEE_OTHER -> handleRedirect(connection, dest, retry);
+                case HttpURLConnection.HTTP_NOT_FOUND -> {
+                    MessageUtil.error("Download of JRE failed because it was not found.\nMaybe you are running an old Version which isn't available for download anymore?");
+                    MessageUtil.error("Go to download.oracle.com and alter the version field in the Project Properties accordingly.\nIf the Problem persists, download the .tar.gz files manually to\n" + dest.getAbsolutePath());
+                }
+                default -> logger.log(Level.WARNING, "Download of JRE from {0} failed. HTTP Status Code {1} ", new Object[]{newUrl, status});
             }
             }
         } catch (MalformedURLException ex) {
         } catch (MalformedURLException ex) {
             logger.log(Level.SEVERE, "{0}", ex);
             logger.log(Level.SEVERE, "{0}", ex);

+ 1 - 1
jme3-documentation/nbproject/project.properties

@@ -1,4 +1,4 @@
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=../license-jme.txt
 license.file=../license-jme.txt
 nbm.homepage=https://www.jmonkeyengine.org
 nbm.homepage=https://www.jmonkeyengine.org

+ 1 - 1
jme3-glsl-highlighter/nbproject/project.properties

@@ -1,3 +1,3 @@
-javac.source=17
+javac.source=21
 javac.compilerargs=-Xlint -Xlint:-serial
 javac.compilerargs=-Xlint -Xlint:-serial
 project.license=jme license
 project.license=jme license

Some files were not shown because too many files changed in this diff