Class UiComponentsImpl

java.lang.Object
io.jmix.ui.sys.UiComponentsImpl
All Implemented Interfaces:
UiComponents

@Component("ui_UiComponents") public class UiComponentsImpl extends Object implements UiComponents
  • Field Details

    • applicationContext

      @Autowired protected org.springframework.context.ApplicationContext applicationContext
    • datatypeRegistry

      @Autowired protected DatatypeRegistry datatypeRegistry
    • classes

      protected Map<String,Class<? extends Component>> classes
    • names

      protected Map<Class,String> names
  • Constructor Details

    • UiComponentsImpl

      public UiComponentsImpl()
  • Method Details

    • create

      public <T extends Component> T create(String name)
      Description copied from interface: UiComponents
      Create a component instance by its name.
      Specified by:
      create in interface UiComponents
      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

      public <T extends Component> T create(Class<T> type)
      Description copied from interface: UiComponents
      Create a component instance by its type.
      Specified by:
      create in interface UiComponents
      Parameters:
      type - component type
      Returns:
      component instance
    • create

      public <T extends Component> T create(org.springframework.core.ParameterizedTypeReference<T> typeReference)
      Description copied from interface: UiComponents
      Create a component instance by its type.
      Specified by:
      create in interface UiComponents
      Parameters:
      typeReference - component type reference
      Returns:
      component instance
      See Also:
    • isComponentRegistered

      public boolean isComponentRegistered(String name)
      Description copied from interface: UiComponents
      Checks that a component with given name is registered.
      Specified by:
      isComponentRegistered in interface UiComponents
      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

      public boolean isComponentRegistered(Class<?> type)
      Description copied from interface: UiComponents
      Checks that a component with given type is registered.
      Specified by:
      isComponentRegistered in interface UiComponents
      Parameters:
      type - component type reference
      Returns:
      true if the component is registered
    • getComponentName

      @Nullable protected String getComponentName(Class<?> type)
    • autowireContext

      protected void autowireContext(Component instance)
    • initCompositeComponent

      protected void initCompositeComponent(Component instance, Class<? extends Component> componentClass)
    • getPackage

      protected String getPackage(Class<? extends Component> componentClass)
    • processCompositeDescriptor

      protected Component processCompositeDescriptor(Class<? extends Component> componentClass, String descriptorPath)
    • getMessageGroup

      protected String getMessageGroup(String descriptorPath)
    • register

      public void register(String name, Class<? extends Component> componentClass)