aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-examples/src
diff options
context:
space:
mode:
authorrenanse <[email protected]>2012-12-19 17:30:05 -0600
committerrenanse <[email protected]>2012-12-19 17:30:05 -0600
commit580b097cb031ee97180849736f66b1c60fe515e1 (patch)
treea328d685d4141e6a05f84962dead09f5af93f836 /ardor3d-examples/src
parentd38661526216e2efe7e1d8abf01cf8d4f21fe53a (diff)
Various audit cleanup suggestions.
Diffstat (limited to 'ardor3d-examples/src')
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java5
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java16
2 files changed, 11 insertions, 10 deletions
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
index d60f204..32f638a 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java
@@ -642,7 +642,8 @@ public class ExampleRunner extends JFrame {
* @see FileFilter
*/
public boolean accept(final File pathname) {
- return (pathname.isDirectory() && !pathname.getName().startsWith("."))
+ return (pathname.isDirectory() && (pathname.getName().length() == 0 || pathname.getName()
+ .charAt(0) != '.'))
|| (pathname.getName().endsWith(".class") && pathname.getName().indexOf('$') < 0);
}
};
@@ -661,7 +662,7 @@ public class ExampleRunner extends JFrame {
if (name.endsWith(".class") && name.indexOf('$') < 0) {
String classname = name.substring(0, name.length() - ".class".length());
- if (classname.startsWith("/")) {
+ if (classname.length() > 0 && classname.charAt(0) == '/') {
classname = classname.substring(1);
}
classname = classname.replace('/', '.');
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java
index b1d78aa..38612f2 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java
@@ -70,27 +70,27 @@ public class ScenegraphTree {
str.append(spatial.getName());
str.append(" - ");
- str.append(spatial.getClass().getName()).append("\n");
+ str.append(spatial.getClass().getName()).append('\n');
if (spatial instanceof Mesh) {
final Mesh mesh = (Mesh) spatial;
str.append("Primitives: ");
- str.append(mesh.getMeshData().getTotalPrimitiveCount()).append("\n");
+ str.append(mesh.getMeshData().getTotalPrimitiveCount()).append('\n');
str.append("Index mode: ");
- str.append(mesh.getMeshData().getIndexMode(0)).append("\n");
+ str.append(mesh.getMeshData().getIndexMode(0)).append('\n');
}
- str.append(spatial.getTransform()).append("\n");
+ str.append(spatial.getTransform()).append('\n');
if (spatial.getWorldBound() != null) {
- str.append(spatial.getWorldBound()).append("\n");
+ str.append(spatial.getWorldBound()).append('\n');
}
- str.append("\n");
+ str.append('\n');
final SceneHints sceneHints = spatial.getSceneHints();
str.append("Cull hint: ");
- str.append(sceneHints.getCullHint()).append("\n");
+ str.append(sceneHints.getCullHint()).append('\n');
str.append("Bucket: ");
- str.append(sceneHints.getRenderBucketType()).append("\n");
+ str.append(sceneHints.getRenderBucketType()).append('\n');
textArea.setText(str.toString());
}