Startseite / Plugin-Entwicklung / Universelle Erweiterungen / Eingabekomponenten / SiteArchitect / Swing-Gadget-Factory
Swing Gadget Factory
Interface: de.espirit.firstspirit.ui.gadgets.swing.SwingGadgetFactory
Access API documentation: SwingGadgetFactory<E extends GomElement>
The Swing gadget factory class is responsible for instantiating a Swing gadget class, binding the input component's GOM form element definition class to the Swing gadget.
Parameterization:
- E extends GomElement must correspond to the GOM form element definition class used for the input component.
Example
/**
* Swing gadget factory that creates a Swing gadget for the input component "Example Component"
* and configures that Swing gadget object with a fitting Swing gadget context object.
*
* GomExampleComponent: GOM form definition class for "Example Component"
* ExampleComponentSwingGadget: Swing gadget class for "Example Component"
*/
public class ExampleSwingGadgetFactory implements SwingGadgetFactory<GomExampleComponent> {
public SwingGadget create(final SwingGadgetContext<GomExampleComponent> context) {
return new ExampleComponentSwingGadget(context);
}
}