com.partnersoft.gui.opengl
Class OpenglFontHandle

java.lang.Object
  extended by com.partnersoft.gui.opengl.OpenglFontHandle

public class OpenglFontHandle
extends java.lang.Object

Indirection wrapper for TextRenderer objects registered with an OpenglControl. Deals with reloading and other issues.

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
OpenglFontHandle(OpenglControl control, java.lang.String name, com.sun.opengl.util.j2d.TextRenderer textRenderer)
          This method should only be called from OpenglControl since it needs to track the instances.
 
Method Summary
 void dispose()
           
 OpenglControl getControl()
          Returns the control this textureHandle is registered with.
 java.lang.String getName()
          Returns the unique name for the textureHandle.
 com.sun.opengl.util.j2d.TextRenderer getTextRenderer()
          Returns the referenced TextRenderer object.
 boolean isValid()
          Returns true if this textureHandle is valid (has not been disposed of).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenglFontHandle

public OpenglFontHandle(OpenglControl control,
                        java.lang.String name,
                        com.sun.opengl.util.j2d.TextRenderer textRenderer)
This method should only be called from OpenglControl since it needs to track the instances.

Method Detail

dispose

public void dispose()

toString

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

isValid

public boolean isValid()
Returns true if this textureHandle is valid (has not been disposed of).


getControl

public OpenglControl getControl()
Returns the control this textureHandle is registered with.


getName

public java.lang.String getName()
Returns the unique name for the textureHandle.


getTextRenderer

public com.sun.opengl.util.j2d.TextRenderer getTextRenderer()
Returns the referenced TextRenderer object. Returns null if the TextRenderer has been disposed of; in that case you need to fetch a fresh handle.