Finds widget by name in the window specified by windowId.

@param windowId   window id of parent window
@param widgetName name of widget to find
@return QuickWidget with the given name in the window with id windowId, or null if no such
widget exists.
359579
public QuickWidget findWidgetByName(QuickWidgetType type, int windowId, String widgetName) {
    return desktopWindowManager.getQuickWidget(type, windowId, QuickWidgetSearchType.NAME,
                                               widgetName);
  }
863761
@Override
    public Widget get(final int dataIndex) {
        return dataIndex >= size() ? null : getChildren().get(dataIndex);
    }
1193792
function Widget(id, document) {
    EventEmitter.call(this);
    this.id = id;
    this.el = null;
    this.bodyEl = null;
    this.state = null;
    this.__subscriptions = null;
    this.__evHandles = null;
    this.__lifecycleState = null;
    this.__customEvents = null;
    this.__scope = null;
    this.__dirty = false;
    this.__oldState = null;
    this.__stateChanges = null;
    this.__updateQueued = false;
    this.__dirtyState = null;
    this.__document = document;
}
1217728
public QuickWindow getQuickWindowByName(String name) {
    List<DesktopWindowInfo> windowList = getDesktopWindowInfoList();

    for (DesktopWindowInfo window : windowList) {
      if (window.getName().equals(name)) {
        return new QuickWindow(window);
      }
    }

    return null;
  }
1277334
private String getWidgetName(String settingsWidget) {

        if (WIDGET_MAPPINGS.containsKey(settingsWidget)) {
            return WIDGET_MAPPINGS.get(settingsWidget).getName();
        } else {
            return CmsInputWidget.class.getName();
        }
    }
1149576
public static Shell getShell(Widget widget) {
		if (widget instanceof Control)
			return ((Control)widget).getShell();
		if (widget instanceof Caret)
			return ((Caret)widget).getParent().getShell();
		if (widget instanceof DragSource)
			return ((DragSource)widget).getControl().getShell();
		if (widget instanceof DropTarget)
			return ((DropTarget)widget).getControl().getShell();
		if (widget instanceof Menu)
			return ((Menu)widget).getParent().getShell();
		if (widget instanceof ScrollBar)
			return ((ScrollBar)widget).getParent().getShell();

		return null;
	}
356788
public static UIComponent findChildByTagId(UIComponent parent, String id)
    {
        Iterator<UIComponent> itr = null;
        if (parent.getChildCount() > 0)
        {
            for (int i = 0, childCount = parent.getChildCount(); i < childCount; i ++)
            {
                UIComponent child = parent.getChildren().get(i);
                if (id.equals(child.getAttributes().get(MARK_CREATED)))
                {
                    return child;
                }
            }
        }
        if (parent.getFacetCount() > 0)
        {
            itr = parent.getFacets().values().iterator();
            while (itr.hasNext())
            {
                UIComponent facet = itr.next();
                // check if this is a dynamically generated UIPanel
                if (Boolean.TRUE.equals(facet.getAttributes()
                             .get(FACET_CREATED_UIPANEL_MARKER)))
                {
                    // only check the children and facets of the panel
                    if (facet.getChildCount() > 0)
                    {
                        for (int i = 0, childCount = facet.getChildCount(); i < childCount; i ++)
                        {
                            UIComponent child = facet.getChildren().get(i);
                            if (id.equals(child.getAttributes().get(MARK_CREATED)))
                            {
                                return child;
                            }
                        }
                    }
                    if (facet.getFacetCount() > 0)
                    {
                        Iterator<UIComponent> itr2 = facet.getFacets().values().iterator();
                        while (itr2.hasNext())
                        {
                            UIComponent child = itr2.next();
                            if (id.equals(child.getAttributes().get(MARK_CREATED)))
                            {
                                return child;
                            }
                        }
                    }
                }
                else if (id.equals(facet.getAttributes().get(MARK_CREATED)))
                {
                    return facet;
                }
            }
        }

        return null;
    }
609761
public String getWidgetDefaultConfiguration(String name) {

        if (m_registeredWidgets.containsKey(name)) {
            return m_widgetDefaultConfigurations.get(name);
        }
        // not found by class name, look up an alias
        String className = m_widgetAliases.get(name);
        if (className != null) {
            return m_widgetDefaultConfigurations.get(className);
        }
        return null;
    }
584576
public QuickWidget findWidgetByStringId(QuickWidgetType type, int windowId, String stringId) {

    String text = desktopUtils.getString(stringId, true);
    return findWidgetByText(type, windowId, text);
  }
379049
function (containerId) {
			for (var property in winble.deviceManager.deviceList) {
				if (winble.deviceManager.deviceList[property] && winble.deviceManager.deviceList[property].containerId == containerId)
					return (winble.deviceManager.deviceList[property]);
			}
			return (null);
		}
538699
private HelpBlock findHelpBlock(Widget widget) {
        if (widget instanceof HelpBlock) { return (HelpBlock) widget; }
        // Try and find the HelpBlock in the children of the given widget.
        if (widget instanceof HasWidgets) {
            for (Widget w : (HasWidgets) widget) {
                if (w instanceof HelpBlock) { return (HelpBlock) w; }
            }
        }
        if (!(widget instanceof HasValidationState)) {
            // Try and find the HelpBlock in the parent of widget.
            return findHelpBlock(widget.getParent());
        }
        return null;
    }
1122836
@Override
    public void setName(final String name) {
        this.name = name;

        if (name == null) {
            return;
        }

        for (final Widget w : getChildren()) {
            if (w instanceof HasName) {
                ((HasName) w).setName(name);
            }
        }
    }
672057
public static WComponent getComponentWithId(final WComponent root, final String id,
			final boolean visibleOnly) {
		ComponentWithContext comp = getComponentWithContextForId(root, id, visibleOnly);
		return comp == null ? null : comp.getComponent();
	}
701788
public static Iterator<Widget> getChildren(Widget w) {
    if (w instanceof Panel) {
      return ((Panel) w).iterator();
    }
    if (w instanceof Composite) {
      return getChildren(compositeGetWidget((Composite) w));
    }
    return null;
  }
1029346
def widgetForName(self, name):
        
        for iwidget in range(len(self)):
            if self.widget(iwidget).name() == name:
                return self.widget(iwidget)
516159
func (s *GetMaintenanceWindowTaskOutput) SetWindowId(v string) *GetMaintenanceWindowTaskOutput {
	s.WindowId = &v
	return s
}
148219
public int waitForWindowShown(String windowName) {
    if (getScopeServices().getConnection() == null) {
      throw new CommunicationException(
          "waiting for a window failed because Opera is not connected.");
    }

    return getScopeServices()
        .waitForDesktopWindowShown(windowName, OperaIntervals.WINDOW_EVENT_TIMEOUT.getMs());
  }