org.sapia.gumby
Class RenderContextFactory

java.lang.Object
  |
  +--org.sapia.gumby.RenderContextFactory

public class RenderContextFactory
extends Object

This class is a factory of RenderContext instances. Ideally, only the first context acquired by an application should be created by this class. Other contexts should be created as children of that first context, and so on.

The above approach is a nice way to have a context that is shared globally, and child contexts that are intented to hold state that is specific to some parts of the application.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2005 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
RenderContextFactory()
           
 
Method Summary
static void loadDefinitions(InputStream is)
          Loads object definitions that will be available to all RenderContext instances.
static RenderContext newInstance()
          Returns a new context.
static RenderContext newInstance(GuiEnv env)
          Returns a new context that will encapsulate the given environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderContextFactory

public RenderContextFactory()
Method Detail

newInstance

public static RenderContext newInstance()
Returns a new context.

Returns:
a RenderContext instance.

newInstance

public static RenderContext newInstance(GuiEnv env)
Returns a new context that will encapsulate the given environment.

Parameters:
env - a GuiEnv instance.
Returns:
a RenderContext.

loadDefinitions

public static void loadDefinitions(InputStream is)
                            throws Exception
Loads object definitions that will be available to all RenderContext instances.

Parameters:
is - an InputStream.
Throws:
Exception - if a problem occurs while loading the definitions.


Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.