com.metsci.glimpse.context
Class GlimpseContextImpl

java.lang.Object
  extended by com.metsci.glimpse.context.GlimpseContextImpl
All Implemented Interfaces:
GlimpseContext

public class GlimpseContextImpl
extends java.lang.Object
implements GlimpseContext


Constructor Summary
GlimpseContextImpl(GlimpseCanvas canvas)
           
 
Method Summary
 int getDPI()
           
 javax.media.opengl.GL getGL()
           
 javax.media.opengl.GLContext getGLContext()
           
 GlimpseTargetStack getTargetStack()
          The GlimpseTargetStack stack contains the chain of nested GlimpseTargets starting at the top level GlimpseTarget (index 0) and ending at the GlimpseTarget currently being painted to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlimpseContextImpl

public GlimpseContextImpl(GlimpseCanvas canvas)
Method Detail

getGLContext

public javax.media.opengl.GLContext getGLContext()
Specified by:
getGLContext in interface GlimpseContext
Returns:
a reference to the OpenGL rendering context wrapped by this GlimpseContext

getGL

public javax.media.opengl.GL getGL()
Specified by:
getGL in interface GlimpseContext
Returns:
a convenience method shorthand for the common: getGLContext( ).getGL( )

getTargetStack

public GlimpseTargetStack getTargetStack()
Description copied from interface: GlimpseContext
The GlimpseTargetStack stack contains the chain of nested GlimpseTargets starting at the top level GlimpseTarget (index 0) and ending at the GlimpseTarget currently being painted to.

The top level GlimpseTarget is always an instance of GlimpseCanvas. The other levels are instances of GlimpseLayout.

Specified by:
getTargetStack in interface GlimpseContext

getDPI

public int getDPI()
Specified by:
getDPI in interface GlimpseContext
Returns:
the ratio of pixels per inch for the current context

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012 Metron, Inc.. All Rights Reserved.