From a74f1100b11eb3a6944a73eea48bf17d14ede8c1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 13 Mar 2009 11:55:23 +0000 Subject: New package Native Window Interface 'java.media.nwi', to loose JOGL dependencies for the moved interfaces, mainly NativeWindow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1863 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/javafx/newt/x11/X11Window.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/classes/com/sun/javafx/newt/x11') diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java index ee0846e1b..312cc161d 100755 --- a/src/classes/com/sun/javafx/newt/x11/X11Window.java +++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java @@ -35,8 +35,8 @@ package com.sun.javafx.newt.x11; import com.sun.javafx.newt.*; import com.sun.opengl.impl.*; -import javax.media.opengl.GLCapabilities; -import javax.media.opengl.NativeWindowException; +import javax.media.nwi.NWCapabilities; +import javax.media.nwi.NativeWindowException; public class X11Window extends Window { private static final String WINDOW_CLASS_NAME = "NewtWindow"; @@ -47,19 +47,19 @@ public class X11Window extends Window { NativeLibLoader.loadNEWT(); if (!initIDs()) { - throw new RuntimeException("Failed to initialize jmethodIDs"); + throw new NativeWindowException("Failed to initialize jmethodIDs"); } } public X11Window() { } - protected void createNative(GLCapabilities caps) { - chosenCaps = (GLCapabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID) + protected void createNative(NWCapabilities caps) { + chosenCaps = (NWCapabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID) visualID = 0; // n/a long w = CreateWindow(getDisplayHandle(), getScreenHandle(), getScreenIndex(), visualID, x, y, width, height); if (w == 0 || w!=windowHandle) { - throw new RuntimeException("Error creating window: "+w); + throw new NativeWindowException("Error creating window: "+w); } windowHandleClose = windowHandle; displayHandleClose = getDisplayHandle(); -- cgit v1.2.3