aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-08 19:51:21 +0200
committerSven Gothel <[email protected]>2013-09-08 19:51:21 +0200
commitbadc13213bcf952830afe606ba71683540aba5a3 (patch)
tree6749ee1514ce8ebb0321d146267048062558185e /src/jogl/classes/javax/media/opengl/awt
parentfb6440fb6e4fac31d03799d5cf804d02c78f2c38 (diff)
AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java3
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java7
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java7
3 files changed, 5 insertions, 12 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java b/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java
index 301e18722..1a4c5bac0 100644
--- a/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java
+++ b/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java
@@ -70,6 +70,9 @@ import jogamp.nativewindow.awt.AWTMisc;
*/
public interface AWTPrintLifecycle {
+ public static final int DEFAULT_PRINT_TILE_SIZE = 512;
+
+
/**
* Shall be called before {@link Component#print(Graphics)}.
* <p>
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 8745a8d24..047c94b58 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -54,16 +54,12 @@ import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
import javax.media.nativewindow.OffscreenLayerOption;
@@ -728,7 +724,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
paint(g);
}
- private static final int PRINT_TILE_SIZE = 512;
private volatile boolean printActive = false;
private boolean printUseAA = false;
private GLAnimatorControl printAnimator = null;
@@ -793,7 +788,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
}
final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
- printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, PRINT_TILE_SIZE, PRINT_TILE_SIZE, null);
+ printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, DEFAULT_PRINT_TILE_SIZE, DEFAULT_PRINT_TILE_SIZE, null);
GLDrawableUtil.swapGLContextAndAllGLEventListener(GLCanvas.this, printGLAD);
}
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 44586d45b..c97d1e24f 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -49,16 +49,12 @@ import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
import java.beans.Beans;
import java.nio.IntBuffer;
-import java.util.Iterator;
import java.util.List;
-import java.util.Set;
-import java.util.Map.Entry;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeSurface;
@@ -501,7 +497,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
}
- private static final int PRINT_TILE_SIZE = 512;
private volatile boolean printActive = false;
private boolean printUseAA = false;
private GLAnimatorControl printAnimator = null;
@@ -565,7 +560,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
caps.setSampleBuffers(true);
caps.setNumSamples(8);
final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
- printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, PRINT_TILE_SIZE, PRINT_TILE_SIZE, null);
+ printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, DEFAULT_PRINT_TILE_SIZE, DEFAULT_PRINT_TILE_SIZE, null);
GLDrawableUtil.swapGLContextAndAllGLEventListener(GLJPanel.this, printGLAD);
}
}