use of org.eclipse.smarthome.model.sitemap.Default in project smarthome by eclipse.
the class ItemUIRegistryImpl method resolveDefault.
private Widget resolveDefault(Widget widget) {
if (!(widget instanceof Default)) {
return widget;
} else {
String itemName = widget.getItem();
if (itemName != null) {
Item item = itemRegistry.get(itemName);
if (item != null) {
Widget defaultWidget = getDefaultWidget(item.getClass(), item.getName());
if (defaultWidget != null) {
copyProperties(widget, defaultWidget);
defaultWidgets.put(defaultWidget, widget);
return defaultWidget;
}
}
}
return null;
}
}
Aggregations