Package org.openhab.io.rest.internal.resources.beans

Examples of org.openhab.io.rest.internal.resources.beans.WidgetBean


      bean.link = UriBuilder.fromUri(uri).path(PATH_SITEMAPS).path(sitemapName).path(pageId).build().toASCIIString();
      if(children!=null) {
        int cntWidget = 0;
        for(Widget widget : children) {
          String widgetId = pageId + "_" + cntWidget;
          WidgetBean subWidget = createWidgetBean(sitemapName, widget, drillDown, uri, widgetId);
        if(subWidget != null)
          bean.widgets.add(subWidget);
          cntWidget++;
        }
      } else {
View Full Code Here


    // Test visibility
    if(itemUIRegistry.getVisiblity(widget) == false)
      return null;

      WidgetBean bean = new WidgetBean();
      if(widget.getItem()!=null) {
        Item item = ItemResource.getItem(widget.getItem());
          if(item!=null) {
            bean.item = ItemResource.createItemBean(item, false, UriBuilder.fromUri(uri).build().toASCIIString());
          }
      }
      bean.widgetId = widgetId;
      bean.icon = itemUIRegistry.getIcon(widget);
    bean.labelcolor = itemUIRegistry.getLabelColor(widget);
    bean.valuecolor = itemUIRegistry.getValueColor(widget);
      bean.label = itemUIRegistry.getLabel(widget);
      bean.type = widget.eClass().getName();
      if (widget instanceof LinkableWidget) {
      LinkableWidget linkableWidget = (LinkableWidget) widget;
      EList<Widget> children = itemUIRegistry.getChildren(linkableWidget);
        if(widget instanceof Frame) {
          int cntWidget=0;
          for(Widget child : children) {
            widgetId += "_" + cntWidget;
          WidgetBean subWidget = createWidgetBean(sitemapName, child, drillDown, uri, widgetId);
          if(subWidget != null) {
            bean.widgets.add(subWidget);
              cntWidget++;
          }
        }
View Full Code Here

TOP

Related Classes of org.openhab.io.rest.internal.resources.beans.WidgetBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.