org.jrabbit.base.graphics.skins.text
Class RenderedText

java.lang.Object
  extended by org.jrabbit.base.graphics.skins.text.RenderedText

public class RenderedText
extends java.lang.Object

RenderedText is a static class whose sole purpose is to allow for controlled cleanup of the Images used by RenderedTextSkins. RenderedTextSkins are designed to automatically register their Images with this class, so the only methods the developer needs to worry about are the destroy() commands.

Author:
Chris Molini

Field Summary
private static LockingList<Image> storedText
          The list of Images stored.
 
Constructor Summary
RenderedText()
           
 
Method Summary
(package private) static void add(Image renderSurface)
          Registers the indicated Image on the list.
(package private) static void destroy(Image renderedText)
          Obliterates the indicated Image and removes it from the list.
(package private) static void destroy(RenderedTextSkin renderedText)
          Obliterates the data associated with the indicated RenderedTextSkin.
static void destroyAll()
          Destroys every Image on the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storedText

private static LockingList<Image> storedText
The list of Images stored.

Constructor Detail

RenderedText

public RenderedText()
Method Detail

add

static void add(Image renderSurface)
Registers the indicated Image on the list.

Parameters:
renderSurface - The Image used to render text.

destroy

static void destroy(RenderedTextSkin renderedText)
Obliterates the data associated with the indicated RenderedTextSkin. The skin itself is flagged to recalculate its rendering data, so if it is still in use it will simply recreate its required resources.

Parameters:
renderedText - The RenderedTextSkin to "clean."

destroy

static void destroy(Image renderedText)
Obliterates the indicated Image and removes it from the list.

Parameters:
renderedText - The Image to destroy.

destroyAll

public static void destroyAll()
Destroys every Image on the list.