com.ryanm.config.swing
Class WidgetFactory

java.lang.Object
  extended by com.ryanm.config.swing.WidgetFactory

public class WidgetFactory
extends java.lang.Object

Builds Widgets

Author:
ryanm

Constructor Summary
WidgetFactory()
           
 
Method Summary
static boolean register(java.lang.String classname)
          Registers a new widget type with the factory
static void register(Widget widget)
          Registers a new widget type with the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetFactory

public WidgetFactory()
Method Detail

register

public static void register(Widget widget)
Registers a new widget type with the factory. The new widget will replace any previous widget that was associated with the same type

Parameters:
widget - An instance of the new widget type

register

public static boolean register(java.lang.String classname)
Registers a new widget type with the factory

Parameters:
classname - The name of the Widget class
Returns:
true if the widget is registered succesfully, false otherwise