com.hermetica.magician
Class GLComponentFactory

java.lang.Object
  |
  +--com.hermetica.magician.GLComponentFactory

public class GLComponentFactory
extends java.lang.Object

This class instantiates GLComponent objects tailored to the requirements that you give it and the JVM/AWT implementation you are currently executing Magician applications on. For example, Sun and Microsoft's AWT implementations for Magician are incompatible, but this class will hide the differences for you ensuring your applications work on all platforms without any code changes.

Version:
$Id: GLComponentFactory.java,v 1.2 1999/06/03 23:11:48 descarte Exp $
Author:
Alligator Descartes
See Also:
GLComponent, GLContext

Constructor Summary
GLComponentFactory()
           
 
Method Summary
static GLComponent createGLComponent()
          Creates a new GLComponent object with the default dimensions of 100x100
static GLComponent createGLComponent(java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions
static GLComponent createGLComponent(GLComponent component)
          Creates a new GLComponent object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.
static GLComponent createGLComponent(GLComponent component, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component
static GLComponent createGLComponent(GLComponent component, GLContext context)
          Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLComponent createGLComponent(GLComponent component, GLContext context, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLComponent createGLComponent(GLComponent component, GLContext context, int width, int height)
          Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context
static GLComponent createGLComponent(GLComponent component, int width, int height)
          Creates a new GLComponent object with the given dimensions and sharing the display lists and texture objects of the given component
static GLComponent createGLComponent(GLContext context)
          Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context
static GLComponent createGLComponent(GLContext context, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the pre-created rendering context
static GLComponent createGLComponent(GLContext context, int width, int height)
          Creates a new GLComponent object with the given dimensions and the pre-created rendering context
static GLComponent createGLComponent(int width, int height)
          Creates a new GLComponent object with the given dimensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLComponentFactory

public GLComponentFactory()
Method Detail

createGLComponent

public static final GLComponent createGLComponent()
Creates a new GLComponent object with the default dimensions of 100x100

Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLComponent component)
Creates a new GLComponent object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.

Parameters:
component - Another component whose texture objects and display lists will be shared
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLContext context)
Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context

Parameters:
context - The pre-allocated OpenGL rendering context
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLComponent component,
                                                  GLContext context)
Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLComponent component,
                                                  GLContext context,
                                                  java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(int width,
                                                  int height)
Creates a new GLComponent object with the given dimensions

Parameters:
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions

Parameters:
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLContext context,
                                                  java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLContext context,
                                                  int width,
                                                  int height)
Creates a new GLComponent object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLComponent component,
                                                  int width,
                                                  int height)
Creates a new GLComponent object with the given dimensions and sharing the display lists and texture objects of the given component

Parameters:
component - The component whose display lists and texture objects are to be shared
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLComponent createGLComponent(GLComponent component,
                                                  java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component

Parameters:
context - The component whose display lists and texture objects are to be shared
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static GLComponent createGLComponent(GLComponent component,
                                            GLContext context,
                                            int width,
                                            int height)
Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context

Parameters:
component - The component whose display lists and texture objects are to be shared
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object