net.xoetrope.builder.w3c.html
Class XHtmlComponentFactory

java.lang.Object
  extended by net.xoetrope.builder.w3c.html.XHtmlComponentFactory
All Implemented Interfaces:
XComponentConstructor

public class XHtmlComponentFactory
extends java.lang.Object
implements XComponentConstructor

A factory class used to add the components available as part of the html form/page

Copyright: Copyright Xoetrope Ltd. (c) 2001-2006

License: see license.txt

$Revision: 1.2 $


Constructor Summary
XHtmlComponentFactory()
           
 
Method Summary
 java.lang.Object addElement(XComponentFactory cf, java.lang.String type, java.lang.String name, java.lang.String content, java.util.Hashtable attribs)
          A factory method for adding non component elements.
 java.awt.Component constructComponent(XComponentFactory cf, java.lang.String type, java.lang.String content)
          Constructs HTML components on behalf of the component factory.
 ComponentAdapter getComponentAdapter(java.lang.String type)
          Get the component adapter for this type
 void setPackageName(java.lang.String defPackage)
          Set the package name for the factory's widgets.
 void update()
          Notify the component factories that some of their settings may have changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHtmlComponentFactory

public XHtmlComponentFactory()
Method Detail

update

public void update()
Description copied from interface: XComponentConstructor
Notify the component factories that some of their settings may have changed

Specified by:
update in interface XComponentConstructor

setPackageName

public void setPackageName(java.lang.String defPackage)
Description copied from interface: XComponentConstructor
Set the package name for the factory's widgets.

Specified by:
setPackageName in interface XComponentConstructor
Parameters:
defPackage - the default package name

constructComponent

public java.awt.Component constructComponent(XComponentFactory cf,
                                             java.lang.String type,
                                             java.lang.String content)
Constructs HTML components on behalf of the component factory. At present the following types are supported

Specified by:
constructComponent in interface XComponentConstructor
Parameters:
cf - the calling component factory
type - the component type name
content - the contents if applicable
Returns:
the new component

addElement

public java.lang.Object addElement(XComponentFactory cf,
                                   java.lang.String type,
                                   java.lang.String name,
                                   java.lang.String content,
                                   java.util.Hashtable attribs)
A factory method for adding non component elements. This includes question response elements

Specified by:
addElement in interface XComponentConstructor
Parameters:
cf - the calling component factory
type - the object type
name - a name identifying the element to be created
content - the component text/content
attribs - the element attributes if any
Returns:
the new component

getComponentAdapter

public ComponentAdapter getComponentAdapter(java.lang.String type)
Get the component adapter for this type

Specified by:
getComponentAdapter in interface XComponentConstructor
Parameters:
the - name identifying the type