diff options
author | Kenneth Russel <[email protected]> | 2005-10-28 16:02:35 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-10-28 16:02:35 +0000 |
commit | c1eb552374f1a147fa276dbef2a1da0c91116686 (patch) | |
tree | 817fee809733acdc36a7a7cc85c6d047f03ee2ef /src/classes/javax/media/opengl/GLJPanel.java | |
parent | aac4d7b9dce4bf2873aec3d0ecccbe9972bd5e23 (diff) |
Removed RI-specific method descriptions from addNotify(), update(),
etc. based on feedback from pepijnve on the javagaming.org forums.
Added documentation on what subclasses must do if these methods are
overridden as in Java3D specification.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@411 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl/GLJPanel.java')
-rw-r--r-- | src/classes/javax/media/opengl/GLJPanel.java | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java index 73fec78ac..d2d14c7b7 100644 --- a/src/classes/javax/media/opengl/GLJPanel.java +++ b/src/classes/javax/media/opengl/GLJPanel.java @@ -240,9 +240,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable { return true; } - /** Overridden from JComponent; calls event listeners' {@link - GLEventListener#display display} methods. Should not be invoked - by applications directly. */ + /** Overridden to cause OpenGL rendering to be performed during + repaint cycles. Subclasses which override this method must call + super.paintComponent() in their paintComponent() method in order + to function properly. <P> + + <B>Overrides:</B> + <DL><DD><CODE>paintComponent</CODE> in class <CODE>javax.swing.JComponent</CODE></DD></DL> */ protected void paintComponent(final Graphics g) { if (shouldInitialize) { initialize(); @@ -346,8 +350,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable { } } - /** Overridden from JPanel; used to indicate that an OpenGL context - may be created for the component. */ + /** Overridden to track when this component is added to a container. + Subclasses which override this method must call + super.addNotify() in their addNotify() method in order to + function properly. <P> + + <B>Overrides:</B> + <DL><DD><CODE>addNotify</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */ public void addNotify() { super.addNotify(); shouldInitialize = true; @@ -356,8 +365,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable { } } - /** Overridden from JPanel; used to indicate that it's no longer - safe to have an OpenGL context for the component. */ + /** Overridden to track when this component is removed from a + container. Subclasses which override this method must call + super.removeNotify() in their removeNotify() method in order to + function properly. <P> + + <B>Overrides:</B> + <DL><DD><CODE>removeNotify</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */ public void removeNotify() { if (DEBUG) { System.err.println("GLJPanel.removeNotify()"); @@ -397,10 +411,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable { super.removeNotify(); } - /** Overridden from Canvas; causes {@link GLEventListener#reshape - reshape} to be called on all registered {@link - GLEventListener}s. Called automatically by the AWT; should not - be invoked by applications directly. */ + /** Overridden to cause {@link GLDrawableHelper#reshape} to be + called on all registered {@link GLEventListener}s. Subclasses + which override this method must call super.reshape() in + their reshape() method in order to function properly. <P> + + <B>Overrides:</B> + <DL><DD><CODE>reshape</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */ public void reshape(int x, int y, int width, int height) { super.reshape(x, y, width, height); |