@Component(value="cuba_ComponentsFactory") public class DesktopComponentsFactory extends java.lang.Object implements ComponentsFactory
NAME| Constructor and Description |
|---|
DesktopComponentsFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Component> |
createComponent(java.lang.Class<T> type)
Create a component instance by its type.
|
Component |
createComponent(ComponentGenerationContext context)
Creates a component according to the given
ComponentGenerationContext. |
Component |
createComponent(java.lang.String name)
Create a component instance by its name.
|
Timer |
createTimer()
Create a timer instance.
|
static void |
registerComponent(java.lang.String element,
java.lang.Class<? extends Component> componentClass) |
static void |
registerComponents(ComponentPalette... palettes) |
public static void registerComponent(java.lang.String element,
java.lang.Class<? extends Component> componentClass)
public static void registerComponents(ComponentPalette... palettes)
public Component createComponent(java.lang.String name)
ComponentsFactorycreateComponent in interface ComponentsFactoryname - component name. It is usually defined in NAME constant inside the component interface,
e.g. Label.NAME.
It is also usually equal to component's XML name.public <T extends Component> T createComponent(java.lang.Class<T> type)
ComponentsFactorycreateComponent in interface ComponentsFactorytype - component typepublic Component createComponent(ComponentGenerationContext context)
ComponentsFactoryComponentGenerationContext.
Trying to find ComponentGenerationStrategy implementations. If at least one strategy exists, then:
Ordered interface.null component.createComponent in interface ComponentsFactorycontext - the ComponentGenerationContext instancepublic Timer createTimer()
ComponentsFactorycreateTimer in interface ComponentsFactory