Class DefaultWidgetInstanceService

    • Constructor Detail

      • DefaultWidgetInstanceService

        public DefaultWidgetInstanceService()
    • Method Detail

      • createWidgetInstance

        public WidgetInstance createWidgetInstance​(Widget widget,
                                                   WidgetInstance parent,
                                                   java.lang.Object creator)
        Description copied from interface: WidgetInstanceService
        Creates new widget instance as a child of the given parent with assigned creator.
        Specified by:
        createWidgetInstance in interface WidgetInstanceService
        Parameters:
        widget - a widget to create widget instance
        parent - parent widget instance
        creator - assigned creator
        Returns:
        created widget instance
      • getRootWidgetInstances

        public java.util.List<WidgetInstance> getRootWidgetInstances​(Widget widget)
        Description copied from interface: WidgetInstanceService
        Returns a list of all widget instances of the given root widget.
        Specified by:
        getRootWidgetInstances in interface WidgetInstanceService
        Parameters:
        widget - a widget for which a list of widget instances should be returned
        Returns:
        a list of widget instances for the given widget
      • getWidgetInstances

        public java.util.List<WidgetInstance> getWidgetInstances​(WidgetInstance parent)
        Description copied from interface: WidgetInstanceService
        Returns a list of all child widget instances of the given parent.
        Specified by:
        getWidgetInstances in interface WidgetInstanceService
        Parameters:
        parent - widget instance for which a list of child widget instances should be returned
        Returns:
        a list of child widget instances for the given parent widget instance
      • getWidgetInstances

        public java.util.List<WidgetInstance> getWidgetInstances​(Widget widget,
                                                                 WidgetInstance parent)
        Description copied from interface: WidgetInstanceService
        Returns a list of all instances of the given widget belonging to the given parent.
        Specified by:
        getWidgetInstances in interface WidgetInstanceService
        Parameters:
        widget - a root widget which instances should be returned
        parent - a parent widget instance for returned list of widget instances
        Returns:
        a list of all instances of the given widget belonging to the given parent
      • removeWidgetInstance

        public void removeWidgetInstance​(WidgetInstance instance)
        Description copied from interface: WidgetInstanceService
        Removes given widget instance from the widget tree. View model will be removed as well. All child instances will be removed as well.
        Specified by:
        removeWidgetInstance in interface WidgetInstanceService
        Parameters:
        instance - widget instance to remove