diff --git a/.gitignore b/.gitignore index aeb771d9e..5e7951c48 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,9 @@ /dist/ /build/ /netbeans/ +/sdk/jdks/local/ /jme3-core/build/ -/jme3-core/src/main/java/com/jme3/system/JmeVersion.java +/jme3-core/src/main/resources/com/jme3/system/version.properties /jme3-plugins/build/ /jme3-desktop/build/ /jme3-android-native/build/ @@ -81,6 +82,7 @@ /sdk/jme3-vehicle-creator/build/ /sdk/jme3-welcome-screen/build/ /sdk/jme3-glsl-support/build/ +/sdk/jme3-dark-laf/build/ /sdk/nbproject/private/ /sdk/jme3-scenecomposer/nbproject/private/ /sdk/jme3-core/nbproject/private/ @@ -134,3 +136,13 @@ !/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib !/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so !/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so +/.nb-gradle/ +/sdk/ant-jme/nbproject/private/ +/sdk/nbi/stub/ext/engine/nbproject/private/ +/sdk/nbi/stub/ext/components/products/jdk/nbproject/private/ +/sdk/nbi/stub/ext/components/products/blender/nbproject/private/ +/sdk/nbi/stub/ext/components/products/helloworld/nbproject/private/ +/sdk/BasicGameTemplate/nbproject/private/ +/sdk/nbi/stub/ext/components/products/jdk/build/ +/sdk/nbi/stub/ext/components/products/jdk/dist/ +/sdk/jme3-dark-laf/nbproject/private/ diff --git a/.travis.yml b/.travis.yml index 71c3b576f..48e75d0b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ cache: - gradle-cache - netbeans -branches: - only: - - master +# branches: +# only: +# - master notifications: slack: @@ -25,16 +25,26 @@ install: script: - ./gradlew check - ./gradlew createZipDistribution + - "[ $TRAVIS_BRANCH == 'master' ] && [ $TRAVIS_PULL_REQUEST == 'false' ] && ./gradlew uploadArchives || :" + +before_deploy: + - export RELEASE_DIST=$(ls build/distributions/*.zip) deploy: provider: releases api_key: - secure: "KbFiMt0a8FxUKvCJUYwikLYaqqGMn1p6k4OsXnGqwptQZEUIayabNLHeaD2kTNT3e6AY1ETwQLff/lB2LttmIo4g5NWW63g1K3A/HwgnhJwETengiProZ/Udl+ugPeDL/+ar43HUhFq4knBnzFKnEcHAThTPVqH/RMDvZf1UUYI=" - file: build/distributions/jME3.1.0_snapshot-github_2015-06-20.zip + secure: PuEsJd6juXBH29ByITW3ntSAyrwWs0IeFvXJ5Y2YlhojhSMtTwkoWeB6YmDJWP4fhzbajk4TQ1HlOX2IxJXSW/8ShOEIUlGXz9fHiST0dkSM+iRAUgC5enCLW5ITPTiem7eY9ZhS9miIam7ngce9jHNMh75PTzZrEJtezoALT9w= + file_glob: true + file: "${RELEASE_DIST}" skip_cleanup: true on: + repo: jMonkeyEngine/jmonkeyengine tags: true +before_install: + - git fetch --unshallow + - "[ $TRAVIS_PULL_REQUEST == 'false' ] && openssl aes-256-cbc -K $encrypted_a1949b55824a_key -iv $encrypted_a1949b55824a_iv -in private/www-updater.key.enc -out private/www-updater.key -d || :" + # before_install: # required libs for android build tools # sudo apt-get update diff --git a/build.gradle b/build.gradle index 8e6790230..192bc32d3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,17 @@ import org.gradle.api.artifacts.* buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.1.0' - } + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.1.0' + } } apply plugin: 'base' +apply from: file('version.gradle') +apply from: file('upload.gradle') // This is applied to all sub projects subprojects { @@ -58,15 +60,14 @@ task libDist(dependsOn: subprojects.build) << { } } -task createZipDistribution(type:Zip,dependsOn:["dist","libDist"], description:"Package the nightly zip distribution"){ - archiveName "jME"+jmeVersion+"_"+jmeVersionTag+"_"+new Date().format("yyyy-MM-dd")+".zip" - - into("/") { - from {"./dist"} - } - into("/sources") { - from {"$buildDir/libDist/sources"} - } +task createZipDistribution(type:Zip,dependsOn:["dist","libDist"], description:"Package the nightly zip distribution"){ + archiveName "jME" + jmeFullVersion + ".zip" + into("/") { + from {"./dist"} + } + into("/sources") { + from {"$buildDir/libDist/sources"} + } } task copyLibs(type: Copy){ @@ -114,7 +115,12 @@ task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper gradleVersion = '2.2.1' } -String findNDK() { +ext { + ndkCommandPath = "" + ndkExists = false +} + +task configureAndroidNDK { def ndkBuildFile = "ndk-build" // if windows, use ndk-build.cmd instead if (System.properties['os.name'].toLowerCase().contains('windows')) { @@ -127,27 +133,13 @@ String findNDK() { if (System.env.ANDROID_NDK != null) { ndkBuildPath = System.env.ANDROID_NDK + File.separator + ndkBuildFile } + if (new File(ndkBuildPath).exists()) { - return ndkBuildPath - } else { - return null - } -} - -boolean checkNdkExists(String ndkCommandPath) { -// String ndkCommandPath = findNDK() - if (ndkCommandPath != null && new File(ndkCommandPath).exists()) { - return true - } else { - return false + ndkExists = true + ndkCommandPath = ndkBuildPath } } -ext { - ndkCommandPath = findNDK() - ndkExists = checkNdkExists(ndkCommandPath) -} - //class IncrementalReverseTask extends DefaultTask { // @InputDirectory // def File inputDir diff --git a/common.gradle b/common.gradle index 43fcf481d..237ee5e7f 100644 --- a/common.gradle +++ b/common.gradle @@ -4,10 +4,9 @@ apply plugin: 'java' apply plugin: 'maven' -apply plugin: 'maven-publish' -group = 'com.jme3' -version = jmeVersion + '-' + jmeVersionTag +group = 'com.jme3' +version = jmePomVersion sourceCompatibility = '1.6' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' @@ -19,11 +18,23 @@ repositories { } } +configurations { + deployerJars +} + dependencies { // Adding dependencies here will add the dependencies to each subproject. testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'org.mockito', name: 'mockito-core', version: '2.0.28-beta' testCompile group: 'org.easytesting', name: 'fest-assert-core', version: '2.0M10' + deployerJars "org.apache.maven.wagon:wagon-ssh:2.9" +} + +jar { + manifest { + attributes 'Implementation-Title': 'jMonkeyEngine', + 'Implementation-Version': jmeFullVersion + } } javadoc { @@ -58,41 +69,35 @@ artifacts { } } -publishing { - publications { - maven(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - - pom.withXml { - asNode().children().last() + { - resolveStrategy = Closure.DELEGATE_FIRST - name POM_NAME - description POM_DESCRIPTION - url POM_URL - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEVELOPER_CONNECTION - } - licenses { - license { - name POM_LICENSE_NAME - url POM_LICENSE_URL - distribution POM_LICENSE_DISTRIBUTION - } - } +uploadArchives { + repositories.mavenDeployer { + configuration = configurations.deployerJars + + // disable this otherwise it will fill up the server with stale jars + uniqueVersion = false + + repository(url: "scp://updates.jmonkeyengine.org/var/www/updates/maven") { + authentication(userName: "www-updater", privateKey: "private/www-updater.key") + } + + pom.project { + name POM_NAME + description POM_DESCRIPTION + url POM_URL + scm { + url POM_SCM_URL + connection POM_SCM_CONNECTION + developerConnection POM_SCM_DEVELOPER_CONNECTION + } + licenses { + license { + name POM_LICENSE_NAME + url POM_LICENSE_URL + distribution POM_LICENSE_DISTRIBUTION } } } } - - repositories { - maven { - url "${rootProject.buildDir}/repo" // change to point to your repo, e.g. http://my.org/repo - } - } } task createFolders(description: 'Creates the source folders if they do not exist.') doLast { diff --git a/gradle.properties b/gradle.properties index a00139bdf..4380c31a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,9 @@ jmeVersion = 3.1.0 # Version used for application and settings folder, no spaces! jmeMainVersion = 3.1 # Version addition pre-alpha-svn, Stable, Beta -jmeVersionTag = snapshot-github +jmeVersionTag = SNAPSHOT +# Increment this each time jmeVersionTag changes but jmeVersion stays the same +jmeVersionTagID = 0 # specify if JavaDoc should be built buildJavaDoc = true diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java index f5113129f..6665752b7 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java +++ b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java @@ -145,7 +145,7 @@ public class Ipo { float[] times = new float[framesAmount + 1]; Vector3f[] translations = new Vector3f[framesAmount + 1]; - float[] translation = new float[] { localTranslation.x, localTranslation.y, localTranslation.z }; + float[] translation = new float[3]; Quaternion[] rotations = new Quaternion[framesAmount + 1]; float[] quaternionRotation = new float[] { localRotation.getX(), localRotation.getY(), localRotation.getZ(), localRotation.getW(), }; float[] eulerRotation = localRotation.toAngles(null); @@ -165,6 +165,8 @@ public class Ipo { // calculating track data for (int frame = startFrame; frame <= stopFrame; ++frame) { + boolean translationSet = false; + translation[0] = translation[1] = translation[2] = 0; int index = frame - startFrame; times[index] = index * timeBetweenFrames;// start + (frame - 1) * timeBetweenFrames; for (int j = 0; j < bezierCurves.length; ++j) { @@ -173,15 +175,18 @@ public class Ipo { // LOCATION case AC_LOC_X: translation[0] = (float) value; + translationSet = true; break; case AC_LOC_Y: if (swapAxes && value != 0) { value = -value; } translation[yIndex] = (float) value; + translationSet = true; break; case AC_LOC_Z: translation[zIndex] = (float) value; + translationSet = true; break; // EULER ROTATION @@ -235,7 +240,11 @@ public class Ipo { LOGGER.log(Level.WARNING, "Unknown ipo curve type: {0}.", bezierCurves[j].getType()); } } - translations[index] = localRotation.multLocal(new Vector3f(translation[0], translation[1], translation[2])); + if(translationSet) { + translations[index] = localRotation.multLocal(new Vector3f(translation[0], translation[1], translation[2])); + } else { + translations[index] = new Vector3f(); + } if(boneContext != null) { if(boneContext.getBone().getParent() == null && boneContext.is(BoneContext.NO_LOCAL_LOCATION)) { diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp index 0d9621bb8..c9fef97cb 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp @@ -811,39 +811,72 @@ extern "C" { /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: getAngularFactor - * Signature: (J)F + * Signature: (JLcom/jme3/math/Vector3f;)V */ - JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor - (JNIEnv *env, jobject object, jlong bodyId) { + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { btRigidBody* body = reinterpret_cast(bodyId); if (body == NULL) { jclass newExc = env->FindClass("java/lang/NullPointerException"); env->ThrowNew(newExc, "The native object does not exist."); - return 0; + return; } - return body->getAngularFactor().getX(); + jmeBulletUtil::convert(env, &body->getAngularFactor(), factor); } + /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: setAngularFactor - * Signature: (JF)V + * Signature: (JLcom/jme3/math/Vector3f;)V */ JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *env, jobject object, jlong bodyId, jfloat value) { + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { btRigidBody* body = reinterpret_cast(bodyId); if (body == NULL) { jclass newExc = env->FindClass("java/lang/NullPointerException"); env->ThrowNew(newExc, "The native object does not exist."); return; } - btVector3 vec1 = btVector3(); - vec1.setX(value); - vec1.setY(value); - vec1.setZ(value); - body->setAngularFactor(vec1); + btVector3 vec = btVector3(); + jmeBulletUtil::convert(env, factor, &vec); + body->setAngularFactor(vec); } + /* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: getLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { + btRigidBody* body = reinterpret_cast(bodyId); + if (body == NULL) { + jclass newExc = env->FindClass("java/lang/NullPointerException"); + env->ThrowNew(newExc, "The native object does not exist."); + return; + } + jmeBulletUtil::convert(env, &body->getLinearFactor(), factor); + } + + /* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: setLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { + btRigidBody* body = reinterpret_cast(bodyId); + if (body == NULL) { + jclass newExc = env->FindClass("java/lang/NullPointerException"); + env->ThrowNew(newExc, "The native object does not exist."); + return; + } + btVector3 vec = btVector3(); + jmeBulletUtil::convert(env, factor, &vec); + body->setLinearFactor(vec); + } + #ifdef __cplusplus } #endif diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h index aa09a620a..67ba9e609 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h @@ -396,18 +396,35 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngula /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: getAngularFactor - * Signature: (J)F + * Signature: (JLcom/jme3/math/Vector3f;)V */ -JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor - (JNIEnv *, jobject, jlong); +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor + (JNIEnv *, jobject, jlong, jobject); + /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: setAngularFactor - * Signature: (JF)V + * Signature: (JLcom/jme3/math/Vector3f;)V */ JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *, jobject, jlong, jfloat); + (JNIEnv *, jobject, jlong, jobject); + +/* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: getLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearFactor + (JNIEnv *, jobject, jlong, jobject); + +/* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: setLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearFactor + (JNIEnv *, jobject, jlong, jobject); #ifdef __cplusplus } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java index 525e2e281..00ccdf74e 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java @@ -93,7 +93,9 @@ public class CapsuleCollisionShape extends CollisionShape{ */ @Override public void setScale(Vector3f scale) { - Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CapsuleCollisionShape cannot be scaled"); + if (!scale.equals(Vector3f.UNIT_XYZ)) { + Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CapsuleCollisionShape cannot be scaled"); + } } public void write(JmeExporter ex) throws IOException { diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java index 40417c775..6f6eb4d76 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java @@ -627,16 +627,44 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { private native float getAngularSleepingThreshold(long objectId); public float getAngularFactor() { - return getAngularFactor(objectId); + return getAngularFactor(null).getX(); } - private native float getAngularFactor(long objectId); + public Vector3f getAngularFactor(Vector3f store) { + // doing like this prevent from breaking the API + if (store == null) { + store = new Vector3f(); + } + getAngularFactor(objectId, store); + return store; + } + + private native void getAngularFactor(long objectId, Vector3f vec); public void setAngularFactor(float factor) { - setAngularFactor(objectId, factor); + setAngularFactor(objectId, new Vector3f(factor, factor, factor)); + } + + public void setAngularFactor(Vector3f factor) { + setAngularFactor(objectId, factor); + } + + private native void setAngularFactor(long objectId, Vector3f factor); + + public Vector3f getLinearFactor() { + Vector3f vec = new Vector3f(); + getLinearFactor(objectId, vec); + return vec; } - private native void setAngularFactor(long objectId, float factor); + private native void getLinearFactor(long objectId, Vector3f vec); + + public void setLinearFactor(Vector3f factor) { + setLinearFactor(objectId, factor); + } + + private native void setLinearFactor(long objectId, Vector3f factor); + /** * do not use manually, joints are added automatically @@ -673,7 +701,13 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { capsule.write(getGravity(), "gravity", Vector3f.ZERO); capsule.write(getFriction(), "friction", 0.5f); capsule.write(getRestitution(), "restitution", 0); - capsule.write(getAngularFactor(), "angularFactor", 1); + Vector3f angularFactor = getAngularFactor(null); + if (angularFactor.x == angularFactor.y && angularFactor.y == angularFactor.z) { + capsule.write(getAngularFactor(), "angularFactor", 1); + } else { + capsule.write(getAngularFactor(null), "angularFactor", Vector3f.UNIT_XYZ); + capsule.write(getLinearFactor(), "linearFactor", Vector3f.UNIT_XYZ); + } capsule.write(kinematic, "kinematic", false); capsule.write(getLinearDamping(), "linearDamping", 0); @@ -703,7 +737,13 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { setKinematic(capsule.readBoolean("kinematic", false)); setRestitution(capsule.readFloat("restitution", 0)); - setAngularFactor(capsule.readFloat("angularFactor", 1)); + Vector3f angularFactor = (Vector3f) capsule.readSavable("angularFactor", Vector3f.NAN.clone()); + if(angularFactor == Vector3f.NAN) { + setAngularFactor(capsule.readFloat("angularFactor", 1)); + } else { + setAngularFactor(angularFactor); + setLinearFactor((Vector3f) capsule.readSavable("linearFactor", Vector3f.UNIT_XYZ.clone())); + } setDamping(capsule.readFloat("linearDamping", 0), capsule.readFloat("angularDamping", 0)); setSleepingThresholds(capsule.readFloat("linearSleepingThreshold", 0.8f), capsule.readFloat("angularSleepingThreshold", 1.0f)); setCcdMotionThreshold(capsule.readFloat("ccdMotionThreshold", 0)); diff --git a/jme3-core/build.gradle b/jme3-core/build.gradle index 87b52fb94..8d55c3e76 100644 --- a/jme3-core/build.gradle +++ b/jme3-core/build.gradle @@ -17,55 +17,23 @@ sourceSets { } } -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'org.ajoberstar:gradle-git:1.0.0-rc.1' - } -} - -import java.text.SimpleDateFormat -import org.ajoberstar.grgit.* - -task updateVersion << { - - def verfile = file('src/main/java/com/jme3/system/JmeVersion.java') - def jmeGitHash - def jmeShortGitHash - def jmeBuildDate - def jmeBranchName - - try { - def grgit = Grgit.open(project.file('.').parent) - jmeGitHash = grgit.head().id - jmeShortGitHash = grgit.head().abbreviatedId - jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) - jmeBranchName = grgit.branch.current.name - } catch (ex) { - // Failed to get repo info - logger.warn("Failed to get repository info: " + ex.message + ". " + \ - "Only partial build info will be generated.") - - jmeGitHash = "" - jmeShortGitHash = "" - jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) - jmeBranchName = "unknown" - } - - verfile.text = "\npackage com.jme3.system;\n\n" + - "/**\n * THIS IS AN AUTO-GENERATED FILE..\n * DO NOT MODIFY!\n */\n" + - "public class JmeVersion {\n" + - " public static final String BUILD_DATE = \"${jmeBuildDate}\";\n" + - " public static final String BRANCH_NAME = \"${jmeBranchName}\";\n" + - " public static final String GIT_HASH = \"${jmeGitHash}\";\n" + - " public static final String GIT_SHORT_HASH = \"${jmeShortGitHash}\";\n" + - " public static final String FULL_NAME = \"jMonkeyEngine ${jmeVersion} (${jmeVersionTag})\";\n" + - "}\n" +task updateVersionPropertiesFile << { + def verfile = file('src/main/resources/com/jme3/system/version.properties') + verfile.text = "# THIS IS AN AUTO-GENERATED FILE..\n" + + "# DO NOT MODIFY!\n" + + "build.date=${jmeBuildDate}\n" + + "git.revision=${jmeRevision}\n" + + "git.branch=${jmeBranchName}\n" + + "git.hash=${jmeGitHash}\n" + + "git.hash.short=${jmeShortGitHash}\n" + + "git.tag=${jmeGitTag}\n" + + "name.full=jMonkeyEngine ${jmeFullVersion}\n" + + "version.full=${jmeFullVersion}\n" + + "version.number=${jmeVersion}\n" + + "version.tag=${jmeVersionTag}" } -compileJava.dependsOn(updateVersion) +compileJava.dependsOn(updateVersionPropertiesFile) dependencies { } diff --git a/jme3-core/src/main/java/com/jme3/animation/Bone.java b/jme3-core/src/main/java/com/jme3/animation/Bone.java index a78b4b931..29c0f38e9 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Bone.java +++ b/jme3-core/src/main/java/com/jme3/animation/Bone.java @@ -553,7 +553,6 @@ public final class Bone implements Savable { Vector3f translate = modelPos.add(rotate.mult(scale.mult(modelBindInversePos, tmp2), tmp2), tmp2); // Populating the matrix - outTransform.loadIdentity(); outTransform.setTransform(translate, scale, rotate.toRotationMatrix(tmp4)); } diff --git a/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java b/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java index 373f6fac0..e610ef40b 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java @@ -702,7 +702,9 @@ public class Cinematic extends AbstractCinematicEvent implements AppState { dispose(); cinematicEvents.clear(); timeLine.clear(); - eventsData.clear(); + if (eventsData != null) { + eventsData.clear(); + } } /** diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java index e8bfc5392..738b445b1 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java @@ -43,7 +43,7 @@ import com.jme3.export.JmeImporter; import com.jme3.export.OutputCapsule; import com.jme3.scene.Spatial; import java.io.IOException; -import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; @@ -431,15 +431,17 @@ public class AnimationEvent extends AbstractCinematicEvent { @Override public void dispose() { super.dispose(); - Object o = cinematic.getEventData(MODEL_CHANNELS, model); - if (o != null) { - ArrayList list = (ArrayList) o; - list.remove(channel); - if (list.isEmpty()) { - cinematic.removeEventData(MODEL_CHANNELS, model); + if (cinematic != null) { + Object o = cinematic.getEventData(MODEL_CHANNELS, model); + if (o != null) { + Collection values = ((HashMap) o).values(); + while (values.remove(channel)); + if (values.isEmpty()) { + cinematic.removeEventData(MODEL_CHANNELS, model); + } } + cinematic = null; + channel = null; } - cinematic = null; - channel = null; } } diff --git a/jme3-core/src/main/java/com/jme3/collision/bih/BIHTree.java b/jme3-core/src/main/java/com/jme3/collision/bih/BIHTree.java index 38a633e96..5db94b409 100644 --- a/jme3-core/src/main/java/com/jme3/collision/bih/BIHTree.java +++ b/jme3-core/src/main/java/com/jme3/collision/bih/BIHTree.java @@ -48,6 +48,7 @@ import com.jme3.math.Vector3f; import com.jme3.scene.CollisionData; import com.jme3.scene.Mesh; import com.jme3.scene.Mesh.Mode; +import com.jme3.scene.VertexBuffer; import com.jme3.scene.VertexBuffer.Type; import com.jme3.scene.mesh.IndexBuffer; import com.jme3.scene.mesh.VirtualIndexBuffer; @@ -114,8 +115,13 @@ public class BIHTree implements CollisionData { bihSwapTmp = new float[9]; - FloatBuffer vb = (FloatBuffer) mesh.getBuffer(Type.Position).getData(); + VertexBuffer vBuffer = mesh.getBuffer(Type.Position); + if(vBuffer == null){ + throw new IllegalArgumentException("A mesh should at least contain a Position buffer"); + } IndexBuffer ib = mesh.getIndexBuffer(); + FloatBuffer vb = (FloatBuffer) vBuffer.getData(); + if (ib == null) { ib = new VirtualIndexBuffer(mesh.getVertexCount(), mesh.getMode()); } else if (mesh.getMode() != Mode.Triangles) { diff --git a/jme3-core/src/main/java/com/jme3/light/AmbientLight.java b/jme3-core/src/main/java/com/jme3/light/AmbientLight.java index e147c6590..8dd5f9266 100644 --- a/jme3-core/src/main/java/com/jme3/light/AmbientLight.java +++ b/jme3-core/src/main/java/com/jme3/light/AmbientLight.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2012, 2015 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,7 @@ package com.jme3.light; import com.jme3.bounding.BoundingBox; +import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; import com.jme3.renderer.Camera; import com.jme3.scene.Spatial; @@ -49,6 +50,13 @@ import com.jme3.util.TempVars; */ public class AmbientLight extends Light { + public AmbientLight() { + } + + public AmbientLight(ColorRGBA color) { + super(color); + } + @Override public boolean intersectsBox(BoundingBox box, TempVars vars) { return true; diff --git a/jme3-core/src/main/java/com/jme3/light/DirectionalLight.java b/jme3-core/src/main/java/com/jme3/light/DirectionalLight.java index c4258a67f..87fbf695a 100644 --- a/jme3-core/src/main/java/com/jme3/light/DirectionalLight.java +++ b/jme3-core/src/main/java/com/jme3/light/DirectionalLight.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2012, 2015 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,7 @@ import com.jme3.export.InputCapsule; import com.jme3.export.JmeExporter; import com.jme3.export.JmeImporter; import com.jme3.export.OutputCapsule; +import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; import com.jme3.renderer.Camera; import com.jme3.scene.Spatial; @@ -53,6 +54,30 @@ public class DirectionalLight extends Light { protected Vector3f direction = new Vector3f(0f, -1f, 0f); + /** + * Creates a DirectionalLight + */ + public DirectionalLight() { + } + + /** + * Creates a DirectionalLight with the given direction + * @param direction the light's direction + */ + public DirectionalLight(Vector3f direction) { + setDirection(direction); + } + + /** + * Creates a DirectionalLight with the given direction and the given color + * @param direction the light's direction + * @param color the light's color + */ + public DirectionalLight(Vector3f direction, ColorRGBA color) { + super(color); + setDirection(direction); + } + @Override public void computeLastDistance(Spatial owner) { lastDistance = 0; // directional lights are always closest to their owner @@ -77,7 +102,7 @@ public class DirectionalLight extends Light { * * @param dir the direction of the light. */ - public void setDirection(Vector3f dir){ + public final void setDirection(Vector3f dir){ direction.set(dir); if (!direction.isUnitVector()) { direction.normalizeLocal(); diff --git a/jme3-core/src/main/java/com/jme3/light/Light.java b/jme3-core/src/main/java/com/jme3/light/Light.java index 4217e1b62..b1c48be7a 100644 --- a/jme3-core/src/main/java/com/jme3/light/Light.java +++ b/jme3-core/src/main/java/com/jme3/light/Light.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2012, 2015 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,7 +94,7 @@ public abstract class Light implements Savable, Cloneable { } } - protected ColorRGBA color = new ColorRGBA(1f,1f,1f,1f); + protected ColorRGBA color = new ColorRGBA(ColorRGBA.White); /** * Used in LightList for caching the distance @@ -115,6 +115,13 @@ public abstract class Light implements Savable, Cloneable { boolean frustumCheckNeeded = true; boolean intersectsFrustum = false; + protected Light() { + } + + protected Light(ColorRGBA color) { + setColor(color); + } + /** * Returns the color of the light. * diff --git a/jme3-core/src/main/java/com/jme3/light/PointLight.java b/jme3-core/src/main/java/com/jme3/light/PointLight.java index 55a129275..ff3b3295f 100644 --- a/jme3-core/src/main/java/com/jme3/light/PointLight.java +++ b/jme3-core/src/main/java/com/jme3/light/PointLight.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2012, 2015 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,14 +32,13 @@ package com.jme3.light; import com.jme3.bounding.BoundingBox; -import com.jme3.bounding.BoundingSphere; import com.jme3.bounding.BoundingVolume; import com.jme3.export.InputCapsule; import com.jme3.export.JmeExporter; import com.jme3.export.JmeImporter; import com.jme3.export.OutputCapsule; +import com.jme3.math.ColorRGBA; import com.jme3.math.FastMath; -import com.jme3.math.Plane; import com.jme3.math.Vector3f; import com.jme3.renderer.Camera; import com.jme3.scene.Spatial; @@ -62,6 +61,52 @@ public class PointLight extends Light { protected float radius = 0; protected float invRadius = 0; + /** + * Creates a PointLight + */ + public PointLight() { + } + + /** + * Creates a PointLight at the given position + * @param position the position in world space + */ + public PointLight(Vector3f position) { + setPosition(position); + } + + /** + * Creates a PointLight at the given position and with the given color + * @param position the position in world space + * @param color the light color + */ + public PointLight(Vector3f position, ColorRGBA color) { + super(color); + setPosition(position); + } + + /** + * Creates a PointLight at the given position, with the given color and the + * given radius + * @param position the position in world space + * @param color the light color + * @param radius the light radius + */ + public PointLight(Vector3f position, ColorRGBA color, float radius) { + this(position, color); + setRadius(radius); + } + + /** + * Creates a PointLight at the given position, with the given radius + * @param position the position in world space + * @param radius the light radius + */ + public PointLight(Vector3f position, float radius) { + this(position); + setRadius(radius); + } + @Override public void computeLastDistance(Spatial owner) { if (owner.getWorldBound() != null) { @@ -88,7 +133,7 @@ public class PointLight extends Light { * * @param position the world space position of the light. */ - public void setPosition(Vector3f position) { + public final void setPosition(Vector3f position) { this.position.set(position); } @@ -115,13 +160,13 @@ public class PointLight extends Light { * * @throws IllegalArgumentException If radius is negative */ - public void setRadius(float radius) { + public final void setRadius(float radius) { if (radius < 0) { throw new IllegalArgumentException("Light radius cannot be negative"); } this.radius = radius; - if (radius != 0) { - this.invRadius = 1 / radius; + if (radius != 0f) { + this.invRadius = 1f / radius; } else { this.invRadius = 0; } diff --git a/jme3-core/src/main/java/com/jme3/light/SpotLight.java b/jme3-core/src/main/java/com/jme3/light/SpotLight.java index e6443df7c..9b551d3d8 100644 --- a/jme3-core/src/main/java/com/jme3/light/SpotLight.java +++ b/jme3-core/src/main/java/com/jme3/light/SpotLight.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2012, 2015 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ package com.jme3.light; import com.jme3.bounding.BoundingBox; import com.jme3.bounding.BoundingVolume; import com.jme3.export.*; +import com.jme3.math.ColorRGBA; import com.jme3.math.FastMath; import com.jme3.math.Plane; import com.jme3.math.Vector3f; @@ -44,36 +45,121 @@ import java.io.IOException; /** * Represents a spot light. - * A spot light emmit a cone of light from a position and in a direction. - * It can be used to fake torch lights or car's lights. + * A spot light emits a cone of light from a position and in a direction. + * It can be used to fake torch lights or cars' lights. *

* In addition to a position and a direction, spot lights also have a range which * can be used to attenuate the influence of the light depending on the - * distance between the light and the effected object. + * distance between the light and the affected object. * Also the angle of the cone can be tweaked by changing the spot inner angle and the spot outer angle. - * the spot inner angle determin the cone of light where light has full influence. - * the spot outer angle determin the cone global cone of light of the spot light. - * the light intensity slowly decrease between the inner cone and the outer cone. + * the spot inner angle determines the cone of light where light has full influence. + * the spot outer angle determines the cone global cone of light of the spot light. + * the light intensity slowly decreases between the inner cone and the outer cone. * @author Nehon */ public class SpotLight extends Light { protected Vector3f position = new Vector3f(); - protected Vector3f direction = new Vector3f(0,-1,0); + protected Vector3f direction = new Vector3f(0, -1, 0); protected float spotInnerAngle = FastMath.QUARTER_PI / 8; protected float spotOuterAngle = FastMath.QUARTER_PI / 6; protected float spotRange = 100; protected float invSpotRange = 1f / 100; - protected float packedAngleCos=0; + protected float packedAngleCos = 0; protected float outerAngleCosSqr, outerAngleSinSqr; protected float outerAngleSinRcp, outerAngleSin, outerAngleCos; + /** + * Creates a SpotLight. + */ public SpotLight() { super(); computeAngleParameters(); } + /** + * Creates a SpotLight at the given position and with the given direction. + * @param position the position in world space. + * @param direction the direction of the light. + */ + public SpotLight(Vector3f position, Vector3f direction) { + this(); + setPosition(position); + setDirection(direction); + } + + /** + * Creates a SpotLight at the given position, with the given direction, and the + * given range. + * @param position the position in world space. + * @param direction the direction of the light. + * @param range the spot light range + */ + public SpotLight(Vector3f position, Vector3f direction, float range) { + this(); + setPosition(position); + setDirection(direction); + this.spotRange = range; + } + + /** + * Creates a SpotLight at the given position, with the given direction and + * the given color. + * @param position the position in world space. + * @param direction the direction of the light. + * @param color the light's color. + */ + public SpotLight(Vector3f position, Vector3f direction, ColorRGBA color) { + super(color); + computeAngleParameters(); + setPosition(position); + setDirection(direction); + } + + + /** + * Creates a SpotLight at the given position, with the given direction, + * the given range and the given color. + * @param position the position in world space. + * @param direction the direction of the light. + * @param range the spot light range + * @param color the light's color. + */ + public SpotLight(Vector3f position, Vector3f direction, float range, ColorRGBA color) { + super(color); + computeAngleParameters(); + setPosition(position); + setDirection(direction); + this.spotRange = range; + } + + /** + * Creates a SpotLight at the given position, with the given direction, + * the given color and the given inner and outer angles + * (controls the falloff of the light) + * + * @param position the position in world space. + * @param direction the direction of the light. + * @param range the spot light range + * @param color the light's color. + * @param innerAngle the inner angle of the spot light. + * @param outerAngle the outer angle of the spot light. + * + * @see SpotLight#setSpotInnerAngle(float) + * @see SpotLight#setSpotOuterAngle(float) + */ + public SpotLight(Vector3f position, Vector3f direction, float range, ColorRGBA color, float innerAngle, float outerAngle) { + super(color); + this.spotInnerAngle = innerAngle; + this.spotOuterAngle = outerAngle; + computeAngleParameters(); + setPosition(position); + setDirection(direction); + this.spotRange = range; + } + + private void computeAngleParameters() { float innerCos = FastMath.cos(spotInnerAngle); outerAngleCos = FastMath.cos(spotOuterAngle); @@ -189,7 +275,7 @@ public class SpotLight extends Light { return direction; } - public void setDirection(Vector3f direction) { + public final void setDirection(Vector3f direction) { this.direction.set(direction); } @@ -197,7 +283,7 @@ public class SpotLight extends Light { return position; } - public void setPosition(Vector3f position) { + public final void setPosition(Vector3f position) { this.position.set(position); } diff --git a/jme3-core/src/main/java/com/jme3/math/Matrix4f.java b/jme3-core/src/main/java/com/jme3/math/Matrix4f.java index c8dd3ef4a..159e39932 100644 --- a/jme3-core/src/main/java/com/jme3/math/Matrix4f.java +++ b/jme3-core/src/main/java/com/jme3/math/Matrix4f.java @@ -154,53 +154,34 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable } public void fromFrame(Vector3f location, Vector3f direction, Vector3f up, Vector3f left) { - loadIdentity(); - TempVars vars = TempVars.get(); - - Vector3f f = vars.vect1.set(direction); - Vector3f s = vars.vect2.set(f).crossLocal(up); - Vector3f u = vars.vect3.set(s).crossLocal(f); -// s.normalizeLocal(); -// u.normalizeLocal(); - - m00 = s.x; - m01 = s.y; - m02 = s.z; - - m10 = u.x; - m11 = u.y; - m12 = u.z; - - m20 = -f.x; - m21 = -f.y; - m22 = -f.z; - -// m00 = -left.x; -// m10 = -left.y; -// m20 = -left.z; -// -// m01 = up.x; -// m11 = up.y; -// m21 = up.z; -// -// m02 = -direction.x; -// m12 = -direction.y; -// m22 = -direction.z; -// - - Matrix4f transMatrix = vars.tempMat4; - transMatrix.loadIdentity(); - transMatrix.m03 = -location.x; - transMatrix.m13 = -location.y; - transMatrix.m23 = -location.z; - this.multLocal(transMatrix); - - vars.release(); - -// transMatrix.multLocal(this); - -// set(transMatrix); + try { + Vector3f fwdVector = vars.vect1.set(direction); + Vector3f leftVector = vars.vect2.set(fwdVector).crossLocal(up); + Vector3f upVector = vars.vect3.set(leftVector).crossLocal(fwdVector); + + m00 = leftVector.x; + m01 = leftVector.y; + m02 = leftVector.z; + m03 = -leftVector.dot(location); + + m10 = upVector.x; + m11 = upVector.y; + m12 = upVector.z; + m13 = -upVector.dot(location); + + m20 = -fwdVector.x; + m21 = -fwdVector.y; + m22 = -fwdVector.z; + m23 = fwdVector.dot(location); + + m30 = 0f; + m31 = 0f; + m32 = 0f; + m33 = 1f; + } finally { + vars.release(); + } } /** diff --git a/jme3-core/src/main/java/com/jme3/math/Transform.java b/jme3-core/src/main/java/com/jme3/math/Transform.java index ac7a324d0..9d8a72a1e 100644 --- a/jme3-core/src/main/java/com/jme3/math/Transform.java +++ b/jme3-core/src/main/java/com/jme3/math/Transform.java @@ -49,7 +49,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable private Quaternion rot = new Quaternion(); private Vector3f translation = new Vector3f(); - private Vector3f scale = new Vector3f(1,1,1); + private Vector3f scale = new Vector3f(1, 1, 1); public Transform(Vector3f translation, Quaternion rot){ this.translation.set(translation); @@ -283,9 +283,32 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable * Loads the identity. Equal to translation=0,0,0 scale=1,1,1 rot=0,0,0,1. */ public void loadIdentity() { - translation.set(0,0,0); - scale.set(1,1,1); - rot.set(0,0,0,1); + translation.set(0, 0, 0); + scale.set(1, 1, 1); + rot.set(0, 0, 0, 1); + } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + rot.hashCode(); + hash = 89 * hash + translation.hashCode(); + hash = 89 * hash + scale.hashCode(); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Transform other = (Transform) obj; + return this.translation.equals(other.translation) + && this.scale.equals(other.scale) + && this.rot.equals(other.rot); } @Override @@ -307,22 +330,21 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable return this; } + @Override public void write(JmeExporter e) throws IOException { OutputCapsule capsule = e.getCapsule(this); - capsule.write(rot, "rot", new Quaternion()); + capsule.write(rot, "rot", Quaternion.IDENTITY); capsule.write(translation, "translation", Vector3f.ZERO); capsule.write(scale, "scale", Vector3f.UNIT_XYZ); } + @Override public void read(JmeImporter e) throws IOException { InputCapsule capsule = e.getCapsule(this); - rot = (Quaternion)capsule.readSavable("rot", new Quaternion()); - translation = (Vector3f)capsule.readSavable("translation", null); - if( translation == null ) { - translation = new Vector3f(); - } - scale = (Vector3f)capsule.readSavable("scale", Vector3f.UNIT_XYZ); + rot.set((Quaternion)capsule.readSavable("rot", Quaternion.IDENTITY)); + translation.set((Vector3f)capsule.readSavable("translation", Vector3f.ZERO)); + scale.set((Vector3f)capsule.readSavable("scale", Vector3f.UNIT_XYZ)); } @Override diff --git a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java index 2cd8b83f8..b28aecece 100644 --- a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java +++ b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java @@ -300,7 +300,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { public void postFrame(FrameBuffer out) { FrameBuffer sceneBuffer = renderFrameBuffer; - if (renderFrameBufferMS != null && !renderer.getCaps().contains(Caps.OpenGL31)) { + if (renderFrameBufferMS != null && !renderer.getCaps().contains(Caps.OpenGL32)) { renderer.copyFrameBuffer(renderFrameBufferMS, renderFrameBuffer, true); } else if (renderFrameBufferMS != null) { sceneBuffer = renderFrameBufferMS; @@ -443,7 +443,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { //antialiasing on filters only supported in opengl 3 due to depth read problem if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)) { renderFrameBufferMS = new FrameBuffer(width, height, numSamples); - if (caps.contains(Caps.OpenGL31)) { + if (caps.contains(Caps.OpenGL32)) { Texture2D msColor = new Texture2D(width, height, numSamples, fbFormat); Texture2D msDepth = new Texture2D(width, height, numSamples, Format.Depth); renderFrameBufferMS.setDepthTexture(msDepth); @@ -456,7 +456,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { } } - if (numSamples <= 1 || !caps.contains(Caps.OpenGL31)) { + if (numSamples <= 1 || !caps.contains(Caps.OpenGL32)) { renderFrameBuffer = new FrameBuffer(width, height, 1); renderFrameBuffer.setDepthBuffer(Format.Depth); filterTexture = new Texture2D(width, height, fbFormat); diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java index 4a9380cf4..1b9c3f94d 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java @@ -161,6 +161,7 @@ public interface GL { public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; + public static final int GL_TEXTURE_BASE_LEVEL = 0x813C; public static final int GL_TEXTURE_MAG_FILTER = 0x2800; public static final int GL_TEXTURE_MAX_LEVEL = 0x813D; public static final int GL_TEXTURE_MIN_FILTER = 0x2801; diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 729f4e203..dd30da089 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -376,7 +376,9 @@ public class GLRenderer implements Renderer { caps.add(Caps.TextureFilterAnisotropic); } - if (hasExtension("GL_EXT_framebuffer_object") || gl3 != null) { + if (hasExtension("GL_EXT_framebuffer_object") + || gl3 != null + || caps.contains(Caps.OpenGLES20)) { caps.add(Caps.FrameBuffer); limits.put(Limits.RenderBufferSize, getInteger(GLFbo.GL_MAX_RENDERBUFFER_SIZE_EXT)); @@ -401,7 +403,7 @@ public class GLRenderer implements Renderer { } } - if (hasExtension("GL_ARB_draw_buffers")) { + if (hasExtension("GL_ARB_draw_buffers") || gl3 != null) { limits.put(Limits.FrameBufferMrtAttachments, getInteger(GLExt.GL_MAX_DRAW_BUFFERS_ARB)); if (limits.get(Limits.FrameBufferMrtAttachments) > 1) { caps.add(Caps.FrameBufferMRT); @@ -1064,6 +1066,9 @@ public class GLRenderer implements Renderer { stringBuf.append("\n"); } else { if (gles2) { + // request GLSL ES (1.00) when compiling under GLES2. + stringBuf.append("#version 100\n"); + if (source.getType() == ShaderType.Fragment) { // GLES2 requires precision qualifier. stringBuf.append("precision mediump float;\n"); @@ -1080,6 +1085,7 @@ public class GLRenderer implements Renderer { if (linearizeSrgbImages) { stringBuf.append("#define SRGB 1\n"); } + stringBuf.append("#define ").append(source.getType().name().toUpperCase()).append("_SHADER 1\n"); stringBuf.append(source.getDefines()); stringBuf.append(source.getSource()); diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java index a2f21ceaa..fb6032393 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java @@ -90,9 +90,11 @@ final class TextureUtil { } public GLImageFormat getImageFormatWithError(Format fmt, boolean isSrgb) { + //if the passed format is one kind of depth there isno point in getting the srgb format; + isSrgb = isSrgb && fmt != Format.Depth && fmt != Format.Depth16 && fmt != Format.Depth24 && fmt != Format.Depth24Stencil8 && fmt != Format.Depth32 && fmt != Format.Depth32F; GLImageFormat glFmt = getImageFormat(fmt, isSrgb); if (glFmt == null && isSrgb) { - glFmt = getImageFormat(fmt, false); + glFmt = getImageFormat(fmt, false); logger.log(Level.WARNING, "No sRGB format available for ''{0}''. Failling back to linear.", fmt); } if (glFmt == null) { diff --git a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java index 9a920093d..c3a0ab4bb 100644 --- a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java @@ -444,6 +444,7 @@ public class BatchNode extends GeometryGroupNode { int maxWeights = -1; Mesh.Mode mode = null; + float lineWidth = 1f; for (Geometry geom : geometries) { totalVerts += geom.getVertexCount(); totalTris += geom.getTriangleCount(); @@ -452,6 +453,7 @@ public class BatchNode extends GeometryGroupNode { maxVertCount = geom.getVertexCount(); } Mesh.Mode listMode; + float listLineWidth = 1f; int components; switch (geom.getMesh().getMode()) { case Points: @@ -462,6 +464,7 @@ public class BatchNode extends GeometryGroupNode { case LineStrip: case Lines: listMode = Mesh.Mode.Lines; + listLineWidth = geom.getMesh().getLineWidth(); components = 2; break; case TriangleFan: @@ -491,13 +494,21 @@ public class BatchNode extends GeometryGroupNode { if (mode != null && mode != listMode) { throw new UnsupportedOperationException("Cannot combine different" + " primitive types: " + mode + " != " + listMode); - } + } mode = listMode; + if (mode == Mesh.Mode.Lines) { + if (lineWidth != 1f && listLineWidth != lineWidth) { + throw new UnsupportedOperationException("When using Mesh Line mode, cannot combine meshes with different line width " + + lineWidth + " != " + listLineWidth); + } + lineWidth = listLineWidth; + } compsForBuf[VertexBuffer.Type.Index.ordinal()] = components; } outMesh.setMaxNumWeights(maxWeights); outMesh.setMode(mode); + outMesh.setLineWidth(lineWidth); if (totalVerts >= 65536) { // make sure we create an UnsignedInt buffer so // we can fit all of the meshes diff --git a/jme3-core/src/main/java/com/jme3/system/AppSettings.java b/jme3-core/src/main/java/com/jme3/system/AppSettings.java index 73b036f2f..484458929 100644 --- a/jme3-core/src/main/java/com/jme3/system/AppSettings.java +++ b/jme3-core/src/main/java/com/jme3/system/AppSettings.java @@ -54,6 +54,8 @@ import java.util.prefs.Preferences; */ public final class AppSettings extends HashMap { + private static final long serialVersionUID = 1L; + private static final AppSettings defaults = new AppSettings(false); /** diff --git a/jme3-core/src/main/java/com/jme3/system/JmeVersion.java b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java new file mode 100644 index 000000000..0492df950 --- /dev/null +++ b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2009-2015 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.system; + +import java.io.IOException; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Pulls in version info from the version.properties file. + * + * @author Kirill Vainer + */ +public class JmeVersion { + + private static final Logger logger = Logger.getLogger(JmeVersion.class.getName()); + private static final Properties props = new Properties(); + + static { + try { + props.load(JmeVersion.class.getResourceAsStream("version.properties")); + } catch (IOException ex) { + logger.log(Level.WARNING, "Unable to read version info!", ex); + } + } + + public static final String BUILD_DATE = props.getProperty("build.date", "1900-01-01"); + public static final String BRANCH_NAME = props.getProperty("git.branch", "unknown"); + public static final String GIT_HASH = props.getProperty("git.hash", ""); + public static final String GIT_SHORT_HASH = props.getProperty("git.hash.short", ""); + public static final String GIT_TAG = props.getProperty("git.tag", ""); + public static final String VERSION_NUMBER = props.getProperty("version.number", ""); + public static final String VERSION_TAG = props.getProperty("version.tag", ""); + public static final String VERSION_FULL = props.getProperty("version.full", ""); + public static final String FULL_NAME = props.getProperty("name.full", "jMonkeyEngine (unknown version)"); +} diff --git a/jme3-core/src/main/java/com/jme3/util/BufferUtils.java b/jme3-core/src/main/java/com/jme3/util/BufferUtils.java index 84c6f6743..6fc0c50f0 100644 --- a/jme3-core/src/main/java/com/jme3/util/BufferUtils.java +++ b/jme3-core/src/main/java/com/jme3/util/BufferUtils.java @@ -36,6 +36,7 @@ import com.jme3.math.Quaternion; import com.jme3.math.Vector2f; import com.jme3.math.Vector3f; import com.jme3.math.Vector4f; +import java.io.UnsupportedEncodingException; import java.lang.ref.PhantomReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; @@ -1010,11 +1011,15 @@ public final class BufferUtils { } public static ByteBuffer createByteBuffer(String data) { - byte[] bytes = data.getBytes(); - ByteBuffer bb = createByteBuffer(bytes.length); - bb.put(bytes); - bb.flip(); - return bb; + try { + byte[] bytes = data.getBytes("UTF-8"); + ByteBuffer bb = createByteBuffer(bytes.length); + bb.put(bytes); + bb.flip(); + return bb; + } catch (UnsupportedEncodingException ex) { + throw new UnsupportedOperationException(ex); + } } /** diff --git a/jme3-core/src/main/java/com/jme3/util/LittleEndien.java b/jme3-core/src/main/java/com/jme3/util/LittleEndien.java index 092f77018..6b15a7d45 100644 --- a/jme3-core/src/main/java/com/jme3/util/LittleEndien.java +++ b/jme3-core/src/main/java/com/jme3/util/LittleEndien.java @@ -42,7 +42,6 @@ import java.io.*; public class LittleEndien extends InputStream implements DataInput { protected BufferedInputStream in; - protected BufferedReader inRead; /** * Creates a new LittleEndien reader from the given input stream. The @@ -51,7 +50,6 @@ public class LittleEndien extends InputStream implements DataInput { */ public LittleEndien(InputStream in) { this.in = new BufferedInputStream(in); - inRead = new BufferedReader(new InputStreamReader(in)); } public int read() throws IOException { @@ -141,7 +139,7 @@ public class LittleEndien extends InputStream implements DataInput { } public String readLine() throws IOException { - return inRead.readLine(); + throw new IOException("Unsupported operation"); } public String readUTF() throws IOException { diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/ColoredTextured.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/ColoredTextured.j3md index 6b74c3074..497b7d0a7 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/ColoredTextured.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/ColoredTextured.j3md @@ -1,3 +1,4 @@ +Exception This material definition is deprecated. Please use Unshaded.j3md instead. MaterialDef Colored Textured { MaterialParameters { @@ -17,4 +18,4 @@ MaterialDef Colored Textured { Technique { } -} \ No newline at end of file +} diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.frag b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.frag index ce8219b6e..e615d8f1e 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.frag @@ -1,3 +1,5 @@ +#import "Common/ShaderLib/GLSLCompat.glsllib" + #if defined(HAS_GLOWMAP) || defined(HAS_COLORMAP) || (defined(HAS_LIGHTMAP) && !defined(SEPARATE_TEXCOORD)) #define NEED_TEXCOORD1 #endif diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md index aee284705..8dd6fc5ca 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md @@ -13,7 +13,7 @@ MaterialDef Unshaded { Color GlowColor // For instancing - Boolean UseInstancing + Boolean UseInstancing // For hardware skinning Int NumberOfBones @@ -54,8 +54,8 @@ MaterialDef Unshaded { } Technique { - VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert - FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag + VertexShader GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL150: Common/MatDefs/Misc/Unshaded.frag WorldParameters { WorldViewProjectionMatrix @@ -76,6 +76,25 @@ MaterialDef Unshaded { } Technique { + VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + INSTANCING : UseInstancing + SEPARATE_TEXCOORD : SeparateTexCoord + HAS_COLORMAP : ColorMap + HAS_LIGHTMAP : LightMap + HAS_VERTEXCOLOR : VertexColor + HAS_COLOR : Color + NUM_BONES : NumberOfBones + DISCARD_ALPHA : AlphaDiscardThreshold + } } Technique PreNormalPass { diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert index 63b05ef88..ba7899ca5 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert @@ -1,3 +1,4 @@ +#import "Common/ShaderLib/GLSLCompat.glsllib" #import "Common/ShaderLib/Skinning.glsllib" #import "Common/ShaderLib/Instancing.glsllib" diff --git a/jme3-core/src/main/resources/Common/ShaderLib/GLSL150Compat.glsllib b/jme3-core/src/main/resources/Common/ShaderLib/GLSL150Compat.glsllib deleted file mode 100644 index 336490696..000000000 --- a/jme3-core/src/main/resources/Common/ShaderLib/GLSL150Compat.glsllib +++ /dev/null @@ -1,14 +0,0 @@ -#if _VERSION_ >= 150 -out vec4 outFragColor; -# define texture1D texture -# define texture2D texture -# define texture3D texture -# define texture2DLod texture -# if defined VERTEX_SHADER -# define varying out -# define attribute in -# elif defined FRAGMENT_SHADER -# define varying in -# define gl_FragColor outFragColor -# endif -#endif \ No newline at end of file diff --git a/jme3-core/src/main/resources/Common/ShaderLib/GLSLCompat.glsllib b/jme3-core/src/main/resources/Common/ShaderLib/GLSLCompat.glsllib new file mode 100644 index 000000000..3a3173997 --- /dev/null +++ b/jme3-core/src/main/resources/Common/ShaderLib/GLSLCompat.glsllib @@ -0,0 +1,34 @@ +#if defined _GL_ES_ +# define hfloat highp float +# define hvec2 highp vec2 +# define hvec3 highp vec3 +# define hvec4 highp vec4 +# define lfloat lowp float +# define lvec2 lowp vec2 +# define lvec3 lowp vec3 +# define lvec4 lowp vec4 +#else +# define hfloat float +# define hvec2 vec2 +# define hvec3 vec3 +# define hvec4 vec4 +# define lfloat float +# define lvec2 vec2 +# define lvec3 vec3 +# define lvec4 vec4 +#endif + +#if __VERSION__ >= 130 +out vec4 outFragColor; +# define texture1D texture +# define texture2D texture +# define texture3D texture +# define texture2DLod texture +# if defined VERTEX_SHADER +# define varying out +# define attribute in +# elif defined FRAGMENT_SHADER +# define varying in +# define gl_FragColor outFragColor +# endif +#endif \ No newline at end of file diff --git a/jme3-core/src/main/resources/com/jme3/system/version.properties b/jme3-core/src/main/resources/com/jme3/system/version.properties new file mode 100644 index 000000000..98168a14e --- /dev/null +++ b/jme3-core/src/main/resources/com/jme3/system/version.properties @@ -0,0 +1,11 @@ +# THIS IS AN AUTO-GENERATED FILE.. +# DO NOT MODIFY! +build.date=1900-01-01 +git.revision=0 +git.branch=unknown +git.hash= +git.hash.short= +git.tag= +name.full=jMonkeyEngine 3.1.0-UNKNOWN +version.number=3.1.0 +version.tag=SNAPSHOT \ No newline at end of file diff --git a/jme3-core/src/test/java/com/jme3/cinematic/CinematicTest.java b/jme3-core/src/test/java/com/jme3/cinematic/CinematicTest.java new file mode 100644 index 000000000..400dbaa9f --- /dev/null +++ b/jme3-core/src/test/java/com/jme3/cinematic/CinematicTest.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2009-2015 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.cinematic; + +import com.jme3.animation.AnimControl; +import com.jme3.animation.Animation; +import com.jme3.cinematic.events.AnimationEvent; +import com.jme3.scene.Node; +import org.junit.Test; + +/** + * + * @author davidB + */ +public class CinematicTest { + + /** + * No NPE or any exception when clear() a new Cinematic + */ + @Test + public void clearEmpty() { + Cinematic sut = new Cinematic(); + sut.clear(); + } + + /** + * No ClassCastException when clear() a Cinematic with AnimationEvent + */ + @Test + public void clearAnimationEvent() { + Cinematic sut = new Cinematic(); + Node model = new Node("model"); + AnimControl ac = new AnimControl(); + ac.addAnim(new Animation("animName", 1.0f)); + model.addControl(ac); + sut.enqueueCinematicEvent(new AnimationEvent(model, "animName")); + sut.initialize(null, null); + sut.clear(); + } +} diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle index de1c3931c..09e71997e 100644 --- a/jme3-examples/build.gradle +++ b/jme3-examples/build.gradle @@ -21,7 +21,7 @@ dependencies { // compile project(':jme3-bullet-native') compile project(':jme3-jbullet') compile project(':jme3-jogg') -// compile project(':jme3-jogl') + compile project(':jme3-jogl') compile project(':jme3-lwjgl') compile project(':jme3-networking') compile project(':jme3-niftygui') @@ -51,7 +51,9 @@ jar.doFirst{ } } -task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar']) << { +task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar', \ + ':jme3-android-native:jar', ':jme3-bullet-native-android:jar', \ + ':jme3-bullet-native:jar']) << { // Copy all dependencies to ../dist/lib, remove versions from jar files configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact -> copy { @@ -97,23 +99,23 @@ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-and copy { from project(':jme3-bullet-native').jar.archivePath into '../dist/opt/native-bullet' - rename {"jme3-bullet-natives.jar"} + rename {project(':jme3-bullet-native').name+".jar"} } // Copy android packages, remove version copy { from project(':jme3-android').jar.archivePath into '../dist/opt/android' - rename { project(':jme3-android').name + ".jar" } + rename {project(':jme3-android').name+".jar"} } copy { from project(':jme3-android-native').jar.archivePath into '../dist/opt/android' - rename { project(':jme3-android-native').name + ".jar" } + rename {project(':jme3-android-native').name+".jar"} } copy { from project(':jme3-bullet-native-android').jar.archivePath into '../dist/opt/native-bullet' - rename {"jme3-bullet-native-android.jar"} + rename {project(':jme3-bullet-native-android').name+".jar"} } } diff --git a/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java new file mode 100644 index 000000000..6f335e960 --- /dev/null +++ b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java @@ -0,0 +1,594 @@ +package com.jme3.renderer.jogl; + +import com.jme3.renderer.RendererException; +import com.jme3.renderer.opengl.GL; +import com.jme3.renderer.opengl.GL2; +import com.jme3.renderer.opengl.GL3; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.ShortBuffer; + +import com.jme3.renderer.opengl.GL4; +import com.jogamp.opengl.GLContext; + +public class JoglGL implements GL, GL2, GL3, GL4 { + + private static int getLimitBytes(ByteBuffer buffer) { + checkLimit(buffer); + return buffer.limit(); + } + + private static int getLimitBytes(ShortBuffer buffer) { + checkLimit(buffer); + return buffer.limit() * 2; + } + + private static int getLimitBytes(FloatBuffer buffer) { + checkLimit(buffer); + return buffer.limit() * 4; + } + + private static int getLimitCount(Buffer buffer, int elementSize) { + checkLimit(buffer); + return buffer.limit() / elementSize; + } + + private static void checkLimit(Buffer buffer) { + if (buffer == null) { + return; + } + if (buffer.limit() == 0) { + throw new RendererException("Attempting to upload empty buffer (limit = 0), that's an error"); + } + if (buffer.remaining() == 0) { + throw new RendererException("Attempting to upload empty buffer (remaining = 0), that's an error"); + } + } + + @Override + public void resetStats() { + } + + @Override + public void glActiveTexture(int param1) { + GLContext.getCurrentGL().glActiveTexture(param1); + } + + @Override + public void glAlphaFunc(int param1, float param2) { + GLContext.getCurrentGL().getGL2ES1().glAlphaFunc(param1, param2); + } + + @Override + public void glAttachShader(int param1, int param2) { + GLContext.getCurrentGL().getGL2ES2().glAttachShader(param1, param2); + } + + @Override + public void glBindBuffer(int param1, int param2) { + GLContext.getCurrentGL().glBindBuffer(param1, param2); + } + + @Override + public void glBindTexture(int param1, int param2) { + GLContext.getCurrentGL().glBindTexture(param1, param2); + } + + @Override + public void glBlendFunc(int param1, int param2) { + GLContext.getCurrentGL().glBlendFunc(param1, param2); + } + + @Override + public void glBufferData(int param1, long param2, int param3) { + GLContext.getCurrentGL().glBufferData(param1, param2, null, param3); + } + + @Override + public void glBufferData(int param1, FloatBuffer param2, int param3) { + checkLimit(param2); + GLContext.getCurrentGL().glBufferData(param1, getLimitBytes(param2), param2, param3); + } + + @Override + public void glBufferData(int param1, ShortBuffer param2, int param3) { + checkLimit(param2); + GLContext.getCurrentGL().glBufferData(param1, getLimitBytes(param2), param2, param3); + } + + @Override + public void glBufferData(int param1, ByteBuffer param2, int param3) { + checkLimit(param2); + GLContext.getCurrentGL().glBufferData(param1, getLimitBytes(param2), param2, param3); + } + + @Override + public void glBufferSubData(int param1, long param2, FloatBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().glBufferSubData(param1, param2, getLimitBytes(param3), param3); + } + + @Override + public void glBufferSubData(int param1, long param2, ShortBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().glBufferSubData(param1, param2, getLimitBytes(param3), param3); + } + + @Override + public void glBufferSubData(int param1, long param2, ByteBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().glBufferSubData(param1, param2, getLimitBytes(param3), param3); + } + + @Override + public void glClear(int param1) { + GLContext.getCurrentGL().glClear(param1); + } + + @Override + public void glClearColor(float param1, float param2, float param3, float param4) { + GLContext.getCurrentGL().glClearColor(param1, param2, param3, param4); + } + + @Override + public void glColorMask(boolean param1, boolean param2, boolean param3, boolean param4) { + GLContext.getCurrentGL().glColorMask(param1, param2, param3, param4); + } + + @Override + public void glCompileShader(int param1) { + GLContext.getCurrentGL().getGL2ES2().glCompileShader(param1); + } + + @Override + public void glCompressedTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) { + checkLimit(param7); + GLContext.getCurrentGL().glCompressedTexImage2D(param1, param2, param3, param4, param5, param6, getLimitBytes(param7), param7); + } + + @Override + public void glCompressedTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, ByteBuffer param8) { + checkLimit(param8); + GLContext.getCurrentGL().getGL2ES2().glCompressedTexImage3D(param1, param2, param3, param4, param5, param6, param7, getLimitBytes(param8), param8); + } + + @Override + public void glCompressedTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, ByteBuffer param8) { + checkLimit(param8); + GLContext.getCurrentGL().glCompressedTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, getLimitBytes(param8), param8); + } + + @Override + public void glCompressedTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, ByteBuffer param10) { + checkLimit(param10); + GLContext.getCurrentGL().getGL2ES2().glCompressedTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, getLimitBytes(param10), param10); + } + + @Override + public int glCreateProgram() { + return GLContext.getCurrentGL().getGL2ES2().glCreateProgram(); + } + + @Override + public int glCreateShader(int param1) { + return GLContext.getCurrentGL().getGL2ES2().glCreateShader(param1); + } + + @Override + public void glCullFace(int param1) { + GLContext.getCurrentGL().glCullFace(param1); + } + + @Override + public void glDeleteBuffers(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glDeleteBuffers(param1.limit(), param1); + } + + @Override + public void glDeleteProgram(int param1) { + GLContext.getCurrentGL().getGL2ES2().glDeleteProgram(param1); + } + + @Override + public void glDeleteShader(int param1) { + GLContext.getCurrentGL().getGL2ES2().glDeleteShader(param1); + } + + @Override + public void glDeleteTextures(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glDeleteTextures(param1.limit() ,param1); + } + + @Override + public void glDepthFunc(int param1) { + GLContext.getCurrentGL().glDepthFunc(param1); + } + + @Override + public void glDepthMask(boolean param1) { + GLContext.getCurrentGL().glDepthMask(param1); + } + + @Override + public void glDepthRange(double param1, double param2) { + GLContext.getCurrentGL().glDepthRange(param1, param2); + } + + @Override + public void glDetachShader(int param1, int param2) { + GLContext.getCurrentGL().getGL2ES2().glDetachShader(param1, param2); + } + + @Override + public void glDisable(int param1) { + GLContext.getCurrentGL().glDisable(param1); + } + + @Override + public void glDisableVertexAttribArray(int param1) { + GLContext.getCurrentGL().getGL2ES2().glDisableVertexAttribArray(param1); + } + + @Override + public void glDrawArrays(int param1, int param2, int param3) { + GLContext.getCurrentGL().glDrawArrays(param1, param2, param3); + } + + @Override + public void glDrawBuffer(int param1) { + GLContext.getCurrentGL().getGL2GL3().glDrawBuffer(param1); + } + + @Override + public void glDrawRangeElements(int param1, int param2, int param3, int param4, int param5, long param6) { + GLContext.getCurrentGL().getGL2ES3().glDrawRangeElements(param1, param2, param3, param4, param5, param6); + } + + @Override + public void glEnable(int param1) { + GLContext.getCurrentGL().glEnable(param1); + } + + @Override + public void glEnableVertexAttribArray(int param1) { + GLContext.getCurrentGL().getGL2ES2().glEnableVertexAttribArray(param1); + } + + @Override + public void glGenBuffers(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glGenBuffers(param1.limit(), param1); + } + + @Override + public void glGenTextures(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glGenTextures(param1.limit(), param1); + } + + @Override + public void glGetBoolean(int param1, ByteBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().glGetBooleanv(param1, param2); + } + + @Override + public void glGetBufferSubData(int target, long offset, ByteBuffer data) { + checkLimit(data); + GLContext.getCurrentGL().getGL2GL3().glGetBufferSubData(target, offset, getLimitBytes(data), data); + } + + @Override + public int glGetError() { + return GLContext.getCurrentGL().glGetError(); + } + + @Override + public void glGetInteger(int param1, IntBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().glGetIntegerv(param1, param2); + } + + @Override + public void glGetProgram(int param1, int param2, IntBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().getGL2ES2().glGetProgramiv(param1, param2, param3); + } + + @Override + public void glGetShader(int param1, int param2, IntBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().getGL2ES2().glGetShaderiv(param1, param2, param3); + } + + @Override + public String glGetString(int param1) { + return GLContext.getCurrentGL().glGetString(param1); + } + + @Override + public String glGetString(int param1, int param2) { + return GLContext.getCurrentGL().getGL2ES3().glGetStringi(param1, param2); + } + + @Override + public boolean glIsEnabled(int param1) { + return GLContext.getCurrentGL().glIsEnabled(param1); + } + + @Override + public void glLineWidth(float param1) { + GLContext.getCurrentGL().glLineWidth(param1); + } + + @Override + public void glLinkProgram(int param1) { + GLContext.getCurrentGL().getGL2ES2().glLinkProgram(param1); + } + + @Override + public void glPixelStorei(int param1, int param2) { + GLContext.getCurrentGL().glPixelStorei(param1, param2); + } + + @Override + public void glPointSize(float param1) { + GLContext.getCurrentGL().getGL2ES1().glPointSize(param1); + } + + @Override + public void glPolygonMode(int param1, int param2) { + GLContext.getCurrentGL().getGL2().glPolygonMode(param1, param2); + } + + @Override + public void glPolygonOffset(float param1, float param2) { + GLContext.getCurrentGL().glPolygonOffset(param1, param2); + } + + @Override + public void glReadBuffer(int param1) { + GLContext.getCurrentGL().getGL2ES3().glReadBuffer(param1); + } + + @Override + public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) { + checkLimit(param7); + GLContext.getCurrentGL().glReadPixels(param1, param2, param3, param4, param5, param6, param7); + } + + @Override + public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, long param7) { + GLContext.getCurrentGL().glReadPixels(param1, param2, param3, param4, param5, param6, param7); + } + + @Override + public void glScissor(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().glScissor(param1, param2, param3, param4); + } + + @Override + public void glStencilFuncSeparate(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().getGL2ES2().glStencilFuncSeparate(param1, param2, param3, param4); + } + + @Override + public void glStencilOpSeparate(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().getGL2ES2().glStencilOpSeparate(param1, param2, param3, param4); + } + + @Override + public void glTexImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ByteBuffer param9) { + checkLimit(param9); + GLContext.getCurrentGL().glTexImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9); + } + + @Override + public void glTexImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, ByteBuffer param10) { + checkLimit(param10); + GLContext.getCurrentGL().getGL2ES2().glTexImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); + } + + @Override + public void glTexParameterf(int param1, int param2, float param3) { + GLContext.getCurrentGL().glTexParameterf(param1, param2, param3); + } + + @Override + public void glTexParameteri(int param1, int param2, int param3) { + GLContext.getCurrentGL().glTexParameteri(param1, param2, param3); + } + + @Override + public void glTexSubImage2D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, ByteBuffer param9) { + checkLimit(param9); + GLContext.getCurrentGL().glTexSubImage2D(param1, param2, param3, param4, param5, param6, param7, param8, param9); + } + + @Override + public void glTexSubImage3D(int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, ByteBuffer param11) { + checkLimit(param11); + GLContext.getCurrentGL().getGL2ES2().glTexSubImage3D(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); + } + + @Override + public void glUniform1(int param1, FloatBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform1fv(param1, getLimitCount(param2, 1), param2); + } + + @Override + public void glUniform1(int param1, IntBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform1iv(param1, getLimitCount(param2, 1), param2); + } + + @Override + public void glUniform1f(int param1, float param2) { + GLContext.getCurrentGL().getGL2ES2().glUniform1f(param1, param2); + } + + @Override + public void glUniform1i(int param1, int param2) { + GLContext.getCurrentGL().getGL2ES2().glUniform1i(param1, param2); + } + + @Override + public void glUniform2(int param1, IntBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform2iv(param1, getLimitCount(param2, 2), param2); + } + + @Override + public void glUniform2(int param1, FloatBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform2fv(param1, getLimitCount(param2, 2), param2); + } + + @Override + public void glUniform2f(int param1, float param2, float param3) { + GLContext.getCurrentGL().getGL2ES2().glUniform2f(param1, param2, param3); + } + + @Override + public void glUniform3(int param1, IntBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform3iv(param1, getLimitCount(param2, 3), param2); + } + + @Override + public void glUniform3(int param1, FloatBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform3fv(param1, getLimitCount(param2, 3), param2); + } + + @Override + public void glUniform3f(int param1, float param2, float param3, float param4) { + GLContext.getCurrentGL().getGL2ES2().glUniform3f(param1, param2, param3, param4); + } + + @Override + public void glUniform4(int param1, FloatBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform4fv(param1, getLimitCount(param2, 4), param2); + } + + @Override + public void glUniform4(int param1, IntBuffer param2) { + checkLimit(param2); + GLContext.getCurrentGL().getGL2ES2().glUniform4iv(param1, getLimitCount(param2, 4), param2); + } + + @Override + public void glUniform4f(int param1, float param2, float param3, float param4, float param5) { + GLContext.getCurrentGL().getGL2ES2().glUniform4f(param1, param2, param3, param4, param5); + } + + @Override + public void glUniformMatrix3(int param1, boolean param2, FloatBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().getGL2ES2().glUniformMatrix3fv(param1, getLimitCount(param3, 3 * 3), param2, param3); + } + + @Override + public void glUniformMatrix4(int param1, boolean param2, FloatBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().getGL2ES2().glUniformMatrix4fv(param1, getLimitCount(param3, 4 * 4), param2, param3); + } + + @Override + public void glUseProgram(int param1) { + GLContext.getCurrentGL().getGL2ES2().glUseProgram(param1); + } + + @Override + public void glVertexAttribPointer(int param1, int param2, int param3, boolean param4, int param5, long param6) { + GLContext.getCurrentGL().getGL2ES2().glVertexAttribPointer(param1, param2, param3, param4, param5, param6); + } + + @Override + public void glViewport(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().glViewport(param1, param2, param3, param4); + } + + @Override + public int glGetAttribLocation(int param1, String param2) { + // FIXME: Does JOGL require null-terminated strings????? + return GLContext.getCurrentGL().getGL2ES2().glGetAttribLocation(param1, param2 + "\0"); + } + + @Override + public int glGetUniformLocation(int param1, String param2) { + // FIXME: Does JOGL require null-terminated strings???????? + return GLContext.getCurrentGL().getGL2ES2().glGetUniformLocation(param1, param2 + "\0"); + } + + @Override + public void glShaderSource(int param1, String[] param2, IntBuffer param3) { + checkLimit(param3); + GLContext.getCurrentGL().getGL2ES2().glShaderSource(param1, param2.length, param2, param3); + } + + @Override + public String glGetProgramInfoLog(int program, int maxSize) { + ByteBuffer buffer = ByteBuffer.allocateDirect(maxSize); + buffer.order(ByteOrder.nativeOrder()); + ByteBuffer tmp = ByteBuffer.allocateDirect(4); + tmp.order(ByteOrder.nativeOrder()); + IntBuffer intBuffer = tmp.asIntBuffer(); + + GLContext.getCurrentGL().getGL2ES2().glGetProgramInfoLog(program, maxSize, intBuffer, buffer); + int numBytes = intBuffer.get(0); + byte[] bytes = new byte[numBytes]; + buffer.get(bytes); + return new String(bytes); + } + + @Override + public String glGetShaderInfoLog(int shader, int maxSize) { + ByteBuffer buffer = ByteBuffer.allocateDirect(maxSize); + buffer.order(ByteOrder.nativeOrder()); + ByteBuffer tmp = ByteBuffer.allocateDirect(4); + tmp.order(ByteOrder.nativeOrder()); + IntBuffer intBuffer = tmp.asIntBuffer(); + + GLContext.getCurrentGL().getGL2ES2().glGetShaderInfoLog(shader, maxSize, intBuffer, buffer); + int numBytes = intBuffer.get(0); + byte[] bytes = new byte[numBytes]; + buffer.get(bytes); + return new String(bytes); + } + + @Override + public void glBindFragDataLocation(int param1, int param2, String param3) { + GLContext.getCurrentGL().getGL2GL3().glBindFragDataLocation(param1, param2, param3); + } + + @Override + public void glBindVertexArray(int param1) { + GLContext.getCurrentGL().getGL2ES3().glBindVertexArray(param1); + } + + @Override + public void glGenVertexArrays(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().getGL2ES3().glGenVertexArrays(param1.limit(), param1); + } + + @Override + public void glPatchParameter(int count) { + GLContext.getCurrentGL().getGL3().glPatchParameteri(com.jogamp.opengl.GL3.GL_PATCH_VERTICES, count); + } + + @Override + public void glDeleteVertexArrays(IntBuffer arrays) { + checkLimit(arrays); + GLContext.getCurrentGL().getGL2ES3().glDeleteVertexArrays(arrays.limit(), arrays); + } +} diff --git a/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLExt.java b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLExt.java new file mode 100644 index 000000000..a87e8a035 --- /dev/null +++ b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLExt.java @@ -0,0 +1,88 @@ +package com.jme3.renderer.jogl; + +import com.jme3.renderer.RendererException; +import com.jme3.renderer.opengl.GLExt; +import com.jogamp.opengl.GLContext; + +import java.nio.Buffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public class JoglGLExt implements GLExt { + + private static int getLimitBytes(IntBuffer buffer) { + checkLimit(buffer); + return buffer.limit() * 4; + } + + private static void checkLimit(Buffer buffer) { + if (buffer == null) { + return; + } + if (buffer.limit() == 0) { + throw new RendererException("Attempting to upload empty buffer (limit = 0), that's an error"); + } + if (buffer.remaining() == 0) { + throw new RendererException("Attempting to upload empty buffer (remaining = 0), that's an error"); + } + } + + @Override + public void glBufferData(int target, IntBuffer data, int usage) { + checkLimit(data); + GLContext.getCurrentGL().glBufferData(target, getLimitBytes(data), data, usage); + } + + @Override + public void glBufferSubData(int target, long offset, IntBuffer data) { + checkLimit(data); + GLContext.getCurrentGL().glBufferSubData(target, getLimitBytes(data), offset, data); + } + + @Override + public void glDrawArraysInstancedARB(int mode, int first, int count, int primcount) { + GLContext.getCurrentGL().getGL2ES3().glDrawArraysInstanced(mode, first, count, primcount); + } + + @Override + public void glDrawBuffers(IntBuffer bufs) { + checkLimit(bufs); + GLContext.getCurrentGL().getGL2ES2().glDrawBuffers(bufs.limit(), bufs); + } + + @Override + public void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + GLContext.getCurrentGL().getGL2ES3().glDrawElementsInstanced(mode, indices_count, type, indices_buffer_offset, primcount); + } + + @Override + public void glGetMultisample(int pname, int index, FloatBuffer val) { + checkLimit(val); + GLContext.getCurrentGL().getGL2ES2().glGetMultisamplefv(pname, index, val); + } + + @Override + public void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + GLContext.getCurrentGL().getGL2ES2().glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + } + + @Override + public void glVertexAttribDivisorARB(int index, int divisor) { + GLContext.getCurrentGL().getGL2ES3().glVertexAttribDivisor(index, divisor); + } + + @Override + public Object glFenceSync(int condition, int flags) { + return GLContext.getCurrentGL().getGL3ES3().glFenceSync(condition, flags); + } + + @Override + public int glClientWaitSync(Object sync, int flags, long timeout) { + return GLContext.getCurrentGL().getGL3ES3().glClientWaitSync(((Long) sync).longValue(), flags, timeout); + } + + @Override + public void glDeleteSync(Object sync) { + GLContext.getCurrentGL().getGL3ES3().glDeleteSync(((Long) sync).longValue()); + } +} diff --git a/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLFbo.java b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLFbo.java new file mode 100644 index 000000000..2691d2e24 --- /dev/null +++ b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGLFbo.java @@ -0,0 +1,97 @@ +package com.jme3.renderer.jogl; + +import com.jme3.renderer.RendererException; +import com.jme3.renderer.opengl.GLFbo; +import com.jogamp.opengl.GLContext; + +import java.nio.Buffer; +import java.nio.IntBuffer; + +/** + * Implements GLFbo + * + * @author Kirill Vainer + */ +public class JoglGLFbo implements GLFbo { + + private static void checkLimit(Buffer buffer) { + if (buffer == null) { + return; + } + if (buffer.limit() == 0) { + throw new RendererException("Attempting to upload empty buffer (limit = 0), that's an error"); + } + if (buffer.remaining() == 0) { + throw new RendererException("Attempting to upload empty buffer (remaining = 0), that's an error"); + } + } + + @Override + public void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + GLContext.getCurrentGL().getGL2ES3().glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + + @Override + public void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height) { + GLContext.getCurrentGL().glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + } + + @Override + public void glBindFramebufferEXT(int param1, int param2) { + GLContext.getCurrentGL().glBindFramebuffer(param1, param2); + } + + @Override + public void glBindRenderbufferEXT(int param1, int param2) { + GLContext.getCurrentGL().glBindRenderbuffer(param1, param2); + } + + @Override + public int glCheckFramebufferStatusEXT(int param1) { + return GLContext.getCurrentGL().glCheckFramebufferStatus(param1); + } + + @Override + public void glDeleteFramebuffersEXT(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glDeleteFramebuffers(param1.limit(), param1); + } + + @Override + public void glDeleteRenderbuffersEXT(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glDeleteRenderbuffers(param1.limit(), param1); + } + + @Override + public void glFramebufferRenderbufferEXT(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().glFramebufferRenderbuffer(param1, param2, param3, param4); + } + + @Override + public void glFramebufferTexture2DEXT(int param1, int param2, int param3, int param4, int param5) { + GLContext.getCurrentGL().glFramebufferTexture2D(param1, param2, param3, param4, param5); + } + + @Override + public void glGenFramebuffersEXT(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glGenFramebuffers(param1.limit(), param1); + } + + @Override + public void glGenRenderbuffersEXT(IntBuffer param1) { + checkLimit(param1); + GLContext.getCurrentGL().glGenRenderbuffers(param1.limit(), param1); + } + + @Override + public void glGenerateMipmapEXT(int param1) { + GLContext.getCurrentGL().glGenerateMipmap(param1); + } + + @Override + public void glRenderbufferStorageEXT(int param1, int param2, int param3, int param4) { + GLContext.getCurrentGL().glRenderbufferStorage(param1, param2, param3, param4); + } +} diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglAbstractDisplay.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglAbstractDisplay.java index a7f7fbfd7..7b3f2e655 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglAbstractDisplay.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglAbstractDisplay.java @@ -37,22 +37,15 @@ import com.jme3.input.MouseInput; import com.jme3.input.TouchInput; import com.jme3.input.awt.AwtKeyInput; import com.jme3.input.awt.AwtMouseInput; -import com.jme3.renderer.jogl.JoglRenderer; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.AnimatorBase; import com.jogamp.opengl.util.FPSAnimator; + import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Logger; -import com.jogamp.opengl.DebugGL2; -import com.jogamp.opengl.DebugGL3; -import com.jogamp.opengl.DebugGL3bc; -import com.jogamp.opengl.DebugGL4; -import com.jogamp.opengl.DebugGL4bc; -import com.jogamp.opengl.DebugGLES1; -import com.jogamp.opengl.DebugGLES2; -import com.jogamp.opengl.GL; + import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLEventListener; @@ -124,50 +117,9 @@ public abstract class JoglAbstractDisplay extends JoglContext implements GLEvent canvas.setSize(settings.getWidth(), settings.getHeight()); canvas.setIgnoreRepaint(true); canvas.addGLEventListener(this); - - if (settings.getBoolean("GraphicsDebug")) { - canvas.invoke(false, new GLRunnable() { - public boolean run(GLAutoDrawable glad) { - GL gl = glad.getGL(); - if (gl.isGLES()) { - if (gl.isGLES1()) { - glad.setGL(new DebugGLES1(gl.getGLES1())); - } else { - if (gl.isGLES2()) { - glad.setGL(new DebugGLES2(gl.getGLES2())); - } else { - // TODO ES3 - } - } - } else { - if (gl.isGL4bc()) { - glad.setGL(new DebugGL4bc(gl.getGL4bc())); - } else { - if (gl.isGL4()) { - glad.setGL(new DebugGL4(gl.getGL4())); - } else { - if (gl.isGL3bc()) { - glad.setGL(new DebugGL3bc(gl.getGL3bc())); - } else { - if (gl.isGL3()) { - glad.setGL(new DebugGL3(gl.getGL3())); - } else { - if (gl.isGL2()) { - glad.setGL(new DebugGL2(gl.getGL2())); - } - } - } - } - } - } - return true; - } - }); - } - - renderer = new JoglRenderer(); - renderer.setMainFrameBufferSrgb(settings.getGammaCorrection()); + //FIXME not sure it is the best place to do that + renderable.set(true); } protected void startGLCanvas() { @@ -182,9 +134,6 @@ public abstract class JoglAbstractDisplay extends JoglContext implements GLEvent animator.start(); wasAnimating = true; - - //FIXME not sure it is the best place to do that - renderable.set(true); } protected void onCanvasAdded() { diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java index 9a409b85e..b56eb43c1 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java @@ -41,28 +41,34 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext private static final Logger logger = Logger.getLogger(JoglCanvas.class.getName()); private int width, height; + private boolean runningFirstTime = true; public JoglCanvas(){ super(); initGLCanvas(); } - public Type getType() { + @Override + public Type getType() { return Type.Canvas; } - public void setTitle(String title) { + @Override + public void setTitle(String title) { } - public void restart() { + @Override + public void restart() { } - public void create(boolean waitFor){ + @Override + public void create(boolean waitFor){ if (waitFor) waitFor(true); } - public void destroy(boolean waitFor){ + @Override + public void destroy(boolean waitFor){ if (waitFor) waitFor(false); if (animator.isAnimating()) @@ -81,13 +87,20 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext startGLCanvas(); } - public void init(GLAutoDrawable drawable) { + @Override + public void init(GLAutoDrawable drawable) { canvas.requestFocus(); super.internalCreate(); logger.fine("Display created."); - renderer.initialize(); + // At this point, the OpenGL context is active. + if (runningFirstTime){ + // THIS is the part that creates the renderer. + // It must always be called, now that we have the pbuffer workaround. + initContextFirstTime(); + runningFirstTime = false; + } listener.initialize(); } @@ -97,7 +110,8 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext super.startGLCanvas(); } - public void display(GLAutoDrawable glad) { + @Override + public void display(GLAutoDrawable glad) { if (!created.get() && renderer != null){ listener.destroy(); logger.fine("Canvas destroyed."); @@ -129,7 +143,8 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext } - public Canvas getCanvas() { + @Override + public Canvas getCanvas() { return canvas; } diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java index 5d687af8d..3b90877df 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java @@ -36,17 +36,33 @@ import com.jme3.input.JoyInput; import com.jme3.input.KeyInput; import com.jme3.input.MouseInput; import com.jme3.renderer.Renderer; +import com.jme3.renderer.RendererException; +import com.jme3.renderer.jogl.JoglGL; +import com.jme3.renderer.jogl.JoglGLExt; +import com.jme3.renderer.jogl.JoglGLFbo; import com.jme3.renderer.jogl.JoglRenderer; +import com.jme3.renderer.opengl.GL2; +import com.jme3.renderer.opengl.GL3; +import com.jme3.renderer.opengl.GL4; +import com.jme3.renderer.opengl.GLDebugDesktop; +import com.jme3.renderer.opengl.GLExt; +import com.jme3.renderer.opengl.GLFbo; +import com.jme3.renderer.opengl.GLRenderer; +import com.jme3.renderer.opengl.GLTiming; +import com.jme3.renderer.opengl.GLTimingState; +import com.jme3.renderer.opengl.GLTracer; import com.jme3.system.AppSettings; import com.jme3.system.JmeContext; import com.jme3.system.NanoTimer; import com.jme3.system.NativeLibraryLoader; import com.jme3.system.SystemListener; import com.jme3.system.Timer; + import java.nio.IntBuffer; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; import java.util.logging.Logger; + import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2GL3; import com.jogamp.opengl.GLContext; @@ -62,7 +78,7 @@ public abstract class JoglContext implements JmeContext { protected final Object createdLock = new Object(); protected AppSettings settings = new AppSettings(true); - protected JoglRenderer renderer; + protected Renderer renderer; protected Timer timer; protected SystemListener listener; @@ -77,43 +93,53 @@ public abstract class JoglContext implements JmeContext { } } - public void setSystemListener(SystemListener listener){ + @Override + public void setSystemListener(SystemListener listener){ this.listener = listener; } - public void setSettings(AppSettings settings) { + @Override + public void setSettings(AppSettings settings) { this.settings.copyFrom(settings); } - public boolean isRenderable(){ + @Override + public boolean isRenderable(){ return renderable.get(); } - public AppSettings getSettings() { + @Override + public AppSettings getSettings() { return settings; } - public Renderer getRenderer() { + @Override + public Renderer getRenderer() { return renderer; } - public MouseInput getMouseInput() { + @Override + public MouseInput getMouseInput() { return mouseInput; } - public KeyInput getKeyInput() { + @Override + public KeyInput getKeyInput() { return keyInput; } - public JoyInput getJoyInput() { + @Override + public JoyInput getJoyInput() { return joyInput; } - public Timer getTimer() { + @Override + public Timer getTimer() { return timer; } - public boolean isCreated() { + @Override + public boolean isCreated() { return created.get(); } @@ -135,13 +161,78 @@ public abstract class JoglContext implements JmeContext { } } } + + protected void initContextFirstTime(){ + if (GLContext.getCurrent().getGLVersionNumber().getMajor() < 2) { + throw new RendererException("OpenGL 2.0 or higher is " + + "required for jMonkeyEngine"); + } + + if (settings.getRenderer().equals("JOGL")) { + com.jme3.renderer.opengl.GL gl = new JoglGL(); + GLExt glext = new JoglGLExt(); + GLFbo glfbo = new JoglGLFbo(); + + if (settings.getBoolean("GraphicsDebug")) { + gl = new GLDebugDesktop(gl, glext, glfbo); + glext = (GLExt) gl; + glfbo = (GLFbo) gl; + } + + if (settings.getBoolean("GraphicsTiming")) { + GLTimingState timingState = new GLTimingState(); + gl = (com.jme3.renderer.opengl.GL) GLTiming.createGLTiming(gl, timingState, GL.class, GL2.class, GL3.class, GL4.class); + glext = (GLExt) GLTiming.createGLTiming(glext, timingState, GLExt.class); + glfbo = (GLFbo) GLTiming.createGLTiming(glfbo, timingState, GLFbo.class); + } + + if (settings.getBoolean("GraphicsTrace")) { + gl = (com.jme3.renderer.opengl.GL) GLTracer.createDesktopGlTracer(gl, GL.class, GL2.class, GL3.class, GL4.class); + glext = (GLExt) GLTracer.createDesktopGlTracer(glext, GLExt.class); + glfbo = (GLFbo) GLTracer.createDesktopGlTracer(glfbo, GLFbo.class); + } + + //FIXME uncomment the line below when the unified renderer is ready for the prime time :) + //renderer = new GLRenderer(gl, glext, glfbo); + renderer = new JoglRenderer(); + renderer.initialize(); + } else { + throw new UnsupportedOperationException("Unsupported renderer: " + settings.getRenderer()); + } + + if (GLContext.getCurrentGL().isExtensionAvailable("GL_ARB_debug_output") && settings.getBoolean("GraphicsDebug")) { + GLContext.getCurrent().enableGLDebugMessage(true); + GLContext.getCurrent().addGLDebugListener(new JoglGLDebugOutputHandler()); + } + + renderer.setMainFrameBufferSrgb(settings.getGammaCorrection()); + renderer.setLinearizeSrgbImages(settings.getGammaCorrection()); - public void internalCreate() { + // Init input + if (keyInput != null) { + keyInput.initialize(); + } + + if (mouseInput != null) { + mouseInput.initialize(); + } + + if (joyInput != null) { + joyInput.initialize(); + } + } + + public void internalCreate() { timer = new NanoTimer(); synchronized (createdLock){ created.set(true); createdLock.notifyAll(); } + if (renderable.get()){ + initContextFirstTime(); + } else { + assert getType() == Type.Canvas; + } } protected void internalDestroy() { diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglGLDebugOutputHandler.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglGLDebugOutputHandler.java new file mode 100644 index 000000000..5a8b58715 --- /dev/null +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglGLDebugOutputHandler.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2009-2015 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.system.jogl; + +import java.util.HashMap; + +import com.jogamp.opengl.GL2ES2; +import com.jogamp.opengl.GLDebugListener; +import com.jogamp.opengl.GLDebugMessage; + +class JoglGLDebugOutputHandler implements GLDebugListener { + + private static final HashMap constMap = new HashMap(); + private static final String MESSAGE_FORMAT = + "[JME3] OpenGL debug message\r\n" + + " ID: %d\r\n" + + " Source: %s\r\n" + + " Type: %s\r\n" + + " Severity: %s\r\n" + + " Message: %s"; + + static { + constMap.put(GL2ES2.GL_DEBUG_SOURCE_API, "API"); + constMap.put(GL2ES2.GL_DEBUG_SOURCE_APPLICATION, "APPLICATION"); + constMap.put(GL2ES2.GL_DEBUG_SOURCE_OTHER, "OTHER"); + constMap.put(GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER, "SHADER_COMPILER"); + constMap.put(GL2ES2.GL_DEBUG_SOURCE_THIRD_PARTY, "THIRD_PARTY"); + constMap.put(GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM, "WINDOW_SYSTEM"); + + constMap.put(GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, "DEPRECATED_BEHAVIOR"); + constMap.put(GL2ES2.GL_DEBUG_TYPE_ERROR, "ERROR"); + constMap.put(GL2ES2.GL_DEBUG_TYPE_OTHER, "OTHER"); + constMap.put(GL2ES2.GL_DEBUG_TYPE_PERFORMANCE, "PERFORMANCE"); + constMap.put(GL2ES2.GL_DEBUG_TYPE_PORTABILITY, "PORTABILITY"); + constMap.put(GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR, "UNDEFINED_BEHAVIOR"); + + constMap.put(GL2ES2.GL_DEBUG_SEVERITY_HIGH, "HIGH"); + constMap.put(GL2ES2.GL_DEBUG_SEVERITY_MEDIUM, "MEDIUM"); + constMap.put(GL2ES2.GL_DEBUG_SEVERITY_LOW, "LOW"); + } + + @Override + public void messageSent(GLDebugMessage event) { + String sourceStr = constMap.get(event.getDbgSource()); + String typeStr = constMap.get(event.getDbgType()); + String severityStr = constMap.get(event.getDbgSeverity()); + + System.err.println(String.format(MESSAGE_FORMAT, event.getDbgId(), sourceStr, typeStr, severityStr, event.getDbgMsg())); + } + +} diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtAbstractDisplay.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtAbstractDisplay.java index cb75d5d37..4ac6f5c49 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtAbstractDisplay.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtAbstractDisplay.java @@ -37,21 +37,14 @@ import com.jme3.input.MouseInput; import com.jme3.input.TouchInput; import com.jme3.input.jogl.NewtKeyInput; import com.jme3.input.jogl.NewtMouseInput; -import com.jme3.renderer.jogl.JoglRenderer; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.AnimatorBase; import com.jogamp.opengl.util.FPSAnimator; + import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Logger; -import com.jogamp.opengl.DebugGL2; -import com.jogamp.opengl.DebugGL3; -import com.jogamp.opengl.DebugGL3bc; -import com.jogamp.opengl.DebugGL4; -import com.jogamp.opengl.DebugGL4bc; -import com.jogamp.opengl.DebugGLES1; -import com.jogamp.opengl.DebugGLES2; -import com.jogamp.opengl.GL; + import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLEventListener; @@ -103,50 +96,9 @@ public abstract class JoglNewtAbstractDisplay extends JoglContext implements GLE canvas.requestFocus(); canvas.setSize(settings.getWidth(), settings.getHeight()); canvas.addGLEventListener(this); - - if (settings.getBoolean("GraphicsDebug")) { - canvas.invoke(false, new GLRunnable() { - public boolean run(GLAutoDrawable glad) { - GL gl = glad.getGL(); - if (gl.isGLES()) { - if (gl.isGLES1()) { - glad.setGL(new DebugGLES1(gl.getGLES1())); - } else { - if (gl.isGLES2()) { - glad.setGL(new DebugGLES2(gl.getGLES2())); - } else { - // TODO ES3 - } - } - } else { - if (gl.isGL4bc()) { - glad.setGL(new DebugGL4bc(gl.getGL4bc())); - } else { - if (gl.isGL4()) { - glad.setGL(new DebugGL4(gl.getGL4())); - } else { - if (gl.isGL3bc()) { - glad.setGL(new DebugGL3bc(gl.getGL3bc())); - } else { - if (gl.isGL3()) { - glad.setGL(new DebugGL3(gl.getGL3())); - } else { - if (gl.isGL2()) { - glad.setGL(new DebugGL2(gl.getGL2())); - } - } - } - } - } - } - return true; - } - }); - } - - renderer = new JoglRenderer(); - renderer.setMainFrameBufferSrgb(settings.getGammaCorrection()); + //FIXME not sure it is the best place to do that + renderable.set(true); } protected void startGLCanvas() { @@ -161,9 +113,6 @@ public abstract class JoglNewtAbstractDisplay extends JoglContext implements GLE animator.start(); wasAnimating = true; - - //FIXME not sure it is the best place to do that - renderable.set(true); } protected void onCanvasAdded() { diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java index 3ed501580..e4e81a5df 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java @@ -41,6 +41,7 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas private static final Logger logger = Logger.getLogger(JoglNewtCanvas.class.getName()); private int width, height; + private boolean runningFirstTime = true; private NewtCanvasAWT newtAwtCanvas; @@ -53,7 +54,9 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas protected final void initGLCanvas() { super.initGLCanvas(); newtAwtCanvas = new NewtCanvasAWT(canvas) { - @Override + private static final long serialVersionUID = 1L; + + @Override public void addNotify() { super.addNotify(); onCanvasAdded(); @@ -67,22 +70,27 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas }; } - public Type getType() { + @Override + public Type getType() { return Type.Canvas; } - public void setTitle(String title) { + @Override + public void setTitle(String title) { } - public void restart() { + @Override + public void restart() { } - public void create(boolean waitFor){ + @Override + public void create(boolean waitFor){ if (waitFor) waitFor(true); } - public void destroy(boolean waitFor){ + @Override + public void destroy(boolean waitFor){ if (waitFor) waitFor(false); if (animator.isAnimating()) @@ -101,13 +109,20 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas startGLCanvas(); } - public void init(GLAutoDrawable drawable) { + @Override + public void init(GLAutoDrawable drawable) { canvas.requestFocus(); super.internalCreate(); logger.fine("Display created."); - renderer.initialize(); + // At this point, the OpenGL context is active. + if (runningFirstTime){ + // THIS is the part that creates the renderer. + // It must always be called, now that we have the pbuffer workaround. + initContextFirstTime(); + runningFirstTime = false; + } listener.initialize(); } @@ -117,7 +132,8 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas super.startGLCanvas(); } - public void display(GLAutoDrawable glad) { + @Override + public void display(GLAutoDrawable glad) { if (!created.get() && renderer != null){ listener.destroy(); logger.fine("Canvas destroyed."); diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java index bf99c84eb..2b7df131a 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java @@ -13,7 +13,7 @@ import java.nio.ShortBuffer; import com.jme3.renderer.opengl.GL4; import org.lwjgl.opengl.*; -public class LwjglGL implements GL, GL2, GL3, GL4 { +public final class LwjglGL implements GL, GL2, GL3, GL4 { private static void checkLimit(Buffer buffer) { if (buffer == null) { diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLExt.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLExt.java index 2c6a63fd7..e3b9e6c77 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLExt.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLExt.java @@ -13,7 +13,7 @@ import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.GLSync; -public class LwjglGLExt implements GLExt { +public final class LwjglGLExt implements GLExt { private static void checkLimit(Buffer buffer) { if (buffer == null) { diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboEXT.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboEXT.java index 159000a6c..40571f5ed 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboEXT.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboEXT.java @@ -13,7 +13,7 @@ import org.lwjgl.opengl.EXTFramebufferObject; * * @author Kirill Vainer */ -public class LwjglGLFboEXT implements GLFbo { +public final class LwjglGLFboEXT implements GLFbo { private static void checkLimit(Buffer buffer) { if (buffer == null) { diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboGL3.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboGL3.java index acc540273..14e0cc9e6 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboGL3.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGLFboGL3.java @@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL30; * * @author Kirill Vainer */ -public class LwjglGLFboGL3 implements GLFbo { +public final class LwjglGLFboGL3 implements GLFbo { private static void checkLimit(Buffer buffer) { if (buffer == null) { diff --git a/private/known_hosts b/private/known_hosts new file mode 100644 index 000000000..fdc45836f --- /dev/null +++ b/private/known_hosts @@ -0,0 +1 @@ +updates.jmonkeyengine.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5bNOiZwU5dF62nBllxkjiSIfn0k6RVfprvO1aUypRmARD3/MKJKg7cGLezlLKaHZtVs84VpEqpmg5IzPAXWEmxUw1oke70uYMli7JV+4oPAeQRFwUdldP98I5h9VHwSjBqMycRLkxYaHF8edIPt1Zsa2dM3qrufy71ndQoFF6g7QxmT7gsTxwcNufDxymIgiAna/Qp2fr0YCLCiB8RQ7JTHfqA3dOWw0wz7AwfBTwwDCHkVxB5B4nz5iZxFr0scvqcae8vMncq8xKS7OMrLbn6asVaF6dDu+5Jc0mqxma5Qg7VC1xQXZsvlRISfrTFhQMhEx+j9w5snzihrlFnZ35 diff --git a/private/www-updater.key.enc b/private/www-updater.key.enc new file mode 100644 index 000000000..63dcb3723 Binary files /dev/null and b/private/www-updater.key.enc differ diff --git a/sdk/BasicGameTemplate/nbproject/project.properties b/sdk/BasicGameTemplate/nbproject/project.properties index ac4b3d2a6..8f2414b51 100644 --- a/sdk/BasicGameTemplate/nbproject/project.properties +++ b/sdk/BasicGameTemplate/nbproject/project.properties @@ -50,8 +50,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/JME3TestsTemplate/build.xml b/sdk/JME3TestsTemplate/build.xml index c1f098b99..d39b505e6 100644 --- a/sdk/JME3TestsTemplate/build.xml +++ b/sdk/JME3TestsTemplate/build.xml @@ -51,8 +51,7 @@ -init-macrodef-junit: defines macro for junit execution -init-macrodef-debug: defines macro for class debugging -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) + -do-jar: JAR building run: execution of project -javadoc-build: Javadoc generation test-report: JUnit report generation diff --git a/sdk/JME3TestsTemplate/nbproject/genfiles.properties b/sdk/JME3TestsTemplate/nbproject/genfiles.properties index 6fb0f140e..eca6dafb7 100644 --- a/sdk/JME3TestsTemplate/nbproject/genfiles.properties +++ b/sdk/JME3TestsTemplate/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=0f706f4a -build.xml.script.CRC32=0b0b23c4 -build.xml.stylesheet.CRC32=28e38971@1.38.1.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=0f706f4a -nbproject/build-impl.xml.script.CRC32=46d1a69a -nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45 +build.xml.data.CRC32=0f706f4a +build.xml.script.CRC32=82b8b23d +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0f706f4a +nbproject/build-impl.xml.script.CRC32=46d1a69a +nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45 diff --git a/sdk/JME3TestsTemplate/nbproject/project.properties b/sdk/JME3TestsTemplate/nbproject/project.properties index 2a8d46f22..489a9c7d9 100644 --- a/sdk/JME3TestsTemplate/nbproject/project.properties +++ b/sdk/JME3TestsTemplate/nbproject/project.properties @@ -25,20 +25,26 @@ excludes= includes=** jar.compress=false javac.classpath=\ - ${libs.jme3.classpath}:\ - ${libs.jme3-libraries.classpath}:\ - ${libs.jme3-libraries-blender.classpath}:\ + ${libs.jme3-jogg.classpath}:\ + ${libs.jme3-blender.classpath}:\ + ${libs.jme3-networking.classpath}:\ + ${libs.jme3-plugins.classpath}:\ + ${libs.jme3-core.classpath}:\ + ${libs.jme3-desktop.classpath}:\ + ${libs.jme3-lwjgl.classpath}:\ + ${libs.jme3-niftygui.classpath}:\ + ${libs.jme3-effects.classpath}:\ + ${libs.jme3-terrain.classpath}:\ + ${libs.jme3-jbullet.classpath}:\ ${libs.jme3-test-data.classpath} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath}:\ - ${libs.junit_4.classpath} + ${build.classes.dir} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} diff --git a/sdk/JME3TestsTemplateAndroid/nbproject/project.properties b/sdk/JME3TestsTemplateAndroid/nbproject/project.properties index e3a940489..f020f7d80 100644 --- a/sdk/JME3TestsTemplateAndroid/nbproject/project.properties +++ b/sdk/JME3TestsTemplateAndroid/nbproject/project.properties @@ -47,8 +47,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/ant-jme/nbproject/project.properties b/sdk/ant-jme/nbproject/project.properties index 80281cc3b..3a1490871 100644 --- a/sdk/ant-jme/nbproject/project.properties +++ b/sdk/ant-jme/nbproject/project.properties @@ -36,8 +36,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/build.gradle b/sdk/build.gradle index b70e80b13..99c850987 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -165,7 +165,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ "compile-dependency"{} "run-dependency"{ "release-version" "1" - "specification-version" "3.0.0" + "specification-version" jmeVersion } } } @@ -388,12 +388,14 @@ copyTestSources.outputs.dir "JME3TestsTemplate/src/" copyTestSources.outputs.dir "JME3TestsTemplateAndroid/src/" ant.properties['plugins.version'] = jmeVersion -ant.properties['app.version']= jmeMainVersion + "-" + jmeVersionTag +ant.properties['app.version']= jmeFullVersion +ant.properties['nbm.revision']= jmeNbmRevision task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources]) <<{ ant.propertyfile(file: "nbproject/project.properties") { entry( key: "plugins.version", value: "${jmeVersion}") - entry( key: "app.version", value: "${jmeMainVersion + "-" + jmeVersionTag}") + entry( key: "app.version", value: "${jmeFullVersion}") + entry( key: "nbm.revision", value: "${jmeNbmRevision}") } ant.ant(dir: ".", antfile: "build.xml", target: "build") } @@ -416,7 +418,7 @@ task cleanSdk() <<{ file("JME3TestsTemplateAndroid/src/jmetest/").deleteDir() } -jar.dependsOn(buildSdk) -clean.dependsOn(cleanSdk); - +tasks.remove(uploadArchives) +jar.dependsOn(buildSdk) +clean.dependsOn(cleanSdk) diff --git a/sdk/build.xml b/sdk/build.xml index acc5c1d04..ffa0b8fe8 100644 --- a/sdk/build.xml +++ b/sdk/build.xml @@ -12,7 +12,6 @@ - @@ -157,7 +156,7 @@ replace="OpenIDE-Module-Specification-Version: ${plugins.version}" byline="true"/> @@ -167,7 +166,7 @@ replace="OpenIDE-Module-Implementation-Version: 0" byline="true"/> @@ -176,9 +175,6 @@ - - - @@ -191,105 +187,19 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Setting implementation version for ${module_dir} to revision: ${svn.LastChangedRev} - + Setting implementation version for ${module_dir} to revision: ${nbm.revision} + - Removing implementation version for ${module_dir} from revision: ${svn.LastChangedRev} - + Removing implementation version for ${module_dir} from revision: ${nbm.revision} + - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -298,7 +208,7 @@ - + @@ -311,6 +221,8 @@ + + @@ -339,7 +251,7 @@ section="devel" depends="sun-java6-jdk" maintainer="jMonkeyEngine" - homepage="http://www.jmonkeyengine.com" + homepage="http://www.jmonkeyengine.org" postrm="debscripts/postrm" > @@ -360,57 +272,4 @@ - - - - Upload windows installers to googlecode.. - - - Upload linux installers to googlecode.. - - - Upload mac installer to googlecode.. - - - - - - - - diff --git a/sdk/jdks/build-osx-zip.sh b/sdk/jdks/build-osx-zip.sh index cf1051901..db3c44e99 100755 --- a/sdk/jdks/build-osx-zip.sh +++ b/sdk/jdks/build-osx-zip.sh @@ -1,5 +1,5 @@ #!/bin/sh -#(c) jMonkeyEngine.com +#(c) jmonkeyengine.org #Author Normen Hansen set -e rm -rf jdk-macosx.zip diff --git a/sdk/jdks/build-package.sh b/sdk/jdks/build-package.sh index c11a8ff2f..6f9c53503 100755 --- a/sdk/jdks/build-package.sh +++ b/sdk/jdks/build-package.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -#(c) jMonkeyEngine.com +#(c) jmonkeyengine.org #This script creates SFX binaries of the JDK for the specified platform #Author Normen Hansen diff --git a/sdk/jme3-android/nbproject/project.properties b/sdk/jme3-android/nbproject/project.properties index e2ab10b96..9b1b7cb61 100644 --- a/sdk/jme3-android/nbproject/project.properties +++ b/sdk/jme3-android/nbproject/project.properties @@ -3,7 +3,7 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-angelfont/nbproject/project.properties b/sdk/jme3-angelfont/nbproject/project.properties index 44c34ecb9..2cf7a410b 100644 --- a/sdk/jme3-angelfont/nbproject/project.properties +++ b/sdk/jme3-angelfont/nbproject/project.properties @@ -1,4 +1,6 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial +nbm.homepage=http\://www.jmonkeyengine.org +nbm.module.author=Normen Hansen spec.version.base=3.1.0 diff --git a/sdk/jme3-assetpack-support/nbproject/project.properties b/sdk/jme3-assetpack-support/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-assetpack-support/nbproject/project.properties +++ b/sdk/jme3-assetpack-support/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-blender/nbproject/project.properties b/sdk/jme3-blender/nbproject/project.properties index 33a6b9205..b47098087 100644 --- a/sdk/jme3-blender/nbproject/project.properties +++ b/sdk/jme3-blender/nbproject/project.properties @@ -1,7 +1,8 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial -nbm.homepage=http\://www.jmonkeyengine.com +license.file=../license-jme.txt +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Kaelthas nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java index 0211cae7a..1d55a6b35 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java @@ -164,6 +164,14 @@ public class BlenderTool { return "../blender"; } } + + private static String getBlenderOsSettingsPath() { + if (Utilities.isMac()) { + return "../blender/blender.app/Contents/Resources"; + } else { + return "../blender"; + } + } private static boolean checkBlenderFolders() { String jmpDir = Places.getUserDirectory().getAbsolutePath(); @@ -251,9 +259,9 @@ public class BlenderTool { } private static File getBlenderSettingsFolder() { - File blender = InstalledFileLocator.getDefault().locate(getBlenderOsPath() + "/2.69", null, false); + File blender = InstalledFileLocator.getDefault().locate(getBlenderOsSettingsPath() + "/2.75", null, false); if (blender == null) { - blender = InstalledFileLocator.getDefault().locate(getBlenderOsPath() + "/2.67", null, false); + blender = InstalledFileLocator.getDefault().locate(getBlenderOsSettingsPath() + "/2.69", null, false); } if (blender == null) { DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message("Error finding Blender settings")); diff --git a/sdk/jme3-cinematics/nbproject/project.properties b/sdk/jme3-cinematics/nbproject/project.properties index 437a62d3a..4b4ae0191 100644 --- a/sdk/jme3-cinematics/nbproject/project.properties +++ b/sdk/jme3-cinematics/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=R\u00e9my Bouquet nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-code-check/nbproject/project.properties b/sdk/jme3-code-check/nbproject/project.properties index 0411b6ff9..6700898e0 100644 --- a/sdk/jme3-code-check/nbproject/project.properties +++ b/sdk/jme3-code-check/nbproject/project.properties @@ -1,4 +1,7 @@ #Thu, 25 Aug 2011 20:26:50 +0200 javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial +license.file=../license-jme.txt +nbm.homepage=http\://www.jmonkeyengine.org +nbm.module.author=Normen Hansen spec.version.base=3.1.0 diff --git a/sdk/jme3-codepalette/nbproject/project.properties b/sdk/jme3-codepalette/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-codepalette/nbproject/project.properties +++ b/sdk/jme3-codepalette/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-baselibs/nbproject/genfiles.properties b/sdk/jme3-core-baselibs/nbproject/genfiles.properties index 1b1c32b3b..c9714ad4e 100644 --- a/sdk/jme3-core-baselibs/nbproject/genfiles.properties +++ b/sdk/jme3-core-baselibs/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=278ea45d +build.xml.data.CRC32=d43b0890 build.xml.script.CRC32=cdae6a36 build.xml.stylesheet.CRC32=a56c6a5b@2.67.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=278ea45d +nbproject/build-impl.xml.data.CRC32=d43b0890 nbproject/build-impl.xml.script.CRC32=246f9b81 nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 diff --git a/sdk/jme3-core-baselibs/nbproject/project.properties b/sdk/jme3-core-baselibs/nbproject/project.properties index 8bcd2222a..d4692bc80 100644 --- a/sdk/jme3-core-baselibs/nbproject/project.properties +++ b/sdk/jme3-core-baselibs/nbproject/project.properties @@ -1,7 +1,7 @@ -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-baselibs/nbproject/project.xml b/sdk/jme3-core-baselibs/nbproject/project.xml index df81e68ff..be7a3e038 100644 --- a/sdk/jme3-core-baselibs/nbproject/project.xml +++ b/sdk/jme3-core-baselibs/nbproject/project.xml @@ -1,15 +1,15 @@ - - + + org.netbeans.modules.apisupport.project - + com.jme3.gde.core.baselibs - + com.jme3.gde.core.libraries - - + + 1 3.1.0 @@ -19,133 +19,142 @@ com.jme3.asset com.jme3.scene.plugins.blender - com.jme3.scene.plugins.blender.animations - com.jme3.scene.plugins.blender.cameras + com.jme3.scene.plugins.blender.math com.jme3.scene.plugins.blender.constraints com.jme3.scene.plugins.blender.constraints.definitions com.jme3.scene.plugins.blender.curves - com.jme3.scene.plugins.blender.file - com.jme3.scene.plugins.blender.landscape - com.jme3.scene.plugins.blender.lights - com.jme3.scene.plugins.blender.materials - com.jme3.scene.plugins.blender.math com.jme3.scene.plugins.blender.meshes - com.jme3.scene.plugins.blender.modifiers - com.jme3.scene.plugins.blender.objects com.jme3.scene.plugins.blender.particles + com.jme3.scene.plugins.blender.cameras + com.jme3.scene.plugins.blender.objects + com.jme3.scene.plugins.blender.landscape + com.jme3.scene.plugins.blender.modifiers com.jme3.scene.plugins.blender.textures + com.jme3.scene.plugins.blender.textures.io com.jme3.scene.plugins.blender.textures.blending com.jme3.scene.plugins.blender.textures.generating - com.jme3.scene.plugins.blender.textures.io - checkers.quals - com.jme3.animation - com.jme3.app - com.jme3.app.state - com.jme3.asset.cache - com.jme3.asset.plugins - com.jme3.audio - com.jme3.audio.openal - com.jme3.audio.plugins - com.jme3.bounding - com.jme3.cinematic - com.jme3.cinematic.events - com.jme3.collision - com.jme3.collision.bih - com.jme3.cursors.plugins - com.jme3.effect - com.jme3.effect.influencers - com.jme3.effect.shapes + com.jme3.scene.plugins.blender.animations + com.jme3.scene.plugins.blender.materials + com.jme3.scene.plugins.blender.file + com.jme3.scene.plugins.blender.lights + jme3tools.shader + jme3tools.savegame + jme3tools.shadercheck + jme3tools.optimize + jme3tools.converters + com.jme3.shader + com.jme3.shader.plugins com.jme3.export com.jme3.export.binary - com.jme3.font - com.jme3.font.plugins + com.jme3.cinematic + com.jme3.cinematic.events + com.jme3.math + com.jme3.util + com.jme3.util.blockparser + com.jme3.util.xml + com.jme3.post com.jme3.input - com.jme3.input.controls com.jme3.input.dummy + com.jme3.input.controls com.jme3.input.event - com.jme3.light + com.jme3.profile + com.jme3.ui + com.jme3.audio + com.jme3.audio.openal + com.jme3.audio.plugins + com.jme3.cursors.plugins + com.jme3.bounding + com.jme3.shadow + com.jme3.texture + com.jme3.texture.image + com.jme3.texture.plugins + com.jme3.system com.jme3.material com.jme3.material.plugins - com.jme3.math - com.jme3.post - com.jme3.profile com.jme3.renderer - com.jme3.renderer.opengl com.jme3.renderer.queue + com.jme3.renderer.opengl + com.jme3.effect + com.jme3.effect.shapes + com.jme3.effect.influencers + com.jme3.app + com.jme3.app.state + com.jme3.asset.plugins + com.jme3.asset.cache + com.jme3.light + com.jme3.animation + com.jme3.collision + com.jme3.collision.bih com.jme3.scene - com.jme3.scene.control + com.jme3.scene.shape + com.jme3.scene.plugins com.jme3.scene.debug com.jme3.scene.instancing + com.jme3.scene.control com.jme3.scene.mesh - com.jme3.scene.plugins - com.jme3.scene.shape - com.jme3.shader - com.jme3.shader.plugins - com.jme3.shadow - com.jme3.system - com.jme3.texture - com.jme3.texture.image - com.jme3.texture.plugins - com.jme3.ui - com.jme3.util - com.jme3.util.blockparser - com.jme3.util.xml - jme3tools.converters - jme3tools.converters.model - jme3tools.converters.model.strip - jme3tools.optimize - jme3tools.savegame - jme3tools.shader - jme3tools.shadercheck + com.jme3.font + com.jme3.font.plugins + checkers.quals + jme3tools.navigation com.jme3.input.awt com.jme3.system.awt - jme3tools.navigation - com.jme3.post.filters com.jme3.post.ssao + com.jme3.post.filters com.jme3.water com.jme3.bullet - com.jme3.bullet.collision - com.jme3.bullet.collision.shapes - com.jme3.bullet.collision.shapes.infos - com.jme3.bullet.control - com.jme3.bullet.control.ragdoll - com.jme3.bullet.debug + com.jme3.bullet.util com.jme3.bullet.joints com.jme3.bullet.joints.motors com.jme3.bullet.objects com.jme3.bullet.objects.infos - com.jme3.bullet.util - com.jme3.audio.lwjgl + com.jme3.bullet.debug + com.jme3.bullet.control + com.jme3.bullet.control.ragdoll + com.jme3.bullet.collision + com.jme3.bullet.collision.shapes + com.jme3.bullet.collision.shapes.infos com.jme3.input.lwjgl - com.jme3.renderer.lwjgl + com.jme3.audio.lwjgl com.jme3.system.lwjgl + com.jme3.renderer.lwjgl com.jme3.network - com.jme3.network.base com.jme3.network.kernel - com.jme3.network.kernel.tcp com.jme3.network.kernel.udp + com.jme3.network.kernel.tcp + com.jme3.network.util com.jme3.network.message com.jme3.network.rmi + com.jme3.network.base com.jme3.network.serializing com.jme3.network.serializing.serializers + com.jme3.network.service + com.jme3.network.service.rpc + com.jme3.network.service.rpc.msg + com.jme3.network.service.serializer com.jme3.niftygui com.jme3.export.xml com.jme3.scene.plugins.fbx + com.jme3.scene.plugins.fbx.obj + com.jme3.scene.plugins.fbx.anim + com.jme3.scene.plugins.fbx.node + com.jme3.scene.plugins.fbx.misc + com.jme3.scene.plugins.fbx.material com.jme3.scene.plugins.fbx.file + com.jme3.scene.plugins.fbx.mesh com.jme3.scene.plugins.ogre com.jme3.scene.plugins.ogre.matext com.jme3.terrain + com.jme3.terrain.heightmap com.jme3.terrain.geomipmap + com.jme3.terrain.geomipmap.picking com.jme3.terrain.geomipmap.grid com.jme3.terrain.geomipmap.lodcalc com.jme3.terrain.geomipmap.lodcalc.util - com.jme3.terrain.geomipmap.picking - com.jme3.terrain.heightmap com.jme3.terrain.noise - com.jme3.terrain.noise.basis com.jme3.terrain.noise.filter - com.jme3.terrain.noise.fractal com.jme3.terrain.noise.modulator + com.jme3.terrain.noise.fractal + com.jme3.terrain.noise.basis ext/jme3-blender-3.1.0-snapshot-github.jar @@ -193,4 +202,4 @@ - + \ No newline at end of file diff --git a/sdk/jme3-core-libraries/nbproject/project.properties b/sdk/jme3-core-libraries/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-core-libraries/nbproject/project.properties +++ b/sdk/jme3-core-libraries/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-libraries/nbproject/project.xml b/sdk/jme3-core-libraries/nbproject/project.xml index 19469cf8a..c7b1f70f9 100644 --- a/sdk/jme3-core-libraries/nbproject/project.xml +++ b/sdk/jme3-core-libraries/nbproject/project.xml @@ -6,6 +6,44 @@ + org.ejml + org.ejml.interfaces.decomposition + org.ejml.interfaces.linsol + org.ejml.data + org.ejml.alg.dense.linsol + org.ejml.ops + org.ejml.factory + org.ejml.alg.fixed + org.ejml.alg.generic + org.ejml.alg.block + org.ejml.alg.block.decomposition.chol + org.ejml.alg.block.decomposition.qr + org.ejml.alg.block.decomposition.hessenberg + org.ejml.alg.block.decomposition.bidiagonal + org.ejml.alg.block.linsol.chol + org.ejml.alg.block.linsol.qr + org.ejml.alg.dense.decomposition + org.ejml.alg.dense.decomposition.chol + org.ejml.alg.dense.decomposition.lu + org.ejml.alg.dense.decomposition.qr + org.ejml.alg.dense.decomposition.hessenberg + org.ejml.alg.dense.decomposition.svd + org.ejml.alg.dense.decomposition.svd.implicitqr + org.ejml.alg.dense.decomposition.eig + org.ejml.alg.dense.decomposition.eig.watched + org.ejml.alg.dense.decomposition.eig.symm + org.ejml.alg.dense.decomposition.bidiagonal + org.ejml.alg.dense.mult + org.ejml.alg.dense.misc + org.ejml.alg.dense.linsol.chol + org.ejml.alg.dense.linsol.lu + org.ejml.alg.dense.linsol.qr + org.ejml.alg.dense.linsol.svd + org.ejml.simple + org.ejml.alg.dense.decompose + org.ejml.alg.dense.decompose.chol + org.ejml.alg.dense.decompose.lu + org.ejml.alg.dense.decompose.qr com.bulletphysics com.bulletphysics.collision.broadphase com.bulletphysics.collision.dispatch @@ -161,6 +199,22 @@ org.jglfont.impl.format.awt org.jglfont.impl + + ext/core-0.27.jar + release/modules/ext/core-0.27.jar + + + ext/dense64-0.27.jar + release/modules/ext/dense64-0.27.jar + + + ext/simple-0.27.jar + release/modules/ext/simple-0.27.jar + + + ext/denseC64-0.27.jar + release/modules/ext/denseC64-0.27.jar + ext/jbullet.jar release/modules/ext/jbullet.jar diff --git a/sdk/jme3-core-updatecenters/nbproject/genfiles.properties b/sdk/jme3-core-updatecenters/nbproject/genfiles.properties index 0dd897993..6b53da996 100644 --- a/sdk/jme3-core-updatecenters/nbproject/genfiles.properties +++ b/sdk/jme3-core-updatecenters/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=08468784 +build.xml.data.CRC32=e145fa2a build.xml.script.CRC32=cfa8d5c5 build.xml.stylesheet.CRC32=a56c6a5b@2.67.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=08468784 +nbproject/build-impl.xml.data.CRC32=e145fa2a nbproject/build-impl.xml.script.CRC32=270846fb nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 diff --git a/sdk/jme3-core-updatecenters/nbproject/project.properties b/sdk/jme3-core-updatecenters/nbproject/project.properties index 9d2616783..98f519f77 100644 --- a/sdk/jme3-core-updatecenters/nbproject/project.properties +++ b/sdk/jme3-core-updatecenters/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-core-updatecenters/nbproject/project.xml b/sdk/jme3-core-updatecenters/nbproject/project.xml index 3979d8b02..abc894aed 100644 --- a/sdk/jme3-core-updatecenters/nbproject/project.xml +++ b/sdk/jme3-core-updatecenters/nbproject/project.xml @@ -8,6 +8,8 @@ org.netbeans.modules.autoupdate.services + + 1.47.2 diff --git a/sdk/jme3-core-updatecenters/src/META-INF/services/org.netbeans.spi.autoupdate.KeyStoreProvider b/sdk/jme3-core-updatecenters/src/META-INF/services/org.netbeans.spi.autoupdate.KeyStoreProvider new file mode 100644 index 000000000..1af1a906c --- /dev/null +++ b/sdk/jme3-core-updatecenters/src/META-INF/services/org.netbeans.spi.autoupdate.KeyStoreProvider @@ -0,0 +1 @@ +com.jme3.gde.core.updatecenters.keystore.JmeKeyStoreProvider diff --git a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties index 5a898643f..eb84743c9 100644 --- a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties +++ b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties @@ -1,7 +1,7 @@ #jMP update centers -com_jme3_gde_core_update_center_nightly=http://updates.jmonkeyengine.org/nightly/3.0/plugins/updates.xml -com_jme3_gde_core_update_center_stable=http://updates.jmonkeyengine.org/stable/3.0/plugins/updates.xml -com_jme3_jmp_contributions_update_center=http://updates.jmonkeyengine.org/contributions/updates.xml +com_jme3_gde_core_update_center_nightly=http://updates.jmonkeyengine.org/nightly/3.1/plugins/updates.xml +com_jme3_gde_core_update_center_stable=http://updates.jmonkeyengine.org/stable/3.1/plugins/updates.xml +com_jme3_jmp_contributions_update_center=http://updates.jmonkeyengine.org/contrib/3.1/updates.xml #jMP update centers Services/AutoupdateType/com_jme3_gde_core_update_center_nightly.instance=jMonkeyEngine SDK Nightly (Breaks!) diff --git a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/JmeKeyStoreProvider.java b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/JmeKeyStoreProvider.java new file mode 100644 index 000000000..d94e548bd --- /dev/null +++ b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/JmeKeyStoreProvider.java @@ -0,0 +1,47 @@ +package com.jme3.gde.core.updatecenters.keystore; + +import java.io.IOException; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import org.netbeans.spi.autoupdate.KeyStoreProvider; +import org.openide.util.Exceptions; + +/** + * Loads the jMonkeyEngine SDK Plugins certificates into the AutoUpdate system. + * + * @author Kirill Vainer + */ +public class JmeKeyStoreProvider implements KeyStoreProvider { + + @Override + public KeyStore getKeyStore() { + InputStream in = null; + try { + in = JmeKeyStoreProvider.class.getResourceAsStream("trustedcerts.jks"); + KeyStore store = KeyStore.getInstance("JKS"); + store.load(in, "trustedcerts".toCharArray()); + return store; + } catch (KeyStoreException ex) { + Exceptions.printStackTrace(ex); + } catch (IOException ex) { + Exceptions.printStackTrace(ex); + } catch (NoSuchAlgorithmException ex) { + Exceptions.printStackTrace(ex); + } catch (CertificateException ex) { + Exceptions.printStackTrace(ex); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException ex) { + Exceptions.printStackTrace(ex); + } + } + } + return null; + } + +} diff --git a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/trustedcerts.jks b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/trustedcerts.jks new file mode 100644 index 000000000..fef5a315c Binary files /dev/null and b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/trustedcerts.jks differ diff --git a/sdk/jme3-core/nbproject/project.properties b/sdk/jme3-core/nbproject/project.properties index 4206d1dff..88500da6c 100644 --- a/sdk/jme3-core/nbproject/project.properties +++ b/sdk/jme3-core/nbproject/project.properties @@ -1,10 +1,10 @@ #Thu, 25 Aug 2011 20:26:48 +0200 file.reference.DDSUtils.jar=release/modules/ext/DDSUtils.jar #Thu, 25 Aug 2011 19:32:54 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true project.license=jme diff --git a/sdk/jme3-dark-laf/README.md b/sdk/jme3-dark-laf/README.md new file mode 100644 index 000000000..0dbb8d231 --- /dev/null +++ b/sdk/jme3-dark-laf/README.md @@ -0,0 +1,10 @@ +# DarkMonkey +Netbeans LAF and FAC combo - uses NimROD and Obsidian + +This is a plug-in for for Netbeans 8+ (well, the version it was developed for is 8.0.2). We wanted a dark theme variant for the jMonkeyEngine 3.1 sdk, so we made one. Enjoy! + +![DarkMonkey Screenshot](http://jme-hub-cdn.jmonkeyengineor.netdna-cdn.com/uploads/default/_optimized/fdd/136/87eb8a1efd_690x387.png) + +## Features +- Adds the DarkMonkey LaF to the Netbeans 8 environment under appearance - It's NimROD with a couple of tweaks. We've just adapted Nilo's wonderful project for the look we were going for. +- Adds the DarkMonkey FaC to the editor profile listing - It's Obsidian with some tweaks. DejaVu Sans Mono brings some sophistication to an otherwise courier world. diff --git a/sdk/jme3-dark-laf/build.xml b/sdk/jme3-dark-laf/build.xml new file mode 100644 index 000000000..6a5f08ba7 --- /dev/null +++ b/sdk/jme3-dark-laf/build.xml @@ -0,0 +1,8 @@ + + + + + + Builds, tests, and runs the project org.jme3.netbeans.plaf.darkmonkey. + + diff --git a/sdk/jme3-dark-laf/manifest.mf b/sdk/jme3-dark-laf/manifest.mf new file mode 100644 index 000000000..b1505dfad --- /dev/null +++ b/sdk/jme3-dark-laf/manifest.mf @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +OpenIDE-Module: org.jme3.netbeans.plaf.darkmonkey/1 +OpenIDE-Module-Implementation-Version: 0 +OpenIDE-Module-Install: org/jme3/netbeans/plaf/darkmonkey/Installer.class +OpenIDE-Module-Layer: org/jme3/netbeans/plaf/darkmonkey/layer.xml +OpenIDE-Module-Localizing-Bundle: org/jme3/netbeans/plaf/darkmonkey/Bundle.properties + diff --git a/sdk/jme3-dark-laf/nbproject/build-impl.xml b/sdk/jme3-dark-laf/nbproject/build-impl.xml new file mode 100644 index 000000000..2057e4b42 --- /dev/null +++ b/sdk/jme3-dark-laf/nbproject/build-impl.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + You must set 'suite.dir' to point to your containing module suite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/nbproject/genfiles.properties b/sdk/jme3-dark-laf/nbproject/genfiles.properties new file mode 100644 index 000000000..9adf50476 --- /dev/null +++ b/sdk/jme3-dark-laf/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=8f3042a8 +build.xml.script.CRC32=c15f5ee0 +build.xml.stylesheet.CRC32=a56c6a5b@2.67.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=8f3042a8 +nbproject/build-impl.xml.script.CRC32=4524e469 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 diff --git a/sdk/jme3-dark-laf/nbproject/project.properties b/sdk/jme3-dark-laf/nbproject/project.properties new file mode 100644 index 000000000..c023595b6 --- /dev/null +++ b/sdk/jme3-dark-laf/nbproject/project.properties @@ -0,0 +1,8 @@ +file.reference.nimrodlf.jar=release/modules/ext/nimrodlf.jar +javac.source=1.7 +javac.compilerargs=-Xlint -Xlint:-serial +license.file=../license-jme.txt +nbm.homepage=http://www.jmonkeyengine.org +nbm.module.author=Charles Anderson, R\u00e9my Bouquet +nbm.needs.restart=true +spec.version.base=3.1.0 diff --git a/sdk/jme3-dark-laf/nbproject/project.xml b/sdk/jme3-dark-laf/nbproject/project.xml new file mode 100644 index 000000000..9d6be0056 --- /dev/null +++ b/sdk/jme3-dark-laf/nbproject/project.xml @@ -0,0 +1,49 @@ + + + org.netbeans.modules.apisupport.project + + + org.jme3.netbeans.plaf.darkmonkey + + + + org.openide.awt + + + + 7.62.1 + + + + org.openide.modules + + + + 7.43.1 + + + + org.openide.util + + + + 8.39.1 + + + + org.openide.windows + + + + 6.71.1 + + + + + + ext/nimrodlf.jar + release/modules/ext/nimrodlf.jar + + + + diff --git a/sdk/jme3-dark-laf/nbproject/suite.properties b/sdk/jme3-dark-laf/nbproject/suite.properties new file mode 100644 index 000000000..29d7cc9bd --- /dev/null +++ b/sdk/jme3-dark-laf/nbproject/suite.properties @@ -0,0 +1 @@ +suite.dir=${basedir}/.. diff --git a/sdk/jme3-dark-laf/release/modules/ext/nimrodlf.jar b/sdk/jme3-dark-laf/release/modules/ext/nimrodlf.jar new file mode 100644 index 000000000..676f9b592 Binary files /dev/null and b/sdk/jme3-dark-laf/release/modules/ext/nimrodlf.jar differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Bundle.properties b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Bundle.properties new file mode 100644 index 000000000..1cc1695f7 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Bundle.properties @@ -0,0 +1,10 @@ +OpenIDE-Module-Name=DarkMonkey +OpenIDE-Module-Display-Category=Appearance +OpenIDE-Module-Short-Description=Contains DarkMonkey theme for the JME3.1 stable release +OpenIDE-Module-Long-Description=\ +


DarkMonkey Theme

This is a Fonts/Colors and LookAndFeel combo that utilizes James McFadden's Obsidian Fonts/Colorsand Nilo Gonzalez's Nimrod LookAndFeel which isbased on the Metal LookAndFeel. \ + This module just checks and sees if the user already has the components, and if not, installs the theme and activates a few options:\n

  • under Tools - Options - Appearance - LookAndFeel it will have "DarkMonkey" , available.\ +
  • It also adds a Fonts/Colors Profile called "Dark Monkey".\ +

We hope you like it!\ +

For More Information visit: DarkMonkey Development Thread
+ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DMUtils.java b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DMUtils.java new file mode 100644 index 000000000..40470a535 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DMUtils.java @@ -0,0 +1,288 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jme3.netbeans.plaf.darkmonkey; + +import java.awt.Color; +import java.awt.Font; +import java.awt.FontFormatException; +import java.awt.GraphicsEnvironment; +import java.awt.image.BandedSampleModel; +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.File; +import java.io.IOException; +import java.io.InputStream; +import javax.imageio.ImageIO; + +/** + * I figured it would be best to have a Utilities type class to store the + * Methods I commonly use. Resources, registering stuff, resolving, transforming + * and so on... + * + * @author charles + */ +public class DMUtils { + + /** + *

+ * This method loads a picture from a relative path string. The relative + * path's root directory is understood to be inside of a jar... and in + * relation to the package of the referring Object instance. + *

+ *

+ * For example: if the object is an instance of + * org.jme3.netbeans.plaf.darkmonkey.DarkMonkeyIconFactory.class, and the + * string is "icons/MyCloseIcon.png", it will attempt to load + * org/jme3/netbeans/plaf/darkmonkey/icons/MyCloseIcon.png from + * DarkMonkeyIconFactory's jar file. + *

+ * It will print a stack trace if you get the relative path wrong. + * + * @param refObj - Reference Object(Object) - meant for a standard 'this' + * call, though any Instantiated class can be used. This is part of a + * workaround for Netbean's multiple class loader system. + * @param fileName - File Name(String) - the path to an image relative to + * the Reference Object's location in a jar file. + * @return BufferedImage - Freshly converted from the image file found at + * the location. + */ + public static BufferedImage loadImagefromJar(Object refObj, String fileName) { + BufferedImage bi = null; + try { + bi = ImageIO.read(refObj.getClass().getResourceAsStream(fileName)); + } catch (IOException e) { + // File is probably referenced wrong or "mispleled"... lol. + e.printStackTrace(); + } + return bi; + } + + /**

+ * This utility method is designed to Load OpenType/TrueType fonts into the + * current Runtime Environment without installing them to the OS. It takes + * the base path of the refObj and loads font files located relative to it. + * It checks to make sure that the fonts are not already installed in the system + * OS, first. If they are already installed, it does nothing more. + *

+ * Typical Usage - DMUtils.loadFontsFromJar(this, someFontFiles);
+ * and then someFontFiles[0] would contain something like "myfonts/DisFontPlain.ttf" + *

+ * @param refObj - Object - Usually just a *this*, but useful for a multiClassLoader + * type situation. + * @param fileNames - String[] - an array of {relative path + filename} strings for loading + * TrueType or OpenType fonts + */ + public static void loadFontsFromJar(Object refObj, String[] fileNames) { + //first, we grab ahold of what all fonts are in the JRE's system + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + Font[] fontsListing = ge.getAllFonts(); + + /* // this can be uncommented if you want to see all the fonts in the JRE + for (Font fontInListing : fontsListing) { + System.out.println(fontInListing.getFontName() + " : " + fontInListing.getFamily()); + } + */ + + // Then we go and process the incoming streams + InputStream inStream; + Font checkFont; + try { + toNextFileName: + for (String fileName : fileNames) {// load up the fileName to process... + checkFont = Font.createFont(Font.TRUETYPE_FONT, refObj.getClass().getResourceAsStream(fileName)); + for (Font fontInListing : fontsListing) {// check if it's already on the list + if (fontInListing.getFontName().equals(checkFont.getFontName())) { + continue toNextFileName; //head to the next file if we find it... + } + } + ge.registerFont(checkFont);// and register it if we don't.... + } + } catch (FontFormatException | IOException e) { + // a File is probably referenced wrong or "mispleled"... lol. + // you can alternativly send a single String for debugging purposes + e.printStackTrace(); + } + + } + + /** + * This method transforms the inputed BufferedImage by the supplied Color[]. + * The behavior treats the Color[] as Ordered Passes A, R, G, B for .length + * 4 or more. It treats it as Ordered Passes R, G, B only for .length 3 or + * less. + * + * @param colorSet Color[] - that processes [1..4] up to four palette + * colors. 3 or less uses R,G,B passes only. 4 uses A,R,G,B and ignores + * anything more. + * @param clearToColorRequested - Color - A color to Blend with the First + * Translucent Pass - Optional + * @param argbMappedBufferedImage - BufferedImage - The image containing + * Channels as Alpha for the Palette + * @return BufferedImage - a new BufferedImage() transformed by the palette. + */ + public static BufferedImage paletteSwapARGB8(Color[] colorSet, Color clearToColorRequested, BufferedImage argbMappedBufferedImage) { + if (argbMappedBufferedImage == null) { + return null; //S.E.P. + } + final Color BLACK_NO_ALPHA = new Color(0x00000000); + final Color WHITE_NO_ALPHA = new Color(0x00FFFFFF); + final int ALPHA = 3; // this is some static mapping for... + final int RED = 0; // readability in the following... + final int GREEN = 1; // Magic code section of band processing. + final int BLUE = 2; + final int[] orderedBands = {ALPHA, RED, GREEN, BLUE}; + //first we prep a cmap with blank passes and + Color[] cMap = {BLACK_NO_ALPHA, BLACK_NO_ALPHA, BLACK_NO_ALPHA, BLACK_NO_ALPHA}; + boolean clearColorFound = false; + Color clearToColor = BLACK_NO_ALPHA; + if (colorSet != null) { //if we get a null colorSet... it's all mapped to clear. + if (colorSet.length > cMap.length) { // if colorSet is more than 4, we only proces up to 4 + for (int i = 0; i < cMap.length; i++) { + if (colorSet[i] != null) { + if (!clearColorFound) { + clearColorFound = true; + clearToColor = colorSet[i]; + } + cMap[orderedBands[i]] = colorSet[i]; // and finally, if any of the Colors are null... invisible pass... + } + } + } else { + int startOffset = 0; + if (colorSet.length < 4) // if less than standard size, assume RGB model + { + startOffset++; // and "blank" the alpha color pass. + } + for (int i = 0; i < colorSet.length; i++) { + if (colorSet[i] != null) { + if (!clearColorFound) { + clearColorFound = true; + clearToColor = colorSet[i]; + } + cMap[orderedBands[i + startOffset]] = colorSet[i]; + } + } + } + } + + // finally adjust the clearToColor if one was requested + if (clearToColorRequested != null) { + clearToColor = clearToColorRequested; + } + //Next we'll switch to Rasters to easily handle floating point precision + // operations upon the individual channels. + + WritableRaster outRaster, inRaster; + int w = argbMappedBufferedImage.getWidth(); + int h = argbMappedBufferedImage.getHeight(); + BandedSampleModel inSM = new BandedSampleModel(DataBuffer.TYPE_FLOAT, w, h, 4); + DataBufferFloat inDBF = new DataBufferFloat((w * h), 4);//4 banks, and total size + inRaster = Raster.createWritableRaster(inSM, inDBF, null); // that null just means point 0, 0 (top/left) + outRaster = inRaster.createCompatibleWritableRaster(w, h); + float[] cMaptoFlArray, outColortoFlArray, clearColortoFlArray; + float inBandAsAlpha; + Color paletteColor; + // now we convert from W/E the argbMappedBufferedImage's format to + // our normalized [0f..1f] RGBA raster + outColortoFlArray = new float[]{0f, 0f, 0f, 0f}; // or new float[4]... w/e + clearColortoFlArray = clearToColor.getRGBComponents(new float[4]); + clearColortoFlArray[ALPHA] = 0f; + for (int y = 0; y < h; y++) { + for (int x = 0; x < w; x++) { + int packedPixel = argbMappedBufferedImage.getRGB(x, y); + int testing; + float ftesting; + //outColortoFlArray[ALPHA] = (((packedPixel >> 24) & 0xFF) / 255); + testing = packedPixel; + testing = testing >> 24; + testing = testing & 0xFF; + ftesting = testing; + ftesting = ftesting / 255; + outColortoFlArray[ALPHA] = ftesting; + + //outColortoFlArray[RED] = (((packedPixel >> 16) & 0xFF) / 255); + testing = packedPixel; + testing = testing >> 16; + testing = testing & 0xFF; + ftesting = testing; + ftesting = ftesting / 255; + outColortoFlArray[RED] = ftesting; + + //outColortoFlArray[GREEN] = (((packedPixel >> 8) & 0xFF) / 255); + testing = packedPixel; + testing = testing >> 8; + testing = testing & 0xFF; + ftesting = testing; + ftesting = ftesting / 255; + outColortoFlArray[GREEN] = ftesting; + + //outColortoFlArray[BLUE] = ( (packedPixel & 0xFF) / 255); + testing = packedPixel; + testing = testing & 0xFF; + ftesting = testing; + ftesting = ftesting / 255; + outColortoFlArray[BLUE] = ftesting; + + inRaster.setPixel(x, y, outColortoFlArray); + outRaster.setPixel(x, y, clearColortoFlArray); + } + } + // next, we process all bands in order - a "band" being one channel of A,R,G,B. + // as each band is processed the outRaster keeps getting "resampled" to apply + // the next band properly. all values are considered normalized [0f..1f] + for (int band : orderedBands) { + paletteColor = cMap[band]; + cMaptoFlArray = paletteColor.getRGBComponents(new float[4]);// this nullifies translucency + if (paletteColor != BLACK_NO_ALPHA) { + for (int y = 0; y < h; y++) { + for (int x = 0; x < w; x++) { + //inBandAsAlpha = inRaster.getSample(x, y, band); + inBandAsAlpha = inRaster.getSampleFloat(x, y, band); + outColortoFlArray = outRaster.getPixel(x, y, new float[4]); + outColortoFlArray[RED] = (outColortoFlArray[RED] + * (1f - (inBandAsAlpha * cMaptoFlArray[ALPHA]))) + + (cMaptoFlArray[RED] * (inBandAsAlpha * cMaptoFlArray[ALPHA])); + outColortoFlArray[GREEN] = (outColortoFlArray[GREEN] + * (1f - (inBandAsAlpha * cMaptoFlArray[ALPHA]))) + + (cMaptoFlArray[GREEN] * (inBandAsAlpha * cMaptoFlArray[ALPHA])); + outColortoFlArray[BLUE] = (outColortoFlArray[BLUE] + * (1f - (inBandAsAlpha * cMaptoFlArray[ALPHA]))) + + (cMaptoFlArray[BLUE] * (inBandAsAlpha * cMaptoFlArray[ALPHA])); + + outColortoFlArray[ALPHA] = (outColortoFlArray[ALPHA] + * (1f - (inBandAsAlpha * cMaptoFlArray[ALPHA]))) + + (cMaptoFlArray[ALPHA] * (inBandAsAlpha * cMaptoFlArray[ALPHA])); + + outRaster.setPixel(x, y, outColortoFlArray); + } + } + } + } + + //then we convert n' ship + BufferedImage returnBI = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + for (int y = 0; y < h; y++) { + for (int x = 0; x < w; x++) { + outColortoFlArray = outRaster.getPixel(x, y, new float[4]); + int packedColor = ((int) (outColortoFlArray[ALPHA] * 255f) << 24) + | ((int) (outColortoFlArray[RED] * 255f) << 16) + | ((int) (outColortoFlArray[GREEN] * 255f) << 8) + | ((int) (outColortoFlArray[BLUE] * 255f)); + returnBI.setRGB(x, y, packedColor); + } + } + + return returnBI; + } + + public static BufferedImage paletteSwapARGB8(Color[] colorSet, BufferedImage argbMappedBufferedImage) { + + return paletteSwapARGB8(colorSet, null, argbMappedBufferedImage); + } + +} diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkey.theme b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkey.theme new file mode 100644 index 000000000..c16f368da --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkey.theme @@ -0,0 +1,11 @@ +nimrodlf.p1=#77411D +nimrodlf.p2=#9E5F28 +nimrodlf.p3=#948519 +nimrodlf.s1=#303030 +nimrodlf.s2=#3A3A3A +nimrodlf.s3=#515151 +nimrodlf.w=#262626 +nimrodlf.b=#E8EAE0 +nimrodlf.menuOpacity=219 +nimrodlf.frameOpacity=180 +nimrodlf.font=DejaVu Sans Condensed-BOLD-12 diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyIconFactory.java b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyIconFactory.java new file mode 100644 index 000000000..4c640851b --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyIconFactory.java @@ -0,0 +1,153 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jme3.netbeans.plaf.darkmonkey; + +import com.nilo.plaf.nimrod.NimRODIconFactory; +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.image.BandedSampleModel; +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 javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.plaf.UIResource; + +/** + * This class provides for overrides on the system Icons from the + * NimROD look and feel + * @author charles + */ +public class DarkMonkeyIconFactory extends NimRODIconFactory{ + private static Icon treeCollapsedIcon; + private static Icon treeExpandedIcon; + + public static Icon getTreeCollapsedIcon(){ + if(treeCollapsedIcon == null){ + treeCollapsedIcon = new TreeCollapsedIcon(); + } + + return treeCollapsedIcon; + } + public static Icon getTreeExpandedIcon(){ + if(treeExpandedIcon == null){ + treeExpandedIcon = new TreeExpandedIcon(); + } + + return treeExpandedIcon; + } + + + private static class TreeCollapsedIcon implements Icon, UIResource, Serializable{ + private int w, h; + ImageIcon preProcessed; + { + w = 18; + h = 18; + preProcessed = null; + } + + public TreeCollapsedIcon(){ //maybe THIS is all I need, eh? + w = 18; + h = 18; + preProcessed = null; + } + + @Override + public void paintIcon(Component c, Graphics g, int x, int y) { + if(preProcessed != null){ + preProcessed.paintIcon(c, g, x, y); + return; + } + + //process for first time, unless this gets "uninitialized" by + // UIResource calls; + BufferedImage bi = DMUtils.loadImagefromJar(this, "icons/nehonC2.png"); + // start the experiments! + + Color[] normColorSet = {null, DarkMonkeyLookAndFeel.getWhite(), + null, DarkMonkeyLookAndFeel.getPrimaryControl()}; + bi = DMUtils.paletteSwapARGB8(normColorSet, bi); + // end experiment, back to old code + ImageIcon ii = new ImageIcon(bi); + Image scaled = ii.getImage(); + ImageIcon preProcess = new ImageIcon(scaled.getScaledInstance(w, h, Image.SCALE_SMOOTH)); + preProcess.paintIcon(c, g, x, y); + preProcessed = preProcess; + } + + @Override + public int getIconWidth() { + return w; + } + + @Override + public int getIconHeight() { + return h; + } + + } + + private static class TreeExpandedIcon implements Icon, UIResource, Serializable{ + private int w, h; + ImageIcon preProcessed; + { + w = 18; + h = 18; + preProcessed = null; + } + + + public TreeExpandedIcon(){ //maybe THIS is all I need, eh? + w = 18; + h = 18; + preProcessed = null; + } + + @Override + public void paintIcon(Component c, Graphics g, int x, int y) { + if(preProcessed != null){ + preProcessed.paintIcon(c, g, x, y); + return; + } + + //process for first time, unless this gets "uninitialized" by + // UIResource calls; + + BufferedImage bi = DMUtils.loadImagefromJar(this, "icons/nehonE2.png"); + Color[] normColorSet = { DarkMonkeyLookAndFeel.getWhite(), + null, DarkMonkeyLookAndFeel.getPrimaryControl()}; + bi = DMUtils.paletteSwapARGB8(normColorSet, bi); + + ImageIcon ii = new ImageIcon(bi); + Image scaled = ii.getImage(); + + ImageIcon preProcess = new ImageIcon(scaled.getScaledInstance(w, h, Image.SCALE_DEFAULT)); + + preProcess.paintIcon(c, g, x, y); + preProcessed = preProcess; + } + + @Override + public int getIconWidth() { + return w; + } + + @Override + public int getIconHeight() { + return h; + } + + } + + + +} diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyLookAndFeel.java b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyLookAndFeel.java new file mode 100644 index 000000000..a923a911e --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyLookAndFeel.java @@ -0,0 +1,111 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jme3.netbeans.plaf.darkmonkey; + +import com.nilo.plaf.nimrod.NimRODTheme; +import java.awt.Color; +import java.awt.Font; +import java.util.Enumeration; +import javax.swing.ImageIcon; +import javax.swing.UIDefaults; + +/** + * The DarkMonkey look and feel class Extends the Nimrod LAF, which in turn, + * extends Metal. The version of Nimrod used is 1.2b obtained from:
+ * + * http://nilogonzalez.es/nimrodlf/download-en.html + *

A copy of the jar and source used for this project is in the ext/ folder. + *

+ * + * @author Charles Anderson + */ +public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFeel{ + + public static final String dmLAFDefault = "DarkMonkey.theme"; + protected static NimRODTheme nrTheme = new NimRODTheme(); + + public DarkMonkeyLookAndFeel(){ + super(); + // Todo: replace following code with proper loading + // From DarkMonkey.theme + NimRODTheme nt = new NimRODTheme(); + + nt.setBlack(Color.decode("#E8EAE0")); + nt.setWhite(Color.decode("#262626")); + nt.setPrimary1(Color.decode("#77411D")); + nt.setPrimary2(Color.decode("#9E5F28")); + nt.setPrimary3(Color.decode("#948519")); + nt.setSecondary1(Color.decode("#303030")); + nt.setSecondary2(Color.decode("#3A3A3A")); + nt.setSecondary3(Color.decode("#515151")); + nt.setFrameOpacity(180); + nt.setMenuOpacity(219); + nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12")); + + setCurrentTheme(nt); + + } + + /** + * This method override, getID() returns the String "DarkMonkey" for + * registering this Look And Feel with the UImanager. + * @return String "DarkMonkey" + */ + @Override + public String getID() { + return "DarkMonkey"; + } + + /** + * This method override, getName() returns the String "DarkMonkey" for + * its Look and Feel Name. I don't know that this is important, but is + * overridden anyway, for completion. + * @return String "DarkMonkey" + */ + @Override + public String getName() { + return "DarkMonkey"; + } + + /** + * This method override, getDescription() returns the String + * "Look and Feel DarkMonkey - 2015, based on NimROD 2007" for + * instances of future programming that might use it as a tool tip or + * small descriptor in their Look and Feel modules. + * @return String "Look and Feel DarkMonkey - 2015, based on NimROD 2007" + */ + @Override + public String getDescription() { + return "Look and Feel DarkMonkey - 2015, based on NimROD 2007"; + } + + + @Override + protected void initClassDefaults( UIDefaults table) { + super.initClassDefaults( table); + /* + for( Enumeration en = table.keys(); en.hasMoreElements(); ) { + System.out.println( "[" + en.nextElement() + "]"); + } + */ + } + + @Override + protected void initComponentDefaults( UIDefaults table) { + super.initComponentDefaults( table); + + table.put("Tree.collapsedIcon", DarkMonkeyIconFactory.getTreeCollapsedIcon()); + table.put("Tree.expandedIcon", DarkMonkeyIconFactory.getTreeExpandedIcon()); + // + /* + for( Enumeration en = table.keys(); en.hasMoreElements(); ) { + System.out.println( "[" + en.nextElement() + "]"); + } + */ + + } + +} diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyValidator.java b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyValidator.java new file mode 100644 index 000000000..cc5ef7c70 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyValidator.java @@ -0,0 +1,29 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +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.windows.OnShowing; + +/** + * This is something that would be used once the nbm format is no longer + * needed and is absorbed by SDK downloadable. + * @author charles + */ +@OnStart +public class DarkMonkeyValidator implements Runnable{ + + @Override + public void run() { + + //assert EventQueue.isDispatchThread(); // this is for @OnShowing + //JOptionPane.showMessageDialog(null,"Hello from the Validator"); + } + +} diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Installer.java b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Installer.java new file mode 100644 index 000000000..8ceda6a48 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/Installer.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jme3.netbeans.plaf.darkmonkey; + +import java.awt.Font; +import java.awt.GraphicsEnvironment; +import java.io.File; +import javax.swing.UIManager; +import org.openide.modules.ModuleInstall; + +public class Installer extends ModuleInstall { + + @Override + public void restored() { + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo( + new DarkMonkeyLookAndFeel().getName(), + DarkMonkeyLookAndFeel.class.getName())); + // TODO + + String[] fontsToLoad = { + "fonts/DejaVuSans.ttf", + "fonts/DejaVuSans-Bold.ttf", + "fonts/DejaVuSans-Oblique.ttf", + "fonts/DejaVuSans-BoldOblique.ttf", + "fonts/DejaVuSansCondensed.ttf", + "fonts/DejaVuSansCondensed-Bold.ttf", + "fonts/DejaVuSansCondensed-Oblique.ttf", + "fonts/DejaVuSansCondensed-BoldOblique.ttf", + "fonts/DejaVuSansMono.ttf", + "fonts/DejaVuSansMono-Bold.ttf", + "fonts/DejaVuSansMono-Oblique.ttf", + "fonts/DejaVuSansMono-BoldOblique.ttf" + }; + DMUtils.loadFontsFromJar(this, fontsToLoad); + } + +} diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/JunkSnippet.txt b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/JunkSnippet.txt new file mode 100644 index 000000000..7bbdbc2a7 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/JunkSnippet.txt @@ -0,0 +1,144 @@ + public static void loadFontsFromJar(Object refObj, String relPath) { + //first, we grab ahold of what all fonts are in the JRE's system + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + String[] fontFamilies = ge.getAvailableFontFamilyNames(); + //Next we get a listing of all of the fonts in the refObj's jar at relPath + ZipFile zipFile = new ZipFile("C:/test.zip"); + InputStream stream; + Enumeration entries = zipFile.entries(); + try { + bi = ImageIO.read(refObj.getClass().getResourceAsStream(fileName)); + } catch (IOException e) { + // File is probably referenced wrong or "mispleled"... lol. + e.printStackTrace(); + } + + while (entries.hasMoreElements()) { + ZipEntry entry = entries.nextElement(); + stream = zipFile.getInputStream(entry); + stream.close(); + } + + ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("A.ttf"))); + + } + + /** + * Note from Charles: DO NOT USE - Retain it though :) this method correctly + * does get the path... of Netbeans.. lol... ... Todo: adjust this to work + * with concepts from the LoadImagefromJar... ... and we can make it work + * for custom defined themes dynamically in conjunction with the + * functionality available from Nilo's NimROD base. END NOTE... + * + * @param relativePath + * @return + * @throws NoSuchFileException + */ + public static String relpath(String relativePath) { + //TODO fix the following statement and we can start having dynamic LaF adjustment - Charles + final File f = new File(DMUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath()); + //END TODO - Charles + String returnString; + int i; + returnString = f.getPath(); + i = returnString.indexOf("org-jme3-netbeans"); // This would have to be adjusted as well - Charles + returnString = returnString.substring(0, i); + returnString = returnString.replace(File.separatorChar, '/') + relativePath; + File check = new File(returnString); + + return returnString; + + } + +This next bit is from the AnnotationType overrides in the layer.xml..... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/README.txt b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/README.txt new file mode 100644 index 000000000..109c25481 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/README.txt @@ -0,0 +1,42 @@ +- Note from Charles - +Ok, I think I have everything covered for community involvement: +If you contribute make sure to toss your name into the AUTHORS.txt file +for the proper directory. Make sure to toss in commenting and supply JavaDoc +for Methods / Classes. Otherwise, have fun with it! + +Structure: +-layer.xml contains the FAC side of this project. +-DarkMonkeyLookAndFeel contains the LAF side of this project. +-Installer is responsible for making sure LAF side and unregistered fonts are + available for each instance of netbeans. +-DMUtils contains resource/file methods for base IO or resource transformations +-DarkMonkeyValidator is a placeholder launchpoint snippet for conversion from + nbm format to a form that would integrate with an SDK downloadable build + (it is unnecessary as-is. Would replace Installer, functionally) +-DarkMonkey.theme is the desired way to use nimrodlf (unimplemented at current time) +-DarkMonkeyIconFactory produces images/icons for the small/fixed size level + -Tree.expandedIcon is overridden + -Tree.collapsedIcon is overridden + - more can be added +-Bundle.properties contains one of the cooler module description pages, ever*. + -* COOLEST. DESCRIPTION. EVER. (I'm cereal! / lol! /omg!) + +Directory Structure: +org.jme3.netbeans.plaf.darkmonkey is considered root for the relative path calls +that you will see in code. *Especially* if DMUtils is involved. + -ext/ or external, currently contains nimrodlf.jar and nimrodlf_src.zip + -fac/ or FontsColors, contains the FontsColors.xml files for layer.xml to + place into netbean's xmlfilesytem. + -fac/AnnotationTypes/ contains the Annotation.xml files for layer.xml to + place into netbean's xmlfilesytem. *Unimplemented* Only if the sidebar + icons for breakpoints and such should be replaced. + -fac/AnnotationTypes/icons *Unimplemented* *Does not exist yet* see above. + -fonts/ *unimplented* contains the physical .ttf fonts used by the LAF and FAC sides. + -icons/ contains image resources for LAF side. + + +Current Todo List: +-fix bug in src for nimrodlf.jar rebuild in ext/ + - Bug has to do with GridBagLayout and other such stuff where preferredSize + is derived. +-add font check/load code for fonts/. see JunkSnippet.txt for some proto work. \ No newline at end of file diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/.nbattrs b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/.nbattrs new file mode 100644 index 000000000..7ecdd8f3d --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/.nbattrs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint.xml new file mode 100644 index 000000000..ab5cdb3a5 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_broken.xml new file mode 100644 index 000000000..0c910da14 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_broken.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_stroke.xml new file mode 100644 index 000000000..b7f6e535f --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/Breakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CallSite.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CallSite.xml new file mode 100644 index 000000000..97f28c4ed --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CallSite.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint.xml new file mode 100644 index 000000000..9f237ae65 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint_stroke.xml new file mode 100644 index 000000000..d6d6f8e91 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/ClassBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint.xml new file mode 100644 index 000000000..8642294c0 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_broken.xml new file mode 100644 index 000000000..19a2e232e --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_broken.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_stroke.xml new file mode 100644 index 000000000..eb206c4d3 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CondBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpression.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpression.xml new file mode 100644 index 000000000..fdec15548 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpression.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine.xml new file mode 100644 index 000000000..686a5e530 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_BP.xml new file mode 100644 index 000000000..30d316146 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_BP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_CBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_CBP.xml new file mode 100644 index 000000000..f0595e41a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_CBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DBP.xml new file mode 100644 index 000000000..8b1342b71 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DCBP.xml new file mode 100644 index 000000000..5a11a7c76 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentExpressionLine_DCBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC.xml new file mode 100644 index 000000000..93e5ef58f --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2.xml new file mode 100644 index 000000000..ece9b3616 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2LinePart.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2LinePart.xml new file mode 100644 index 000000000..99dd6d4aa --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2LinePart.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_BP.xml new file mode 100644 index 000000000..b3ed82ba3 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_BP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_DBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_DBP.xml new file mode 100644 index 000000000..30c6f72d6 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPC2_DBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPCLinePart.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPCLinePart.xml new file mode 100644 index 000000000..9b8feebab --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/CurrentPCLinePart.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint.xml new file mode 100644 index 000000000..75294be39 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint_stroke.xml new file mode 100644 index 000000000..9ba03221a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint.xml new file mode 100644 index 000000000..8d71638fa --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint_stroke.xml new file mode 100644 index 000000000..d858e4c28 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledClassBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint.xml new file mode 100644 index 000000000..ce7ae7b9a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint_stroke.xml new file mode 100644 index 000000000..d87175748 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledCondBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint.xml new file mode 100644 index 000000000..730360695 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint_stroke.xml new file mode 100644 index 000000000..9df689cdf --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledFieldBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint.xml new file mode 100644 index 000000000..993af856e --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint_stroke.xml new file mode 100644 index 000000000..1d6b5f09b --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/DisabledMethodBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint.xml new file mode 100644 index 000000000..1c816c6c6 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint_stroke.xml new file mode 100644 index 000000000..a30520f2d --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/FieldBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint.xml new file mode 100644 index 000000000..6bc43a6e4 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint_stroke.xml new file mode 100644 index 000000000..f235a9a32 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/MethodBreakpoint_stroke.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread.xml new file mode 100644 index 000000000..8b476a25d --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP.xml new file mode 100644 index 000000000..b37c17ca2 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP_broken.xml new file mode 100644 index 000000000..8477ea95e --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_BP_broken.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_DBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_DBP.xml new file mode 100644 index 000000000..b3633a32a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_DBP.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC.xml new file mode 100644 index 000000000..b4ecab2ae --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC_BP.xml new file mode 100644 index 000000000..ea4733484 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThread_PC_BP.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads.xml new file mode 100644 index 000000000..fbc91baee --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP.xml new file mode 100644 index 000000000..939a55a8c --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP_broken.xml new file mode 100644 index 000000000..417d2f742 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_BP_broken.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_DBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_DBP.xml new file mode 100644 index 000000000..5fce8a876 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_DBP.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_PC_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_PC_BP.xml new file mode 100644 index 000000000..cedc279dd --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/OtherThreads_PC_BP.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP.xml new file mode 100644 index 000000000..ce0a84fcf --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_broken.xml new file mode 100644 index 000000000..bc39dc5f4 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_broken.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_stroke.xml new file mode 100644 index 000000000..97b4a7f80 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_BP_stroke.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP.xml new file mode 100644 index 000000000..2e03f914c --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_broken.xml new file mode 100644 index 000000000..9578d867a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_broken.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_stroke.xml new file mode 100644 index 000000000..6141bc1bd --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_CBP_stroke.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP.xml new file mode 100644 index 000000000..76951fef4 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP_stroke.xml new file mode 100644 index 000000000..8b32f784c --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DBP_stroke.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP.xml new file mode 100644 index 000000000..a768c78e9 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP_stroke.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP_stroke.xml new file mode 100644 index 000000000..1cc067b05 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_DCBP_stroke.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP.xml new file mode 100644 index 000000000..118f47060 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP_broken.xml new file mode 100644 index 000000000..8d9de2b91 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_mixedBP_broken.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP.xml new file mode 100644 index 000000000..7554b1a7f --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP_broken.xml new file mode 100644 index 000000000..7e728b15c --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_BPCBP_broken.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_DBPCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_DBPCBP.xml new file mode 100644 index 000000000..92eaded02 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/PC_multi_DBPCBP.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/README.txt b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/README.txt new file mode 100644 index 000000000..8834bd0b0 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/README.txt @@ -0,0 +1,11 @@ +- Note from Charles - +Yeah, these are the full xml definitions for the +annotations types. I've retained them from Nehon's +conf.zip file, but these aren't added to the layer.xml. + +Yet... + +-Only if we want to override the various icons, n stuff. +or +-if these actually override the colors specified in +the annotations fonts/colors. \ No newline at end of file diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/bookmark.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/bookmark.xml new file mode 100644 index 000000000..1f03f9839 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/bookmark.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-has-implementations-combined.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-has-implementations-combined.xml new file mode 100644 index 000000000..83e049c8f --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-has-implementations-combined.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-is-overridden-combined.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-is-overridden-combined.xml new file mode 100644 index 000000000..0c254dd51 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/implements-is-overridden-combined.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP.xml new file mode 100644 index 000000000..45914e713 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP_broken.xml new file mode 100644 index 000000000..d99e90ee8 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/mixed_BP_broken.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP.xml new file mode 100644 index 000000000..1c284b712 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP_broken.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP_broken.xml new file mode 100644 index 000000000..b759921be --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_BPCBP_broken.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_DBPCBP.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_DBPCBP.xml new file mode 100644 index 000000000..2e3beb577 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/multi_DBPCBP.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-has_implementations.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-has_implementations.xml new file mode 100644 index 000000000..468c18fc3 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-has_implementations.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-implements.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-implements.xml new file mode 100644 index 000000000..7fcb1b188 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-implements.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-is_overridden.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-is_overridden.xml new file mode 100644 index 000000000..655bcfb13 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-is_overridden.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-overrides.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-overrides.xml new file mode 100644 index 000000000..d028fde30 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-editor-annotations-overrides.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-git-Annotation.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-git-Annotation.xml new file mode 100644 index 000000000..0e34aca67 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-git-Annotation.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-subversion-Annotation.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-subversion-Annotation.xml new file mode 100644 index 000000000..5d71f4dc5 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-subversion-Annotation.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-versioning-annotate-Annotation.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-versioning-annotate-Annotation.xml new file mode 100644 index 000000000..e76379ae7 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-versioning-annotate-Annotation.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-xml-error.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-xml-error.xml new file mode 100644 index 000000000..3021fd1d3 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-modules-xml-error.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err.xml new file mode 100644 index 000000000..55ac88c48 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err_fixable.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err_fixable.xml new file mode 100644 index 000000000..862814346 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_err_fixable.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint.xml new file mode 100644 index 000000000..0220cfd4b --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint_fixable.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint_fixable.xml new file mode 100644 index 000000000..c76fec170 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_hint_fixable.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo.xml new file mode 100644 index 000000000..b37f74d96 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo_fixable.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo_fixable.xml new file mode 100644 index 000000000..58ba23cd7 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_todo_fixable.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier.xml new file mode 100644 index 000000000..4a8f56103 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier_fixable.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier_fixable.xml new file mode 100644 index 000000000..8601c8da9 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_verifier_fixable.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn.xml new file mode 100644 index 000000000..16719bbd2 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn_fixable.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn_fixable.xml new file mode 100644 index 000000000..3ff4011bc --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/org-netbeans-spi-java-parser_annotation_warn_fixable.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/override-is-overridden-combined.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/override-is-overridden-combined.xml new file mode 100644 index 000000000..9d50207d5 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/AnnotationTypes/override-is-overridden-combined.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-annotation.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-annotation.xml new file mode 100644 index 000000000..5024f9e69 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-annotation.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-highlight.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-highlight.xml new file mode 100644 index 000000000..5800fe464 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-highlight.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-token.xml new file mode 100644 index 000000000..01a7f0cac --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-Editor-token.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-application-xml-dtd-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-application-xml-dtd-token.xml new file mode 100644 index 000000000..1b8368e1a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-application-xml-dtd-token.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-css-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-css-token.xml new file mode 100644 index 000000000..651489eb2 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-css-token.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-html-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-html-token.xml new file mode 100644 index 000000000..e1b09178a --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-html-token.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-javascript-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-javascript-token.xml new file mode 100644 index 000000000..f318f02cd --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-javascript-token.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-plain-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-plain-token.xml new file mode 100644 index 000000000..2151022de --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-plain-token.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-diff-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-diff-token.xml new file mode 100644 index 000000000..3078cef90 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-diff-token.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-glsl-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-glsl-token.xml new file mode 100644 index 000000000..2b69657b7 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-glsl-token.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-groovy-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-groovy-token.xml new file mode 100644 index 000000000..f90545ccb --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-groovy-token.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-gsp-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-gsp-token.xml new file mode 100644 index 000000000..d0866faab --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-gsp-token.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-java-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-java-token.xml new file mode 100644 index 000000000..3ee9d08c9 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-java-token.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-json-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-json-token.xml new file mode 100644 index 000000000..a37fd1237 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-json-token.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-properties-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-properties-token.xml new file mode 100644 index 000000000..20704ac25 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-properties-token.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-yaml-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-yaml-token.xml new file mode 100644 index 000000000..7064a1f0e --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-yaml-token.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xhtml-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xhtml-token.xml new file mode 100644 index 000000000..55db420cc --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xhtml-token.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-external-parsed-entity-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-external-parsed-entity-token.xml new file mode 100644 index 000000000..5d81a5eaa --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-external-parsed-entity-token.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-token.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-token.xml new file mode 100644 index 000000000..5d81a5eaa --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-xml-token.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/EditorFontsColors-1_1dtd.txt b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/EditorFontsColors-1_1dtd.txt new file mode 100644 index 000000000..f456f9eff --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/EditorFontsColors-1_1dtd.txt @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/README.txt b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/README.txt new file mode 100644 index 000000000..6601e78fa --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/README.txt @@ -0,0 +1,36 @@ +- Note From Charles - +This "Directory" org.jme3.netbeans.plaf.darkmonkay.fac is similarly structured +to the way netbeans handles its Fonts and Colors internally. + +It is not really how Netbeans stores it. I have removed "/FontsColors/ThemeName" +from all directories... and the fac can be considered rooted at /Editor + +For the actual registration of all these colors... see the layer.xml +file at org.jme3.netbeans.plaf.darkmonkey + +That said: +-changing the values in the .xml files *will* affect the color values of the +"Dark Monkey" FAC default profile. + +and remember, the Fonts and Colors profile "Dark Monkey" side +of this module is only for the Editor module of Netbeans. Don't confuse this +with the Look and Feel "DarkMonkey" side. :) + +Together, they make the theme for DarkMonkey in Netbeans. + +Onwards! +Tips for learners: +- The syntax for these FAC .xml files is in EditorFontsColor-1_1dtd.txt + I've included the dtd as a txt so folks have a handy reference for knowing + what all options they have for including into the tags. +- Notice that the file names kind of look like the file folder structure of + one of those exported profile .zip files. Roll with that naming convention + if you notice the pattern. The last word is the same as the attr assigned + to the file in the layer.xml file... or the .nbattr file... +- It's all layered like css, so the more specific you get... the more values + that have to be overwritten when the user customizes. +- If in doubt, you can always refer to the Netbeans/Default code to see what + all "names" need to be covered for completion. (You can look at the + from layer.xml and see how the various FAC .xml files + work their way through to support the system.) +- There is a video on the DarkMonkey Dev Blog over at the jMonkeyEngine Forums \ No newline at end of file diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/AUTHORS b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/AUTHORS new file mode 100644 index 000000000..94df1e390 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/AUTHORS @@ -0,0 +1,54 @@ +abysta at yandex.ru +Adrian Schroeter +Aleksey Chalabyan +Andrey Valentinovich Panov +Ben Laenen +Besarion Gugushvili +Bhikkhu Pesala +Clayborne Arevalo +Dafydd Harries +Danilo Segan +Davide Viti +David Jez +David Lawrence Ramsey +Denis Jacquerye +Dwayne Bailey +Eugeniy Meshcheryakov +Gee Fung Sit +Heikki Lindroos +James Cloos +James Crippen +John Karp +Keenan Pepper +Lars Naesbye Christensen +Lior Halphon +MaEr +Mashrab Kuvatov +Max Berger +Mederic Boquien +Michael Everson +MihailJP +Misu Moldovan +Nguyen Thai Ngoc Duy +Nicolas Mailhot +Norayr Chilingarian +Ognyan Kulev +Ondrej Koala Vacha +Peter Cernak +Remy Oudompheng +Roozbeh Pournader +Rouben Hakobian +Sahak Petrosyan +Sander Vesik +Stepan Roh +Stephen Hartke +Steve Tinney +Tavmjong Bah +Thomas Henlich +Tim May +Valentin Stoykov +Vasek Stodulka +Wesley Transue +Yoshiki Ohshima + +$Id: AUTHORS 2495 2011-11-14 22:56:26Z noct_dreamer $ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Bold.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Bold.ttf new file mode 100644 index 000000000..08695f23a Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Bold.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-BoldOblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-BoldOblique.ttf new file mode 100644 index 000000000..7e3bcc105 Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Oblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Oblique.ttf new file mode 100644 index 000000000..e33ab144d Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans-Oblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans.ttf new file mode 100644 index 000000000..9d40c3256 Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSans.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Bold.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Bold.ttf new file mode 100644 index 000000000..4c40003d4 Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Bold.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-BoldOblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-BoldOblique.ttf new file mode 100644 index 000000000..24b611b18 Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-BoldOblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Oblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Oblique.ttf new file mode 100644 index 000000000..1e0526f9a Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed-Oblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed.ttf new file mode 100644 index 000000000..7f168d13c Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansCondensed.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Bold.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Bold.ttf new file mode 100644 index 000000000..9c716794f Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Bold.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-BoldOblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-BoldOblique.ttf new file mode 100644 index 000000000..d6536a5cc Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-BoldOblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Oblique.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Oblique.ttf new file mode 100644 index 000000000..e1af34130 Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono-Oblique.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono.ttf b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono.ttf new file mode 100644 index 000000000..8b7bb2a4e Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/DejaVuSansMono.ttf differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/LICENSE b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/LICENSE new file mode 100644 index 000000000..254e2cc42 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/LICENSE @@ -0,0 +1,99 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. +Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. + +$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/README b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/README new file mode 100644 index 000000000..12e9e977c --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fonts/README @@ -0,0 +1,77 @@ +-Note from Charles- +Though we are not extending anything and only using a part of their original +work, I am passing along their readme, authors, and License for proper +accreditation as that we are using: +DejaVu Sans Mono +DejaVu Sans Mono Bold +DejaVu Sans Mono Bold Oblique +DejaVu Sans Mono Oblique +DejaVu Sans +DejaVu Sans Bold +DejaVu Sans Bold Oblique +DejaVu Sans Oblique +from their wonderful font family + +Acquire their full Latest Version at: +http://dejavu-fonts.org +-End Note- + +DejaVu fonts 2.34 (c)2004-2013 DejaVu fonts team +------------------------------------------------ + +The DejaVu fonts are a font family based on the Bitstream Vera Fonts +(http://gnome.org/fonts/). Its purpose is to provide a wider range of +characters (see status.txt for more information) while maintaining the +original look and feel. + +DejaVu fonts are based on Bitstream Vera fonts version 1.10. + +Available fonts (Sans = sans serif, Mono = monospaced): + +DejaVu Sans Mono +DejaVu Sans Mono Bold +DejaVu Sans Mono Bold Oblique +DejaVu Sans Mono Oblique +DejaVu Sans +DejaVu Sans Bold +DejaVu Sans Bold Oblique +DejaVu Sans Oblique +DejaVu Sans ExtraLight (experimental) +DejaVu Serif +DejaVu Serif Bold +DejaVu Serif Bold Italic (experimental) +DejaVu Serif Italic (experimental) +DejaVu Sans Condensed (experimental) +DejaVu Sans Condensed Bold (experimental) +DejaVu Sans Condensed Bold Oblique (experimental) +DejaVu Sans Condensed Oblique (experimental) +DejaVu Serif Condensed (experimental) +DejaVu Serif Condensed Bold (experimental) +DejaVu Serif Condensed Bold Italic (experimental) +DejaVu Serif Condensed Italic (experimental) + +All fonts are also available as derivative called DejaVu LGC with support +only for Latin, Greek and Cyrillic scripts. + +For license information see LICENSE. What's new is described in NEWS. Known +bugs are in BUGS. All authors are mentioned in AUTHORS. + +Fonts are published in source form as SFD files (Spline Font Database from +FontForge - http://fontforge.sf.net/) and in compiled form as TTF files +(TrueType fonts). + +For more information go to http://dejavu.sourceforge.net/. + +Characters from Arev fonts, Copyright (c) 2006 by Tavmjong Bah: +--------------------------- +U+01BA, U+01BF, U+01F7, U+021C-U+021D, U+0220, U+0222-U+0223, +U+02B9, U+02BA, U+02BD, U+02C2-U+02C5, U+02d4-U+02D5, +U+02D7, U+02EC-U+02EE, U+0346-U+034E, U+0360, U+0362, +U+03E2-03EF, U+0460-0463, U+0466-U+0486, U+0488-U+0489, U+04A8-U+04A9, +U+0500-U+050F, U+2055-205E, U+20B0, U+20B2-U+20B3, U+2102, U+210D, U+210F, +U+2111, U+2113, U+2115, U+2118-U+211A, U+211C-U+211D, U+2124, U+2135, +U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704, +U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794, +U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06 + +$Id: README 2535 2013-08-25 15:21:17Z moyogo $ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonC2.png b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonC2.png new file mode 100644 index 000000000..4c96a2bfe Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonC2.png differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonE2.png b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonE2.png new file mode 100644 index 000000000..3160f134c Binary files /dev/null and b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/icons/nehonE2.png differ diff --git a/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/layer.xml b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/layer.xml new file mode 100644 index 000000000..3c84a4094 --- /dev/null +++ b/sdk/jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/layer.xml @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-desktop-executables/nbproject/project.properties b/sdk/jme3-desktop-executables/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-desktop-executables/nbproject/project.properties +++ b/sdk/jme3-desktop-executables/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-documentation/nbproject/project.properties b/sdk/jme3-documentation/nbproject/project.properties index 232d11645..39ff046d1 100644 --- a/sdk/jme3-documentation/nbproject/project.properties +++ b/sdk/jme3-documentation/nbproject/project.properties @@ -1,6 +1,6 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Normen Hansen, Ruth Kusterer, many others spec.version.base=3.1.0 diff --git a/sdk/jme3-gui/nbproject/project.properties b/sdk/jme3-gui/nbproject/project.properties index 291042fd5..9a27f3767 100644 --- a/sdk/jme3-gui/nbproject/project.properties +++ b/sdk/jme3-gui/nbproject/project.properties @@ -10,10 +10,10 @@ file.reference.slf4j-simple-1.7.7.jar=release/modules/ext/slf4j-simple-1.7.7.jar file.reference.swingtonifty.jar=release/modules/ext/swingtonifty.jar file.reference.xsom-20110101-SNAPSHOT.jar=release/modules/ext/xsom-20110101-SNAPSHOT.jar #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Relucri nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-lwjgl-applet/nbproject/project.properties b/sdk/jme3-lwjgl-applet/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-lwjgl-applet/nbproject/project.properties +++ b/sdk/jme3-lwjgl-applet/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-materialeditor/nbproject/project.properties b/sdk/jme3-materialeditor/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-materialeditor/nbproject/project.properties +++ b/sdk/jme3-materialeditor/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionCurve.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionCurve.java index ec2f4aa98..7c225f745 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionCurve.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionCurve.java @@ -123,7 +123,7 @@ public class ConnectionCurve extends JPanel implements ComponentListener, MouseI g2.setStroke(new BasicStroke(4)); Path2D.Double path1 = new Path2D.Double(); - if (getDiagram().selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { g.setColor(SELECTED_COLOR); } else { g.setColor(VERY_DARK_GREY); @@ -162,7 +162,7 @@ public class ConnectionCurve extends JPanel implements ComponentListener, MouseI ((Graphics2D) g).draw(path1); g2.setStroke(new BasicStroke(2)); - if (getDiagram().selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { g.setColor(Color.WHITE); } else { g.setColor(LIGHT_GREY); @@ -385,7 +385,7 @@ public class ConnectionCurve extends JPanel implements ComponentListener, MouseI } if (selected) { - getDiagram().select(this); + getDiagram().select(this, e.isShiftDown() || e.isControlDown()); e.consume(); } } @@ -407,9 +407,7 @@ public class ConnectionCurve extends JPanel implements ComponentListener, MouseI if (e.getKeyCode() == KeyEvent.VK_DELETE) { Diagram diag = getDiagram(); - if (diag.selectedItem == this) { - diag.removeSelectedConnection(); - } + diag.removeSelected(); } } diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionStraight.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionStraight.java index 3eba66a23..fc4873bd8 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionStraight.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/ConnectionStraight.java @@ -209,7 +209,7 @@ public class ConnectionStraight extends JPanel implements ComponentListener, Mou g.drawLine(p1.x, p1.y, p2.x, p2.y); - if (getDiagram().selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { g.setColor(Color.CYAN); } else { g.setColor(Color.GRAY); @@ -489,7 +489,7 @@ public class ConnectionStraight extends JPanel implements ComponentListener, Mou } if (selected) { - getDiagram().select(this); + getDiagram().select(this, e.isShiftDown() || e.isControlDown()); e.consume(); } } @@ -511,9 +511,7 @@ public class ConnectionStraight extends JPanel implements ComponentListener, Mou if (e.getKeyCode() == KeyEvent.VK_DELETE) { Diagram diag = getDiagram(); - if (diag.selectedItem == this) { - diag.removeSelectedConnection(); - } + diag.removeSelected(); } } diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/Diagram.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/Diagram.java index 9d344355e..88876f3e5 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/Diagram.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/Diagram.java @@ -55,7 +55,7 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene protected Dot draggedFrom; protected Dot draggedTo; - protected Selectable selectedItem; + protected List selectedItems = new ArrayList(); protected List connections = new ArrayList(); protected List nodes = new ArrayList(); protected List outBuses = new ArrayList(); @@ -63,6 +63,9 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene private MatDefEditorlElement parent; private String currentTechniqueName; private final BackdropPanel backDrop = new BackdropPanel(); + private final Cursor defCursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR); + private final Cursor hndCursor = Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); + private final Point pp = new Point(); @SuppressWarnings("LeakingThisInConstructor") public Diagram() { @@ -99,7 +102,7 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene } } - selectedItem = null; + selectedItems.clear(); repaint(); } else if (e.getButton() == MouseEvent.BUTTON2) { setCursor(hndCursor); @@ -204,13 +207,10 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene public void mouseExited(MouseEvent e) { } - protected void removeSelectedConnection() { - if (selectedItem instanceof Connection) { - Connection selectedConnection = (Connection) selectedItem; - removeConnection(selectedConnection); - selectedItem = null; - parent.notifyRemoveConnection(selectedConnection); - } + protected void removeSelectedConnection(Selectable selectedItem) { + Connection selectedConnection = (Connection) selectedItem; + removeConnection(selectedConnection); + parent.notifyRemoveConnection(selectedConnection); } private String fixNodeName(String name) { @@ -276,44 +276,58 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene np.revalidate(); repaint(); } - - protected void removeSelectedNode() { - if (selectedItem instanceof NodePanel) { - int result = JOptionPane.showConfirmDialog(null, "Delete this node and all its mappings?", "Delete Shader Node", JOptionPane.OK_CANCEL_OPTION); - if (result == JOptionPane.OK_OPTION) { - NodePanel selectedNode = (NodePanel) selectedItem; - nodes.remove(selectedNode); - for (Iterator it = connections.iterator(); it.hasNext();) { - Connection conn = it.next(); - if (conn.start.getNode() == selectedNode || conn.end.getNode() == selectedNode) { - it.remove(); - conn.end.disconnect(); - conn.start.disconnect(); - remove(conn); - } + + protected void removeSelected(){ + + int result = JOptionPane.showConfirmDialog(null, "Delete all selected items, nodes and mappings?", "Delete Selected", JOptionPane.OK_CANCEL_OPTION); + + if (result == JOptionPane.OK_OPTION) { + for (Selectable selectedItem : selectedItems) { + if (selectedItem instanceof NodePanel) { + removeSelectedNode(selectedItem); } + if (selectedItem instanceof Connection) { + removeSelectedConnection(selectedItem); + } + } + selectedItems.clear(); + } + } - selectedNode.cleanup(); - remove(selectedNode); - selectedItem = null; - repaint(); - parent.notifyRemoveNode(selectedNode); + private void removeSelectedNode(Selectable selectedItem) { + + NodePanel selectedNode = (NodePanel) selectedItem; + nodes.remove(selectedNode); + for (Iterator it = connections.iterator(); it.hasNext();) { + Connection conn = it.next(); + if (conn.start.getNode() == selectedNode || conn.end.getNode() == selectedNode) { + it.remove(); + conn.end.disconnect(); + conn.start.disconnect(); + remove(conn); } } + + selectedNode.cleanup(); + remove(selectedNode); + repaint(); + parent.notifyRemoveNode(selectedNode); } - private final Cursor defCursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR); - private final Cursor hndCursor = Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); - private final Point pp = new Point(); + public List getSelectedItems() { + return selectedItems; + } @Override public void mouseDragged(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e)) { if (draggedFrom == null) { - if (selectedItem instanceof OutBusPanel) { - OutBusPanel bus = (OutBusPanel) selectedItem; - MouseEvent me = SwingUtilities.convertMouseEvent(this, e, bus); - bus.dispatchEvent(me); + for (Selectable selectedItem : selectedItems) { + if (selectedItem instanceof OutBusPanel) { + OutBusPanel bus = (OutBusPanel) selectedItem; + MouseEvent me = SwingUtilities.convertMouseEvent(this, e, bus); + bus.dispatchEvent(me); + } } } } else if (SwingUtilities.isMiddleMouseButton(e)) { @@ -373,22 +387,53 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene * * @param selectable */ - public void select(Selectable selectable) { - parent.selectionChanged(doSelect(selectable)); + public void select(Selectable selectable, boolean multi) { + parent.selectionChanged(doSelect(selectable, multi)); + } + + public void multiMove(DraggablePanel movedPanel ,int xOffset, int yOffset){ + + for (Selectable selectedItem : selectedItems) { + if(selectedItem != movedPanel){ + if(selectedItem instanceof DraggablePanel){ + ((DraggablePanel)selectedItem).movePanel(xOffset, yOffset); + } + } + } } + public void multiStartDrag(DraggablePanel movedPanel){ + for (Selectable selectedItem : selectedItems) { + if(selectedItem != movedPanel){ + if(selectedItem instanceof DraggablePanel){ + ((DraggablePanel)selectedItem).saveLocation(); + } + } + } + } + /** * do select the item and repaint the diagram * * @param selectable * @return */ - private Selectable doSelect(Selectable selectable) { - this.selectedItem = selectable; + private Selectable doSelect(Selectable selectable, boolean multi) { + + + if (!multi && !selectedItems.contains(selectable)) { + selectedItems.clear(); + } + + if (selectable != null) { + selectedItems.add(selectable); + } + if (selectable instanceof Component) { ((Component) selectable).requestFocusInWindow(); } repaint(); + return selectable; } @@ -403,23 +448,23 @@ public class Diagram extends JPanel implements MouseListener, MouseMotionListene for (NodePanel nodePanel : nodes) { if (nodePanel.getKey().equals(key)) { - return doSelect(nodePanel); + return doSelect(nodePanel, false); } } for (Connection connection : connections) { if (connection.getKey().equals(key)) { - return doSelect(connection); + return doSelect(connection, false); } } for (OutBusPanel outBusPanel : outBuses) { if (outBusPanel.getKey().equals(key)) { - return doSelect(outBusPanel); + return doSelect(outBusPanel, false); } } - return doSelect(null); + return null; } @Override diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/DraggablePanel.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/DraggablePanel.java index e81d1d5b6..7941cb8d5 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/DraggablePanel.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/DraggablePanel.java @@ -37,16 +37,22 @@ public class DraggablePanel extends JPanel implements MouseListener, MouseMotion @Override public void mousePressed(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON2) { - svdx = getLocation().x; + if (!vertical) { svdex = e.getXOnScreen(); } - svdy = getLocation().y; svdey = e.getYOnScreen(); + saveLocation(); + diagram.multiStartDrag(this); e.consume(); } } + protected void saveLocation() { + svdy = getLocation().y; + svdx = getLocation().x; + } + @Override public void mouseReleased(MouseEvent e) { } @@ -71,11 +77,19 @@ public class DraggablePanel extends JPanel implements MouseListener, MouseMotion xoffset = e.getLocationOnScreen().x - svdex; } int yoffset = e.getLocationOnScreen().y - svdey; - setLocation(Math.max(0, svdx + xoffset), Math.max(0, svdy + yoffset)); + movePanel(xoffset, yoffset); + diagram.multiMove(this, xoffset, yoffset); e.consume(); } } + protected void movePanel(int xoffset, int yoffset) { + if (vertical) { + xoffset = 0; + } + setLocation(Math.max(0, svdx + xoffset), Math.max(0, svdy + yoffset)); + } + public Diagram getDiagram() { return diagram; } diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java index 49e04170d..adfd9223d 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java @@ -56,23 +56,6 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha protected List filePaths = new ArrayList(); protected Shader.ShaderType shaderType; -// private List listeners = Collections.synchronizedList(new LinkedList()); -// -// public void addPropertyChangeListener(PropertyChangeListener pcl) { -// listeners.add(pcl); -// } -// -// public void removePropertyChangeListener(PropertyChangeListener pcl) { -// listeners.remove(pcl); -// } -// -// protected void fire(String propertyName, Object old, Object nue) { -// //Passing 0 below on purpose, so you only synchronize for one atomic call: -// PropertyChangeListener[] pcls = (PropertyChangeListener[]) listeners.toArray(new PropertyChangeListener[0]); -// for (int i = 0; i < pcls.length; i++) { -// pcls[i].propertyChange(new PropertyChangeEvent(this, propertyName, old, nue)); -// } -// } public enum NodeType { Vertex(new Color(220, 220, 70)),//yellow @@ -186,9 +169,12 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha } private Dot getConnectPoint(List list, String varName, List listDot) { - if (varName.startsWith("m_") || varName.startsWith("g_")) { - varName = varName.substring(2); - } + //This has been commented out because it was causing issues when a variable name was explicitely starting with m_ or g_ in the j3md. + //I can't remember why it was done in the first place, but I can't see any case where the m_ should be stripped out. + //I'm letting this commented in case this comes to light some day, and something more clever will have to be done. +// if (varName.startsWith("m_") || varName.startsWith("g_")) { +// varName = varName.substring(2); +// } for (int i = 0; i < list.size(); i++) { if (list.get(i).getText().equals(varName)) { return listDot.get(i); @@ -201,13 +187,13 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha protected void paintComponent(Graphics g1) { Graphics2D g = (Graphics2D) g1; Color boderColor = Color.BLACK; - if (diagram.selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { boderColor = Color.WHITE; } g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, // Anti-alias! RenderingHints.VALUE_ANTIALIAS_ON); // Color[] colors = {new Color(0, 0, 0, 0.7f), new Color(0, 0, 0, 0.15f)}; - if (diagram.selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { Color[] colors = new Color[]{new Color(0.6f, 0.6f, 1.0f, 0.8f), new Color(0.6f, 0.6f, 1.0f, 0.5f)}; float[] factors = {0f, 1f}; g.setPaint(new RadialGradientPaint(getWidth() / 2, getHeight() / 2, getWidth() / 2, factors, colors)); @@ -260,8 +246,8 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha @Override public void mousePressed(MouseEvent e) { - super.mousePressed(e); - diagram.select(this); + super.mousePressed(e); + diagram.select(this, e.isShiftDown() || e.isControlDown()); showToolBar(); } @@ -442,9 +428,7 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha public void delete() { Diagram diag = getDiagram(); - if (diag.selectedItem == this) { - diag.removeSelectedNode(); - } + diag.removeSelected(); } public void keyReleased(KeyEvent e) { diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/OutBusPanel.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/OutBusPanel.java index 521776dce..6a489dea6 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/OutBusPanel.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/OutBusPanel.java @@ -110,7 +110,7 @@ public class OutBusPanel extends DraggablePanel implements ComponentListener, Se Polygon p = new Polygon(xs, ys, 8); - if (diagram.selectedItem == this) { + if (getDiagram().getSelectedItems().contains(this)) { int[] xs2 = {0, width - 30, width - 30, width, width - 32, width - 32, 0, 0}; int[] ys2 = {10, 10, 0, getHeight() / 2 + 2, getHeight(), getHeight() - 8, getHeight() - 8, 10}; @@ -154,7 +154,7 @@ public class OutBusPanel extends DraggablePanel implements ComponentListener, Se return; } super.mousePressed(e); - diagram.select(this); + diagram.select(this, e.isShiftDown() || e.isControlDown()); } @Override diff --git a/sdk/jme3-model-importer/nbproject/project.properties b/sdk/jme3-model-importer/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-model-importer/nbproject/project.properties +++ b/sdk/jme3-model-importer/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-navmesh-gen/nbproject/project.properties b/sdk/jme3-navmesh-gen/nbproject/project.properties index 65d1fb700..78227c671 100644 --- a/sdk/jme3-navmesh-gen/nbproject/project.properties +++ b/sdk/jme3-navmesh-gen/nbproject/project.properties @@ -1,6 +1,6 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Brent Owens spec.version.base=3.1.0 diff --git a/sdk/jme3-obfuscate/nbproject/project.properties b/sdk/jme3-obfuscate/nbproject/project.properties index 61598fa7b..d16349a4f 100644 --- a/sdk/jme3-obfuscate/nbproject/project.properties +++ b/sdk/jme3-obfuscate/nbproject/project.properties @@ -1,6 +1,7 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial +license.file=../license-jme.txt nbm.homepage=http\://proguard.sourceforge.net/ nbm.module.author=Normen Hansen nbm.needs.restart=true diff --git a/sdk/jme3-ogretools/nbproject/project.properties b/sdk/jme3-ogretools/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-ogretools/nbproject/project.properties +++ b/sdk/jme3-ogretools/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-ogrexml/nbproject/project.properties b/sdk/jme3-ogrexml/nbproject/project.properties index 9b996acdd..4ad5ba7ab 100644 --- a/sdk/jme3-ogrexml/nbproject/project.properties +++ b/sdk/jme3-ogrexml/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-baselibs/nbproject/project.properties b/sdk/jme3-project-baselibs/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-baselibs/nbproject/project.properties +++ b/sdk/jme3-project-baselibs/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-libraries/nbproject/project.properties b/sdk/jme3-project-libraries/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-libraries/nbproject/project.properties +++ b/sdk/jme3-project-libraries/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-testdata/nbproject/project.properties b/sdk/jme3-project-testdata/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-testdata/nbproject/project.properties +++ b/sdk/jme3-project-testdata/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-scenecomposer/nbproject/project.properties b/sdk/jme3-scenecomposer/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-scenecomposer/nbproject/project.properties +++ b/sdk/jme3-scenecomposer/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditTool.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditTool.java index 372984f8e..c2a4753c4 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditTool.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditTool.java @@ -453,6 +453,9 @@ public abstract class SceneEditTool { Geometry arrowX = new Geometry("arrowX", new Arrow(new Vector3f(arrowSize, 0, 0))); Geometry arrowY = new Geometry("arrowY", new Arrow(new Vector3f(0, arrowSize, 0))); Geometry arrowZ = new Geometry("arrowZ", new Arrow(new Vector3f(0, 0, arrowSize))); + arrowX.getMesh().setLineWidth(2f); + arrowY.getMesh().setLineWidth(2f); + arrowZ.getMesh().setLineWidth(2f); axis.attachChild(arrowX); axis.attachChild(arrowY); axis.attachChild(arrowZ); diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/SelectTool.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/SelectTool.java index 87f3c283f..013cfb492 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/SelectTool.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/SelectTool.java @@ -10,6 +10,7 @@ import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial; import com.jme3.gde.core.sceneviewer.SceneViewerTopComponent; import com.jme3.gde.scenecomposer.SceneEditTool; import com.jme3.math.Vector2f; +import com.jme3.math.Vector3f; import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.terrain.Terrain; @@ -33,7 +34,7 @@ import org.openide.loaders.DataObject; */ public class SelectTool extends SceneEditTool { - private boolean wasDraggingR = false; + private boolean wasDraggingR, wasDraggingL = false; private boolean wasDownR = false; /** @@ -52,13 +53,24 @@ public class SelectTool extends SceneEditTool { */ @Override public void actionPrimary(Vector2f screenCoord, boolean pressed, final JmeNode rootNode, DataObject dataObject) { - + if (!pressed){ + if (!wasDraggingL) { + Vector3f result = pickWorldLocation(getCamera(), screenCoord, rootNode); + if (result != null) { + if (toolController.isSnapToGrid()) { + result.set(Math.round(result.x), result.y, Math.round(result.z)); + } + toolController.doSetCursorLocation(result); + } + } + wasDraggingL = false; + } } @Override public void actionSecondary(final Vector2f screenCoord, boolean pressed, final JmeNode rootNode, DataObject dataObject) { if (pressed) { - Spatial selected = toolController.getSelectedSpatial(); + Spatial selected;// = toolController.getSelectedSpatial(); // mouse down if (!wasDraggingR && !wasDownR) { // wasn't dragging and was not down already @@ -137,6 +149,7 @@ public class SelectTool extends SceneEditTool { @Override public void draggedPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) { + wasDraggingL = pressed; } @Override diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/DeleteShortcut.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/DeleteShortcut.java index cc13ece1d..d5dca8d14 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/DeleteShortcut.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/DeleteShortcut.java @@ -29,7 +29,9 @@ public class DeleteShortcut extends ShortcutTool { @Override public boolean isActivableBy(KeyInputEvent kie) { if (kie.getKeyCode() == KeyInput.KEY_X && kie.isPressed()) { - if (Lookup.getDefault().lookup(ShortcutManager.class).isShiftDown()) { + ShortcutManager scm = Lookup.getDefault().lookup(ShortcutManager.class); + if (!scm.isActive() && scm.isShiftDown()) { + // ^ can't be enable if an other shortcut is allready active return true; } } @@ -99,7 +101,7 @@ public class DeleteShortcut extends ShortcutTool { @Override public void draggedSecondary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) { } - + private class DeleteUndo extends AbstractUndoableSceneEdit { private Spatial spatial; diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/MoveShortcut.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/MoveShortcut.java index 6291ab932..e32e7183c 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/MoveShortcut.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/MoveShortcut.java @@ -78,14 +78,16 @@ public class MoveShortcut extends ShortcutTool { if (kie.isPressed()) { Lookup.getDefault().lookup(ShortcutManager.class).activateShortcut(kie); - Vector3f axis = new Vector3f(); - boolean axisChanged = ShortcutManager.checkAxisKey(kie, axis); + boolean axisChanged = ShortcutManager.isAxisKey(kie); if (axisChanged) { - currentAxis = axis; + currentAxis = ShortcutManager.getAxisKey(kie); } - boolean numberChanged = ShortcutManager.checkNumberKey(kie, numberBuilder); - boolean enterHit = ShortcutManager.checkEnterHit(kie); - boolean escHit = ShortcutManager.checkEscHit(kie); + boolean numberChanged = ShortcutManager.isNumberKey(kie); + if(numberChanged){ + ShortcutManager.setNumberKey(kie, numberBuilder); + } + boolean enterHit = ShortcutManager.isEnterKey(kie); + boolean escHit = ShortcutManager.isEscKey(kie); if (escHit) { cancel(); diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/RotateShortcut.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/RotateShortcut.java index 8b9ffe404..aec5b6928 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/RotateShortcut.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/RotateShortcut.java @@ -77,14 +77,16 @@ public class RotateShortcut extends ShortcutTool { if (kie.isPressed()) { Lookup.getDefault().lookup(ShortcutManager.class).activateShortcut(kie); - Vector3f axis = new Vector3f(); - boolean axisChanged = ShortcutManager.checkAxisKey(kie, axis); + boolean axisChanged = ShortcutManager.isAxisKey(kie); if (axisChanged) { - currentAxis = axis; + currentAxis = ShortcutManager.getAxisKey(kie); } - boolean numberChanged = ShortcutManager.checkNumberKey(kie, numberBuilder); - boolean enterHit = ShortcutManager.checkEnterHit(kie); - boolean escHit = ShortcutManager.checkEscHit(kie); + boolean numberChanged = ShortcutManager.isNumberKey(kie); + if(numberChanged){ + ShortcutManager.setNumberKey(kie, numberBuilder); + } + boolean enterHit = ShortcutManager.isEnterKey(kie); + boolean escHit = ShortcutManager.isEscKey(kie); if (escHit) { cancel(); diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ScaleShortcut.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ScaleShortcut.java index 8fa18858f..25266a676 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ScaleShortcut.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ScaleShortcut.java @@ -77,14 +77,16 @@ public class ScaleShortcut extends ShortcutTool { if (kie.isPressed()) { Lookup.getDefault().lookup(ShortcutManager.class).activateShortcut(kie); - Vector3f axis = new Vector3f(); - boolean axisChanged = ShortcutManager.checkAxisKey(kie, axis); + boolean axisChanged = ShortcutManager.isAxisKey(kie); if (axisChanged) { - currentAxis = axis; + currentAxis = ShortcutManager.getAxisKey(kie); } - boolean numberChanged = ShortcutManager.checkNumberKey(kie, numberBuilder); - boolean enterHit = ShortcutManager.checkEnterHit(kie); - boolean escHit = ShortcutManager.checkEscHit(kie); + boolean numberChanged = ShortcutManager.isNumberKey(kie); + if(numberChanged){ + ShortcutManager.setNumberKey(kie, numberBuilder); + } + boolean enterHit = ShortcutManager.isEnterKey(kie); + boolean escHit = ShortcutManager.isEscKey(kie); if (escHit) { cancel(); diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ShortcutManager.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ShortcutManager.java index 187293e92..c7d6f3721 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ShortcutManager.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/ShortcutManager.java @@ -157,13 +157,13 @@ public class ShortcutManager { } private boolean checkCommandeKey(KeyInputEvent kie) { - if (checkCtrlHit(kie)) { + if (isCtrlKey(kie)) { ctrlDown = kie.isPressed(); return true; - } else if (checkAltHit(kie)) { + } else if (isAltKey(kie)) { altDown = kie.isPressed(); return true; - } else if (checkShiftHit(kie)) { + } else if (isShiftKey(kie)) { shiftDown = kie.isPressed(); return true; } @@ -178,11 +178,8 @@ public class ShortcutManager { * @param kie * @return true if the given kie is KEY_RETURN */ - public static boolean checkEnterHit(KeyInputEvent kie) { - if (kie.getKeyCode() == KeyInput.KEY_RETURN) { - return true; - } - return false; + public static boolean isEnterKey(KeyInputEvent kie) { + return (kie.getKeyCode() == KeyInput.KEY_RETURN); } /** @@ -190,11 +187,8 @@ public class ShortcutManager { * @param kie * @return true if the given kie is KEY_ESCAPE */ - public static boolean checkEscHit(KeyInputEvent kie) { - if (kie.getKeyCode() == KeyInput.KEY_ESCAPE) { - return true; - } - return false; + public static boolean isEscKey(KeyInputEvent kie) { + return (kie.getKeyCode() == KeyInput.KEY_ESCAPE); } /** @@ -202,11 +196,8 @@ public class ShortcutManager { * @param kie * @return true if the given kie is KEY_LCONTROL || KEY_RCONTROL */ - public static boolean checkCtrlHit(KeyInputEvent kie) { - if (kie.getKeyCode() == KeyInput.KEY_LCONTROL || kie.getKeyCode() == KeyInput.KEY_RCONTROL) { - return true; - } - return false; + public static boolean isCtrlKey(KeyInputEvent kie) { + return (kie.getKeyCode() == KeyInput.KEY_LCONTROL || kie.getKeyCode() == KeyInput.KEY_RCONTROL); } /** @@ -214,11 +205,8 @@ public class ShortcutManager { * @param kie * @return true if the given kie is KEY_LSHIFT || KEY_RSHIFT */ - public static boolean checkShiftHit(KeyInputEvent kie) { - if (kie.getKeyCode() == KeyInput.KEY_LSHIFT || kie.getKeyCode() == KeyInput.KEY_RSHIFT) { - return true; - } - return false; + public static boolean isShiftKey(KeyInputEvent kie) { + return (kie.getKeyCode() == KeyInput.KEY_LSHIFT || kie.getKeyCode() == KeyInput.KEY_RSHIFT); } /** @@ -226,9 +214,40 @@ public class ShortcutManager { * @param kie * @return true if the given kie is KEY_LMENU || KEY_RMENU */ - public static boolean checkAltHit(KeyInputEvent kie) { - if (kie.getKeyCode() == KeyInput.KEY_LMENU || kie.getKeyCode() == KeyInput.KEY_RMENU) { - return true; + public static boolean isAltKey(KeyInputEvent kie) { + return (kie.getKeyCode() == KeyInput.KEY_LMENU || kie.getKeyCode() == KeyInput.KEY_RMENU); + } + + /** + * + * @param kie + * @return + */ + public static boolean isNumberKey(KeyInputEvent kie) { + switch (kie.getKeyCode()) { + case KeyInput.KEY_MINUS: + case KeyInput.KEY_0: + case KeyInput.KEY_1: + case KeyInput.KEY_2: + case KeyInput.KEY_3: + case KeyInput.KEY_4: + case KeyInput.KEY_5: + case KeyInput.KEY_6: + case KeyInput.KEY_7: + case KeyInput.KEY_8: + case KeyInput.KEY_9: + case KeyInput.KEY_NUMPAD0: + case KeyInput.KEY_NUMPAD1: + case KeyInput.KEY_NUMPAD2: + case KeyInput.KEY_NUMPAD3: + case KeyInput.KEY_NUMPAD4: + case KeyInput.KEY_NUMPAD5: + case KeyInput.KEY_NUMPAD6: + case KeyInput.KEY_NUMPAD7: + case KeyInput.KEY_NUMPAD8: + case KeyInput.KEY_NUMPAD9: + case KeyInput.KEY_PERIOD: + return true; } return false; } @@ -236,65 +255,55 @@ public class ShortcutManager { /** * store the number kie into the numberBuilder * - * @param kie - * @param numberBuilder - * @return true if the given kie is handled as a number key event + * @param kie the KeiInputEvent to be handled as a number. + * @param numberBuilder the number builder that will be modified ! */ - public static boolean checkNumberKey(KeyInputEvent kie, StringBuilder numberBuilder) { - if (kie.getKeyCode() == KeyInput.KEY_MINUS) { - if (numberBuilder.length() > 0) { - if (numberBuilder.charAt(0) == '-') { - numberBuilder.replace(0, 1, ""); + public static void setNumberKey(KeyInputEvent kie, StringBuilder numberBuilder) { + switch (kie.getKeyCode()) { + case KeyInput.KEY_MINUS: + if (numberBuilder.length() > 0) { + if (numberBuilder.charAt(0) == '-') { + numberBuilder.replace(0, 1, ""); + } else { + numberBuilder.insert(0, '-'); + } } else { - numberBuilder.insert(0, '-'); + numberBuilder.append('-'); } - } else { - numberBuilder.append('-'); - } - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_0 || kie.getKeyCode() == KeyInput.KEY_NUMPAD0) { - numberBuilder.append('0'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_1 || kie.getKeyCode() == KeyInput.KEY_NUMPAD1) { - numberBuilder.append('1'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_2 || kie.getKeyCode() == KeyInput.KEY_NUMPAD2) { - numberBuilder.append('2'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_3 || kie.getKeyCode() == KeyInput.KEY_NUMPAD3) { - numberBuilder.append('3'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_4 || kie.getKeyCode() == KeyInput.KEY_NUMPAD4) { - numberBuilder.append('4'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_5 || kie.getKeyCode() == KeyInput.KEY_NUMPAD5) { - numberBuilder.append('5'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_6 || kie.getKeyCode() == KeyInput.KEY_NUMPAD6) { - numberBuilder.append('6'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_7 || kie.getKeyCode() == KeyInput.KEY_NUMPAD7) { - numberBuilder.append('7'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_8 || kie.getKeyCode() == KeyInput.KEY_NUMPAD8) { - numberBuilder.append('8'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_9 || kie.getKeyCode() == KeyInput.KEY_NUMPAD9) { - numberBuilder.append('9'); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_PERIOD) { - if (numberBuilder.indexOf(".") == -1) { // if it doesn't exist yet - if (numberBuilder.length() == 0 - || (numberBuilder.length() == 1 && numberBuilder.charAt(0) == '-')) { - numberBuilder.append("0."); - } else { - numberBuilder.append("."); + break; + case KeyInput.KEY_0: + case KeyInput.KEY_1: + case KeyInput.KEY_2: + case KeyInput.KEY_3: + case KeyInput.KEY_4: + case KeyInput.KEY_5: + case KeyInput.KEY_6: + case KeyInput.KEY_7: + case KeyInput.KEY_8: + case KeyInput.KEY_9: + case KeyInput.KEY_NUMPAD0: + case KeyInput.KEY_NUMPAD1: + case KeyInput.KEY_NUMPAD2: + case KeyInput.KEY_NUMPAD3: + case KeyInput.KEY_NUMPAD4: + case KeyInput.KEY_NUMPAD5: + case KeyInput.KEY_NUMPAD6: + case KeyInput.KEY_NUMPAD7: + case KeyInput.KEY_NUMPAD8: + case KeyInput.KEY_NUMPAD9: + numberBuilder.append(kie.getKeyChar()); + break; + case KeyInput.KEY_PERIOD: + if (numberBuilder.indexOf(".") == -1) { // if it doesn't exist yet + if (numberBuilder.length() == 0 + || (numberBuilder.length() == 1 && numberBuilder.charAt(0) == '-')) { + numberBuilder.append("0."); + } else { + numberBuilder.append("."); + } } - } - return true; + break; } - - return false; } /** @@ -311,25 +320,42 @@ public class ShortcutManager { } /** - * Check for axis input for key X,Y,Z and store the corresponding UNIT_ into - * the axisStore + * Test if the given kie can be handled as en axis input by the getAxisKey() + * method. * - * @param kie - * @param axisStore - * @return true if the given kie is handled as a Axis input + * @param kie the KeyInputEvent to test + * @return true is the kie can be handled as an axis input, else false */ - public static boolean checkAxisKey(KeyInputEvent kie, Vector3f axisStore) { - if (kie.getKeyCode() == KeyInput.KEY_X) { - axisStore.set(Vector3f.UNIT_X); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_Y) { - axisStore.set(Vector3f.UNIT_Y); - return true; - } else if (kie.getKeyCode() == KeyInput.KEY_Z) { - axisStore.set(Vector3f.UNIT_Z); - return true; + public static boolean isAxisKey(KeyInputEvent kie) { + switch (kie.getKeyCode()) { + case KeyInput.KEY_X: + case KeyInput.KEY_Y: + case KeyInput.KEY_Z: + return true; } return false; } + /** + * Handle the Kie as an axis input : return a Vector3f from the kie keyCode. + * + * @param kie the KeyInputEvent to handle as an Axis + * @return UNIT_X for 'x', UNIT_Y for 'y' and UNIT_Z for 'z' kie. + */ + public static Vector3f getAxisKey(KeyInputEvent kie) { + Vector3f result = Vector3f.ZERO; + switch (kie.getKeyCode()) { + case KeyInput.KEY_X: + result = Vector3f.UNIT_X; + break; + case KeyInput.KEY_Y: + result = Vector3f.UNIT_Y; + break; + case KeyInput.KEY_Z: + result = Vector3f.UNIT_Z; + break; + } + return result; + } + } diff --git a/sdk/jme3-templates/nbproject/project.properties b/sdk/jme3-templates/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-templates/nbproject/project.properties +++ b/sdk/jme3-templates/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-terrain-editor/nbproject/project.properties b/sdk/jme3-terrain-editor/nbproject/project.properties index a0916a395..0ed16b7c1 100644 --- a/sdk/jme3-terrain-editor/nbproject/project.properties +++ b/sdk/jme3-terrain-editor/nbproject/project.properties @@ -1,7 +1,7 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Brent Owens, Normen Hansen spec.version.base=3.1.0 diff --git a/sdk/jme3-tests-template/nbproject/project.properties b/sdk/jme3-tests-template/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-tests-template/nbproject/project.properties +++ b/sdk/jme3-tests-template/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/testsdesktop/Bundle.properties b/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/testsdesktop/Bundle.properties index 189077573..c5264da33 100644 --- a/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/testsdesktop/Bundle.properties +++ b/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/testsdesktop/Bundle.properties @@ -1,7 +1,7 @@ # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. - +LBL_CreateProjectStep=Name and Location JmeTestsPanelVisual.projectNameLabel.text=Project &Name: JmeTestsPanelVisual.projectLocationLabel.text=Project &Location: JmeTestsPanelVisual.browseButton.actionCommand=BROWSE diff --git a/sdk/jme3-texture-editor/nbproject/project.properties b/sdk/jme3-texture-editor/nbproject/project.properties index c4186f216..c3e2aa46a 100644 --- a/sdk/jme3-texture-editor/nbproject/project.properties +++ b/sdk/jme3-texture-editor/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=pgi nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-vehicle-creator/nbproject/project.properties b/sdk/jme3-vehicle-creator/nbproject/project.properties index 44c34ecb9..0411b6ff9 100644 --- a/sdk/jme3-vehicle-creator/nbproject/project.properties +++ b/sdk/jme3-vehicle-creator/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-wavefront/nbproject/project.properties b/sdk/jme3-wavefront/nbproject/project.properties index 9d2616783..98f519f77 100644 --- a/sdk/jme3-wavefront/nbproject/project.properties +++ b/sdk/jme3-wavefront/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-welcome-screen/nbproject/project.properties b/sdk/jme3-welcome-screen/nbproject/project.properties index 99dbdf441..ae558b0e0 100644 --- a/sdk/jme3-welcome-screen/nbproject/project.properties +++ b/sdk/jme3-welcome-screen/nbproject/project.properties @@ -1,7 +1,7 @@ -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen, jiyarza nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jmonkeyplatform.png b/sdk/jmonkeyplatform.png index eee01902f..36675de77 100644 Binary files a/sdk/jmonkeyplatform.png and b/sdk/jmonkeyplatform.png differ diff --git a/sdk/license-jme.txt b/sdk/license-jme.txt index 9f1503915..9c2661e5b 100644 --- a/sdk/license-jme.txt +++ b/sdk/license-jme.txt @@ -1,4 +1,4 @@ -Copyright (c) 2003-2012 jMonkeyEngine +Copyright (c) 2003-2015 jMonkeyEngine All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sdk/nbi/stub/ext/components/products/blender/nbproject/build-impl.xml b/sdk/nbi/stub/ext/components/products/blender/nbproject/build-impl.xml index 6b25635be..f15304e39 100644 --- a/sdk/nbi/stub/ext/components/products/blender/nbproject/build-impl.xml +++ b/sdk/nbi/stub/ext/components/products/blender/nbproject/build-impl.xml @@ -54,6 +54,7 @@ is divided into following sections: + @@ -71,16 +72,20 @@ is divided into following sections: - + - - + + + - - - + + + + + + @@ -91,12 +96,6 @@ is divided into following sections: - - - - - - @@ -115,24 +114,12 @@ is divided into following sections: - + - + - - - - - - - - - - - - @@ -186,7 +173,15 @@ is divided into following sections: - + + + + + + + + + @@ -275,6 +270,7 @@ is divided into following sections: + @@ -314,6 +310,7 @@ is divided into following sections: + @@ -370,6 +367,11 @@ is divided into following sections: + + + + + @@ -393,7 +395,7 @@ is divided into following sections: - + @@ -407,6 +409,9 @@ is divided into following sections: + + + @@ -438,7 +443,7 @@ is divided into following sections: - + @@ -534,7 +539,7 @@ is divided into following sections: - + @@ -548,6 +553,9 @@ is divided into following sections: + + + @@ -826,8 +834,8 @@ is divided into following sections: - - + + @@ -839,7 +847,7 @@ is divided into following sections: - + @@ -894,6 +902,7 @@ is divided into following sections: + @@ -927,7 +936,7 @@ is divided into following sections: - + @@ -962,41 +971,25 @@ is divided into following sections: - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - + - + - + - + + + + + + @@ -1004,23 +997,41 @@ is divided into following sections: - + To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" - + + + + + + + + + + + + + + + + + - + + - + + - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - + - + - + - + + + + + + @@ -1004,23 +997,41 @@ is divided into following sections: - + To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" - + + + + + + + + + + + + + + + + + - + + - + + - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - + - + - + - + + + + + + @@ -1004,23 +997,41 @@ is divided into following sections: - + To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" - + + + + + + + + + + + + + + + + + - + + - + + - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - + - + - + - + + + + + + @@ -1004,23 +997,41 @@ is divided into following sections: - + To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" - + + + + + + + + + + + + + + + + + - + + - + + + + diff --git a/sdk/nbproject/platform.properties b/sdk/nbproject/platform.properties index 73f8590d7..65b38a709 100644 --- a/sdk/nbproject/platform.properties +++ b/sdk/nbproject/platform.properties @@ -1,4 +1,6 @@ branding.token=jmonkeyplatform +keystore=../nbproject/private/keystore.jks +nbm_alias=jmeupdates cluster.path=\ ${nbplatform.active.dir}/extide:\ ${nbplatform.active.dir}/harness:\ diff --git a/sdk/nbproject/project.properties b/sdk/nbproject/project.properties index dbcdb7343..64104ff3a 100644 --- a/sdk/nbproject/project.properties +++ b/sdk/nbproject/project.properties @@ -3,13 +3,16 @@ app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif #same as ${branding.token} app.name=jmonkeyplatform app.title=jMonkeyEngine SDK +app.description=A complete 3D game development suite written purely in Java. +app.categories=Development,Graphics,IDE,3DGraphics,Java app.icon.icns=jmonkeyplatform.icns #version name used for application and settings folder, no spaces! app.version=3.1-snapshot-github #version number used for plugins, only 3 numbers (e.g. 3.1.3) plugins.version=3.1.0 +nbm.revision=0 #command line args -run.args.extra=-J-Xmx512m -J-XX\:PermSize\=128m -J-XX\:MaxDirectMemorySize\=2048m -J-Dsun.zip.disableMemoryMapping\=true -J-Dapple.awt.graphics.UseQuartz\=true -J-Dsun.java2d.noddraw\=true +run.args.extra=-J-Dsun.java2d.dpiaware\=true -J-Dapple.laf.useScreenMenuBar\=true -J-Dawt.useSystemAAFontSettings\=lcd -J-Dswing.aatext\=true -J-Xmx512m -J-XX\:MaxDirectMemorySize\=2048m -J-Dsun.zip.disableMemoryMapping\=true -J-Dapple.awt.graphics.UseQuartz\=true -J-Dsun.java2d.noddraw\=true auxiliary.org-netbeans-modules-apisupport-installer.license-file=license-jme.txt auxiliary.org-netbeans-modules-apisupport-installer.os-linux=true auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=true @@ -48,7 +51,8 @@ modules=\ ${project.com.jme3.gde.angelfont}:\ ${project.com.jme3.gde.android}:\ ${project.com.jme3.gde.nmgen}:\ - ${project.com.jme3.gde.docs} + ${project.com.jme3.gde.docs}:\ + ${project.org.jme3.netbeans.plaf.darkmonkey} project.com.jme3.gde.android=jme3-android project.com.jme3.gde.angelfont=jme3-angelfont project.com.jme3.gde.blender=jme3-blender @@ -82,3 +86,4 @@ project.com.jme3.gde.textureeditor=jme3-texture-editor project.com.jme3.gde.vehiclecreator=jme3-vehicle-creator project.com.jme3.gde.wavefront=jme3-wavefront project.com.jme3.gde.welcome=jme3-welcome-screen +project.org.jme3.netbeans.plaf.darkmonkey=jme3-dark-laf diff --git a/settings.gradle b/settings.gradle index 89b8fc075..6aad1b374 100644 --- a/settings.gradle +++ b/settings.gradle @@ -36,7 +36,7 @@ include 'jme3-testdata' include 'jme3-examples' if(buildAndroidExamples == "true"){ - include 'jme3-android-examples' + include 'jme3-android-examples' } if(buildSdkProject == "true"){ diff --git a/upload.gradle b/upload.gradle new file mode 100644 index 000000000..e28f5f41b --- /dev/null +++ b/upload.gradle @@ -0,0 +1,6 @@ +task copySshKnownHosts(type: Copy) { + from 'private/known_hosts' + into System.properties['user.home'] + '/.ssh' +} + +uploadArchives.dependsOn copySshKnownHosts \ No newline at end of file diff --git a/version.gradle b/version.gradle new file mode 100644 index 000000000..40e934278 --- /dev/null +++ b/version.gradle @@ -0,0 +1,117 @@ +/* + Version Info Examples + ===================== + + Nightly Build Snapshot + * Full Version: 3.1-5124 + * POM Version: 3.1.0-SNAPSHOT + * NBM Revision: 5124 + * NBM UC Suffix: nightly/3.1/plugins + + Nightly Build Snapshot (PBRIsComing branch) + * Full Version: 3.1-PBRIsComing-5124 + * POM Version: 3.1.0-PBRIsComing-SNAPSHOT + * NBM Revision: 5124 + * NBM UC Suffix: PBRIsComing-nightly/3.1/plugins + + Alpha1 Release + * Full Version: 3.1-alpha1 + * POM Version: 3.1.0-alpha1 + * NBM Revision: 1 + * NBM UC Suffix: stable/3.1/plugins + + Final Release + * Full Version: 3.1 + * POM Version: 3.1.0 + * NBM Revision: 5 + * NBM UC Suffix: stable/3.1/plugins + */ + +import java.text.SimpleDateFormat +import org.ajoberstar.grgit.* + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.ajoberstar:gradle-git:1.2.0' + } +} + +ext { + jmeRevision = 0 + jmeNbmRevision = 0 + jmeGitHash = "" + jmeGitTag = "" + jmeShortGitHash = "" + jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + jmeBranchName = "unknown" + jmeFullVersion = "${jmeVersion}-UNKNOWN" + jmePomVersion = "unknown" + jmeNbmUcSuffix = "unknown" +} + +task configureVersionInfo { + try { + def grgit = Grgit.open(project.file('.')) + jmeRevision = grgit.log(includes:['HEAD']).size() + jmeGitHash = grgit.head().id + jmeShortGitHash = grgit.head().abbreviatedId + jmeBranchName = grgit.branch.current.name + jmeGitTag = grgit.describe() + if (jmeGitTag == null) jmeGitTag = "" + + if (System.env.TRAVIS_BRANCH != null) { + jmeBranchName = System.env.TRAVIS_BRANCH + } + if (System.env.TRAVIS_TAG != null) { + jmeGitTag = System.env.TRAVIS_TAG + } + if (System.env.TRAVIS_PULL_REQUEST != null && + System.env.TRAVIS_PULL_REQUEST != "false") { + jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST + } + + jmeFullVersion = jmeMainVersion + jmePomVersion = jmeVersion + + if (jmeBranchName != "master") { + jmeFullVersion += "-${jmeBranchName}" + jmePomVersion += "-${jmeBranchName}" + + jmeNbmUcSuffix = "${jmeBranchName}-" + } else { + jmeNbmUcSuffix = "" + } + + if (jmeVersionTag == "SNAPSHOT") { + jmeNbmUcSuffix += "nightly" + } else { + jmeNbmUcSuffix += "stable" + } + + jmeNbmUcSuffix += "/" + jmeMainVersion + "/plugins" + + if (jmeVersionTag == "SNAPSHOT") { + jmeFullVersion += "-${jmeRevision}" + jmePomVersion += "-SNAPSHOT" + jmeNbmRevision = jmeRevision + } else if (jmeVersionTag == "") { + jmeNbmRevision = jmeVersionTagID + } else { + jmeFullVersion += "-${jmeVersionTag}" + jmePomVersion += "-${jmeVersionTag}" + jmeNbmRevision = jmeVersionTagID + } + + logger.warn("Full Version: ${jmeFullVersion}") + logger.warn("POM Version: ${jmePomVersion}") + logger.warn("NBM Revision: ${jmeNbmRevision}") + logger.warn("NBM UC Suffix: ${jmeNbmUcSuffix}") + } catch (ex) { + // Failed to get repo info + logger.warn("Failed to get repository info: " + ex.message + ". " + \ + "Only partial build info will be generated.") + } +}