cox.jmatt.java.MathTools.graphing
Class RenderEngine

java.lang.Object
  extended by cox.jmatt.java.MathTools.graphing.RenderEngine

public class RenderEngine
extends java.lang.Object

This is a support class for any graphing implementation. Most methods assume, but do not enforce, that parameter and other Objects will in fact be Strings. The XRenderEngine class is provided for graphing implementations in which the data cannot possibly be String or have a toString() method capable of re-creating it.

This class is very simple in both design and function. It accepts Renderables, holds them in the order they were added, and returns them as an Object[] array upon request.


Constructor Summary
RenderEngine()
          Constructor necessary for adding to scripts.
 
Method Summary
 boolean addRenderable(Renderable pItem)
          Add a Renderable to the collection.
 java.lang.Object[] render(java.lang.Object pContext)
          Call render() on all the items currently held, in order, and collect the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderEngine

public RenderEngine()
Constructor necessary for adding to scripts.

Method Detail

addRenderable

public boolean addRenderable(Renderable pItem)
Add a Renderable to the collection. The method returns false only if the supplied Renderable is null.


render

public java.lang.Object[] render(java.lang.Object pContext)
Call render() on all the items currently held, in order, and collect the results.

Parameters:
pContext - The Rendering Context to be used for all the items rendered.
Returns:
The result of rendering all held Renderables against the supplied context.