1 package tim.prune.threedee;
3 import javax.swing.JFrame;
8 * Factory class for getting a Window
10 public abstract class WindowFactory
12 private static ThreeDWindow _window = null;
16 * @param inApp App object
17 * @param inFrame parent frame
18 * @return object if available, otherwise null
20 public static ThreeDWindow getWindow(App inApp, JFrame inFrame)
22 if (isJava3dEnabled())
24 if (_window == null) _window = new Java3DWindow(inApp, inFrame);
32 * @return true if 3d capability is installed
34 public static boolean isJava3dEnabled()
36 boolean has3d = false;
39 Class universeClass = Class.forName("com.sun.j3d.utils.universe.SimpleUniverse");
40 has3d = (universeClass != null);
42 catch (ClassNotFoundException e)
44 // no java3d classes available