FileDocCategorySizeDatePackage
EGLDisplayImpl.javaAPI DocphoneME MR2 API (J2ME)2323Wed May 02 18:00:48 BST 2007javax.microedition.khronos.egl

EGLDisplayImpl

public final class EGLDisplayImpl extends EGLDisplay
A class encapsulating an EGL display. An EGLDisplay instance may be obtained from EGL.eglGetDisplay.

Fields Summary
private static final Hashtable
byId
int
nativeId
Constructors Summary
public EGLDisplayImpl(int nativeId)


       
        synchronized (byId) {
            this.nativeId = nativeId;
            byId.put(new Integer(nativeId), new WeakReference(this));
        }
    
Methods Summary
public voiddispose()

	synchronized (byId) {
	    byId.remove(new Integer(nativeId));
	    this.nativeId = 0;
	}
    
public static javax.microedition.khronos.egl.EGLDisplayImplgetInstance(int nativeId)

        synchronized (byId) {
            WeakReference ref = (WeakReference)byId.get(new Integer(nativeId));
            EGLDisplayImpl display = ref != null ?
                    (EGLDisplayImpl)ref.get() : null;
            if (display == null) {
                return new EGLDisplayImpl(nativeId);
            } else {
                return display;
            }
        }
    
public intnativeId()

	return nativeId;
    
public java.lang.StringtoString()

  	return "EGLDisplayImpl[" + nativeId + "]";