public class WidgetFactoryRegistry extends Object implements WidgetFactory
SwingXMLBuilder, also a WidgetFactory.| Modifier and Type | Field and Description |
|---|---|
static String |
ALL_TYPES
Key for a factory that is to be used for the creation of all types of widgets.
|
| Modifier and Type | Method and Description |
|---|---|
Container |
create(String pType,
org.jdom2.Element pElement,
Container pParent)
Called be the
VisualBuilderDelegate in order to
create a specific Swing-Element |
void |
notifyWidgetComplete(String pType,
org.jdom2.Element pElement,
Container pCurrentWidget)
Called when the creation process of the widget is completed.
|
void |
registerFactory(String pType,
WidgetFactory pFactory)
Registers a Factory with the given type
|
public static final String ALL_TYPES
public Container create(String pType, org.jdom2.Element pElement, Container pParent)
WidgetFactoryVisualBuilderDelegate in order to
create a specific Swing-Elementcreate in interface WidgetFactorypType - the type of the Swing-Element that should be created. The name of
the Swing-class ist used as the type-argument. F.i., for the creation of
a JTable-Elememnt, the pType-argument would be "javax.swing.JTable"pElement - the XML-element in which the declaration of the Swing element is
included.pParent - the parent container to the element that should be created.public void notifyWidgetComplete(String pType, org.jdom2.Element pElement, Container pCurrentWidget)
WidgetFactorynotifyWidgetComplete in interface WidgetFactorypType - the type of the Swing-Element that was created.pElement - the XML-element in which the declaration of the Swing element is
included.pCurrentWidget - the widget that was completed.public void registerFactory(String pType, WidgetFactory pFactory) throws IllegalArgumentException
pType - the type the factory is to register withpFactory - the factory to be used for the creation of widgets for the
given typeIllegalArgumentException - if pType="allTypes" and pFactory is nullCopyright © 2017 Jürgen Zeller (privat). All rights reserved.