public interface IGenericWidgetFactory
Modifier and Type | Method and Description |
---|---|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
addWidgetDecorator(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass,
IDecorator<? extends WIDGET_TYPE> decorator)
Adds a widget decorator
The decorators
IDecorator.decorate(Object) will be invoked for each created widget and the decorated widget will be
returned |
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
addWidgetFactoryDecorator(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass,
IDecorator<? extends IWidgetFactory<WIDGET_TYPE,? extends DESCRIPTOR_TYPE>> decorator)
Adds a widget factory decorator
The decorators
IDecorator.decorate(Object) will be invoked for the factory with the given type and the decorated
factory will be used to create widgets with the given type |
void |
addWidgetFactoryListener(IWidgetFactoryListener listener)
Adds a widget factory listener
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
create(DESCRIPTOR_TYPE descriptor)
Creates a root widget (with no parent) for a given descriptor
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
create(java.lang.Object parentUiReference,
DESCRIPTOR_TYPE descriptor)
Creates a widget for a given descriptor
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
getFactory(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass)
Gets a factory for a specific descriptor type
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
register(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass,
IWidgetFactory<WIDGET_TYPE,? extends DESCRIPTOR_TYPE> widgetFactory)
Registers a factory for a given descriptor type
The widget for the type must not already be registered
|
void |
removeWidgetFactoryListener(IWidgetFactoryListener listener)
Removes a widget factory listener
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> |
unRegister(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass)
Unregisters a factory for a given descriptor type
|
<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> WIDGET_TYPE create(DESCRIPTOR_TYPE descriptor)
descriptor
- The descriptor of the widget<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> WIDGET_TYPE create(java.lang.Object parentUiReference, DESCRIPTOR_TYPE descriptor)
parentUiReference
- The native ui reference of the parent widgetdescriptor
- The descriptor of the widget<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> IWidgetFactory<WIDGET_TYPE,DESCRIPTOR_TYPE> getFactory(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass)
descriptorClass
- The type to get the factory for<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> void register(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass, IWidgetFactory<WIDGET_TYPE,? extends DESCRIPTOR_TYPE> widgetFactory)
descriptorClass
- The type to register the factory forwidgetFactory
- The widget factory to registerjava.lang.IllegalArgumentException
- if already a widget is registered for the given type, use unRegister(Class)
explicitly in the case that widget should be replaced<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> void unRegister(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass)
descriptorClass
- The type to unregister the factory for<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> void addWidgetDecorator(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass, IDecorator<? extends WIDGET_TYPE> decorator)
IDecorator.decorate(Object)
will be invoked for each created widget and the decorated widget will be
returneddescriptorClass
- The type to add the decorator fordecorator
- The decorator to add<WIDGET_TYPE extends IWidgetCommon,DESCRIPTOR_TYPE extends IWidgetDescriptor<WIDGET_TYPE>> void addWidgetFactoryDecorator(java.lang.Class<? extends DESCRIPTOR_TYPE> descriptorClass, IDecorator<? extends IWidgetFactory<WIDGET_TYPE,? extends DESCRIPTOR_TYPE>> decorator)
IDecorator.decorate(Object)
will be invoked for the factory with the given type and the decorated
factory will be used to create widgets with the given typedescriptorClass
- The type to add the decorator fordecorator
- The decorator to addvoid addWidgetFactoryListener(IWidgetFactoryListener listener)
listener
- The listener to addvoid removeWidgetFactoryListener(IWidgetFactoryListener listener)
listener
- The listener to removeSiehe auch Jowidgets Nutzerhandbuch