summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java2
-rw-r--r--src/classes/javax/media/opengl/GLDrawableFactory.java15
2 files changed, 12 insertions, 5 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
index 64b4d437c..1243a766a 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
@@ -90,7 +90,7 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
GraphicsDevice device = null;
if (absDevice != null &&
!(absDevice instanceof AWTGraphicsDevice)) {
- throw new GLException("This GLDrawableFactory accepts only AWTGraphicsDevice objects");
+ throw new IllegalArgumentException("This GLDrawableFactory accepts only AWTGraphicsDevice objects");
}
if ((absDevice == null) ||
diff --git a/src/classes/javax/media/opengl/GLDrawableFactory.java b/src/classes/javax/media/opengl/GLDrawableFactory.java
index 42cf8a724..39724c976 100644
--- a/src/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/classes/javax/media/opengl/GLDrawableFactory.java
@@ -130,17 +130,24 @@ public abstract class GLDrawableFactory {
* other window toolkit-specific object with a GLDrawable. Some
* platforms (specifically X11) require the graphics configuration
* to be specified when the window toolkit object is created. This
- * method returns null on platforms on which the OpenGL pixel format
- * selection process is performed later. </P>
+ * method may return null on platforms on which the OpenGL pixel
+ * format selection process is performed later. </P>
*
* <P> The concrete data type of the passed graphics device and
* returned graphics configuration must be specified in the
* documentation binding this particular API to the underlying
* window toolkit. The Reference Implementation accepts {@link
* AWTGraphicsDevice AWTGraphicsDevice} objects and returns {@link
- * AWTGraphicsConfiguration AWTGraphicsConfiguration} objects.
+ * AWTGraphicsConfiguration AWTGraphicsConfiguration} objects. </P>
*
- * @see java.awt.Canvas#Canvas(java.awt.GraphicsConfiguration) */
+ * @see java.awt.Canvas#Canvas(java.awt.GraphicsConfiguration)
+ *
+ * @throws IllegalArgumentException if the data type of the passed
+ * AbstractGraphicsDevice is not supported by this
+ * GLDrawableFactory.
+ * @throws GLException if any window system-specific errors caused
+ * the selection of the graphics configuration to fail.
+ */
public abstract AbstractGraphicsConfiguration
chooseGraphicsConfiguration(GLCapabilities capabilities,
GLCapabilitiesChooser chooser,