net.sourceforge.spark.helpers
Class SPARKHelperFactory

java.lang.Object
  extended bynet.sourceforge.spark.helpers.SPARKHelperFactory
All Implemented Interfaces:
SPARKFactory

public final class SPARKHelperFactory
extends java.lang.Object
implements SPARKFactory

The SPARKHelperFactory class. Not part of the Widget framework itself. This class implements the SPARKFactory interface so that it may be used in conjunction with the SPARK class to create new widget instances. $Source: /cvsroot/spark/spark/source/java/net/sourceforge/spark/helpers/SPARKHelperFactory.java,v $

 $Log: SPARKHelperFactory.java,v $
 Revision 1.2  2005/07/24 04:03:28  afettes
 no message

 Revision 1.1  2005/07/24 03:55:32  afettes
 Initial commit to CVS.
 

Version:
$Revision: 1.2 $ - $Date: 2005/07/24 04:03:28 $
Author:
$Author: afettes $, Alastair Fettes
See Also:
Atom, Container, net.sourceforge.spark.framework.Widgets, SPARKHelperDecorator

Field Summary
private  SPARKHelperDecorator decorator
          The Decorator used to add specialized functionality to widgets.
private static SPARKHelperFactory factory
          The singleton Factory.
 
Constructor Summary
private SPARKHelperFactory()
          This is a singleton class.
 
Method Summary
private  Atom createAtom(org.w3c.dom.svg.SVGElement in_node)
          Create an Atom based on the given SVG node.
private  Container createContainer(org.w3c.dom.svg.SVGElement in_node)
          Create a Container based on the given SVG node.
 void createContents(org.w3c.dom.svg.SVGElement in_node, Container in_container)
          Create a Container based on the given SVG node.
 Widget createWidget(org.w3c.dom.svg.SVGElement in_node)
          Create a Widget based on the given SVG node.
static SPARKHelperFactory init()
          Initialize the factory and get the instance.
 void setDecorator(SPARKHelperDecorator in_decorator)
          Set the decorator for the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private static SPARKHelperFactory factory
The singleton Factory.


decorator

private SPARKHelperDecorator decorator
The Decorator used to add specialized functionality to widgets.

Constructor Detail

SPARKHelperFactory

private SPARKHelperFactory()
This is a singleton class. No instances allowed.

Method Detail

init

public static SPARKHelperFactory init()
Initialize the factory and get the instance.


setDecorator

public void setDecorator(SPARKHelperDecorator in_decorator)
Set the decorator for the factory.

Parameters:
in_decorator - The decorator to use.

createWidget

public Widget createWidget(org.w3c.dom.svg.SVGElement in_node)
Create a Widget based on the given SVG node.

Specified by:
createWidget in interface SPARKFactory
Parameters:
in_node -

createAtom

private Atom createAtom(org.w3c.dom.svg.SVGElement in_node)
Create an Atom based on the given SVG node.

Parameters:
in_node - The SVG Node to be used to create the Atom.
Returns:
The completed Atom. May return null.

createContainer

private Container createContainer(org.w3c.dom.svg.SVGElement in_node)
Create a Container based on the given SVG node.

Parameters:
in_node - The SVG Node to be used to create the Container.
Returns:
The completed Container. May return null.

createContents

public void createContents(org.w3c.dom.svg.SVGElement in_node,
                           Container in_container)
Create a Container based on the given SVG node.

Specified by:
createContents in interface SPARKFactory
Parameters:
in_node - The Container-Contents construct containing the containers widgets.
in_container - The container that these widgets will be contained by.