summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/awt/VersionApplet.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/awt/VersionApplet.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
index 9173a38cb..2f87f01a9 100644
--- a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
+++ b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
@@ -31,12 +31,12 @@ public class VersionApplet extends Applet {
TextArea tareaCaps;
GLCanvas canvas;
- public static void main(String[] args) {
- Frame frame = new Frame("JOGL Version Applet");
+ public static void main(final String[] args) {
+ final Frame frame = new Frame("JOGL Version Applet");
frame.setSize(800, 600);
frame.setLayout(new BorderLayout());
- VersionApplet va = new VersionApplet();
+ final VersionApplet va = new VersionApplet();
frame.addWindowListener(new ClosingWindowAdapter(frame, va));
va.init();
@@ -50,12 +50,12 @@ public class VersionApplet extends Applet {
static class ClosingWindowAdapter extends WindowAdapter {
Frame f;
VersionApplet va;
- public ClosingWindowAdapter(Frame f, VersionApplet va) {
+ public ClosingWindowAdapter(final Frame f, final VersionApplet va) {
this.f = f;
this.va = va;
}
@Override
- public void windowClosing(WindowEvent ev) {
+ public void windowClosing(final WindowEvent ev) {
f.setVisible(false);
va.stop();
va.destroy();
@@ -70,8 +70,8 @@ public class VersionApplet extends Applet {
setEnabled(true);
- GLProfile glp = GLProfile.getDefault();
- GLCapabilities glcaps = new GLCapabilities(glp);
+ final GLProfile glp = GLProfile.getDefault();
+ final GLCapabilities glcaps = new GLCapabilities(glp);
setLayout(new BorderLayout());
String s;
@@ -96,16 +96,16 @@ public class VersionApplet extends Applet {
tareaVersion.append(s);
tareaCaps = new TextArea(120, 20);
- GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
- List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
+ final GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+ final List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
for(int i=0; i<availCaps.size(); i++) {
- s = ((GLCapabilitiesImmutable) availCaps.get(i)).toString();
+ s = availCaps.get(i).toString();
System.err.println(s);
tareaCaps.append(s);
tareaCaps.append(Platform.getNewline());
}
- Container grid = new Container();
+ final Container grid = new Container();
grid.setLayout(new GridLayout(2, 1));
grid.add(tareaVersion);
grid.add(tareaCaps);
@@ -160,23 +160,23 @@ public class VersionApplet extends Applet {
class GLInfo implements GLEventListener {
@Override
- public void init(GLAutoDrawable drawable) {
- GL gl = drawable.getGL();
- String s = JoglVersion.getGLInfo(gl, null).toString();
+ public void init(final GLAutoDrawable drawable) {
+ final GL gl = drawable.getGL();
+ final String s = JoglVersion.getGLInfo(gl, null).toString();
System.err.println(s);
tareaVersion.append(s);
}
@Override
- public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
}
@Override
- public void display(GLAutoDrawable drawable) {
+ public void display(final GLAutoDrawable drawable) {
}
@Override
- public void dispose(GLAutoDrawable drawable) {
+ public void dispose(final GLAutoDrawable drawable) {
}
}