Package io.jmix.ui
Interface UiComponents
- All Known Implementing Classes:
UiComponentsImpl
public interface UiComponents
Factory to create UI components in client independent manner.
An instance of the factory can be injected into screen controllers or obtained through
An instance of the factory can be injected into screen controllers or obtained through
ApplicationContext
.-
Method Summary
Modifier and TypeMethodDescription<T extends Component>
TCreate a component instance by its type.<T extends Component>
TCreate a component instance by its name.<T extends Component>
Tcreate
(org.springframework.core.ParameterizedTypeReference<T> type) Create a component instance by its type.boolean
isComponentRegistered
(Class<?> type) Checks that a component with given type is registered.boolean
isComponentRegistered
(String name) Checks that a component with given name is registered.
-
Method Details
-
create
Create a component instance by its name.- Parameters:
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.- Returns:
- component instance
-
create
Create a component instance by its type.- Parameters:
type
- component type- Returns:
- component instance
-
create
Create a component instance by its type.- Parameters:
type
- component type reference- Returns:
- component instance
- See Also:
-
isComponentRegistered
Checks that a component with given name is registered.- Parameters:
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.- Returns:
- true if the component is registered
-
isComponentRegistered
Checks that a component with given type is registered.- Parameters:
type
- component type reference- Returns:
- true if the component is registered
-