@Component(value="cuba_ComponentsFactory") public class WebComponentsFactory extends java.lang.Object implements ComponentsFactory
Modifier and Type | Field and Description |
---|---|
protected UiComponents |
uiComponents |
protected UiComponentsGenerator |
uiComponentsGenerator |
NAME
Constructor and Description |
---|
WebComponentsFactory() |
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 . |
<T extends Component> |
createComponent(java.lang.String name)
Create a component instance by its name.
|
Timer |
createTimer()
Create a timer instance.
|
@Inject protected UiComponents uiComponents
@Inject protected UiComponentsGenerator uiComponentsGenerator
public <T extends Component> T createComponent(java.lang.String name)
ComponentsFactory
createComponent
in interface ComponentsFactory
name
- 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)
ComponentsFactory
createComponent
in interface ComponentsFactory
type
- component typepublic Component createComponent(ComponentGenerationContext context)
ComponentsFactory
ComponentGenerationContext
.
Trying to find ComponentGenerationStrategy
implementations. If at least one strategy exists, then:
Ordered
interface.null
component.createComponent
in interface ComponentsFactory
context
- the ComponentGenerationContext
instancepublic Timer createTimer()
ComponentsFactory
createTimer
in interface ComponentsFactory