Search in sources :

Example 1 with Group

use of org.eclipse.smarthome.model.sitemap.Group in project smarthome by eclipse.

the class ItemUIRegistryImpl method getChildren.

@Override
public EList<Widget> getChildren(LinkableWidget w) {
    EList<Widget> widgets = null;
    if (w instanceof Group && w.getChildren().isEmpty()) {
        widgets = getDynamicGroupChildren((Group) w);
    } else {
        widgets = w.getChildren();
    }
    EList<Widget> result = new BasicEList<Widget>();
    for (Widget widget : widgets) {
        Widget resolvedWidget = resolveDefault(widget);
        if (resolvedWidget != null) {
            result.add(resolvedWidget);
        }
    }
    return result;
}
Also used : Group(org.eclipse.smarthome.model.sitemap.Group) BasicEList(org.eclipse.emf.common.util.BasicEList) Widget(org.eclipse.smarthome.model.sitemap.Widget) LinkableWidget(org.eclipse.smarthome.model.sitemap.LinkableWidget)

Aggregations

BasicEList (org.eclipse.emf.common.util.BasicEList)1 Group (org.eclipse.smarthome.model.sitemap.Group)1 LinkableWidget (org.eclipse.smarthome.model.sitemap.LinkableWidget)1 Widget (org.eclipse.smarthome.model.sitemap.Widget)1