com.jogamp.nativewindow
Class DelegatedUpstreamSurfaceHookWithSurfaceSize

java.lang.Object
  extended by com.jogamp.nativewindow.DelegatedUpstreamSurfaceHookWithSurfaceSize
All Implemented Interfaces:
UpstreamSurfaceHook

public class DelegatedUpstreamSurfaceHookWithSurfaceSize
extends Object
implements UpstreamSurfaceHook


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.media.nativewindow.UpstreamSurfaceHook
UpstreamSurfaceHook.MutableSize
 
Constructor Summary
DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream, NativeSurface surface)
           
 
Method Summary
 void create(ProxySurface s)
          called within ProxySurface.createNotify() within lock, before using surface.
 void destroy(ProxySurface s)
          called within ProxySurface.destroyNotify() within lock, before clearing fields.
 int getHeight(ProxySurface s)
          Returns the height of the upstream surface, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
 int getWidth(ProxySurface s)
          Returns the width of the upstream surface, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatedUpstreamSurfaceHookWithSurfaceSize

public DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream,
                                                   NativeSurface surface)
Parameters:
upstream - optional upstream UpstreamSurfaceHook used for create(ProxySurface) and destroy(ProxySurface).
surface - mandatory NativeSurface used for getWidth(ProxySurface) and getHeight(ProxySurface)
Method Detail

create

public final void create(ProxySurface s)
Description copied from interface: UpstreamSurfaceHook
called within ProxySurface.createNotify() within lock, before using surface.

Specified by:
create in interface UpstreamSurfaceHook

destroy

public final void destroy(ProxySurface s)
Description copied from interface: UpstreamSurfaceHook
called within ProxySurface.destroyNotify() within lock, before clearing fields.

Specified by:
destroy in interface UpstreamSurfaceHook

getWidth

public final int getWidth(ProxySurface s)
Description copied from interface: UpstreamSurfaceHook
Returns the width of the upstream surface, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Specified by:
getWidth in interface UpstreamSurfaceHook

getHeight

public final int getHeight(ProxySurface s)
Description copied from interface: UpstreamSurfaceHook
Returns the height of the upstream surface, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Specified by:
getHeight in interface UpstreamSurfaceHook

toString

public String toString()
Overrides:
toString in class Object


Copyright 2010 JogAmp Community.