Clicklistener for the button.<p>

@param htmlLines to be shown in Label
@param additionalElements to be placed in the verticalllayout which holds the label
@return ClickListener
346393
private ClickListener getClickListener(
        final List<String> htmlLines,
        final List<InfoElementBean> additionalElements) {

        return new Button.ClickListener() {

            private static final long serialVersionUID = -553128629431329217L;

            public void buttonClick(ClickEvent event) {

                final Window window = CmsBasicDialog.prepareWindow(CmsBasicDialog.DialogWidth.content);
                window.setCaption(
                    m_windowCaption == null
                    ? CmsVaadinUtils.getMessageText(Messages.GUI_INFO_BUTTON_CAPTION_0)
                    : m_windowCaption);
                window.setResizable(false);
                CmsBasicDialog dialog = new CmsBasicDialog();
                if (m_addButton != null) {
                    dialog.addButton(m_addButton, false);
                }
                VerticalLayout layout = getLayout(htmlLines, additionalElements);
                dialog.setContent(layout);

                Button button = new Button(CmsVaadinUtils.messageClose());
                button.addClickListener(new Button.ClickListener() {

                    private static final long serialVersionUID = 5789436407764072884L;

                    public void buttonClick(ClickEvent event1) {

                        window.close();

                    }
                });
                dialog.addButton(button);

                window.setContent(dialog);

                UI.getCurrent().addWindow(window);
            }
        };

    }
1057944
protected String htmlComponent(CmsSetupComponent component) {

        StringBuffer html = new StringBuffer(256);
        html.append("\t<tr>\n");
        html.append("\t\t<td>\n");
        html.append("\t\t\t<input type='checkbox' name='availableComponents' value='");
        html.append(component.getId());
        html.append("'");
        if (component.isChecked()) {
            html.append(" checked='checked'");
        }
        html.append(" onClick=\"checkComponentDependencies('");
        html.append(component.getId());
        html.append("');\">\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td style='width: 100%; '>\n\t\t\t");
        html.append(component.getName());
        html.append("\n\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td>&nbsp;</td>\n");
        html.append(
            "\t\t<td style='vertical-align: top; width: 100%; padding-bottom: 8px; font-style: italic;'>\n\t\t\t");
        html.append(component.getDescription());
        html.append("\n\t\t</td>\n");
        html.append("\t</tr>\n");

        return html.toString();
    }
749871
public final synchronized void addListener(EventListener l) {
        if(l ==null) {
            throw new IllegalArgumentException("Listener " + l +
                                               " is null");
        }
        if(listeners == EMPTY_LISTENERS) {
            listeners = new EventListener[1];
            listeners[0] = l;
        }
        else {
            int i = listeners.length;
            EventListener[] tmp = new EventListener[i+1];
            System.arraycopy(listeners, 0, tmp, 0, i);

            tmp[i] = l;
            listeners = tmp;
        }
    }
1052191
public void actionPerformed(ActionEvent e)
    {
        if ((m_button != null) && (e.getSource() == m_button))
        {
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup((Date)this.getControlValue(), m_button);
            popup.addPropertyChangeListener(this);
        }
        else if ((m_buttonTime != null) && (e.getSource() == m_buttonTime))
        {
            JTimePopup popup = JTimePopup.createTimePopup((Date)this.getControlValue(), m_buttonTime);
            popup.addPropertyChangeListener(this);
        }
    }
60883
function clickOutside(elements, fn) {
  const self = {
    on,
    off,
    isClicked
  };

  let clickedEl;
  let handlers;

  function stop(e) {
    clickedEl = this;
    e.stopPropagation();
  }

  function pass() {
    clickedEl = undefined;
    fn();
  }

  function isClicked(el) {
    return el === clickedEl;
  }

  function on() {
    const html = document.documentElement;
    handlers = elements.map(function(el) {
      const handler = stop.bind(el);
      el.addEventListener('mousedown', handler);
      return handler;
    });
    html.addEventListener('mousedown', pass);
    return self;
  }

  function off() {
    const html = document.documentElement;
    html.removeEventListener('mousedown', pass);
    elements.forEach(function(el, i) {
      el.removeEventListener('mousedown', handlers[i]);
    });
    return self;
  }

  return self;
}
684111
public void clickOnScreen(float x, float y, int numberOfClicks) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnScreen("+x+", "+y+", "+numberOfClicks+")");
		}
		
		if (android.os.Build.VERSION.SDK_INT < 14){
			throw new RuntimeException("clickOnScreen(float x, float y, int numberOfClicks) requires API level >= 14");

		}
		tapper.generateTapGesture(numberOfClicks, new PointF(x, y));
	}
1316207
private void setClickListener() {

        m_ok.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 6621475980210242125L;

            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {

                try {
                    CmsResourceFilter filter = getType() == null
                    ? CmsResourceFilter.ALL
                    : CmsResourceFilter.requireType(getType());
                    results.addResult(
                        new CmsResourceTypeStatResult(
                            getType(),
                            (String)m_siteSelect.getValue(),
                            getCmsObject().readResources("/", filter, true).size()));
                    m_results.setVisible(true);
                    results.setVerticalLayout(m_resLayout, false);
                } catch (CmsException e) {
                    LOG.error("Unable to read resource tree", e);
                }
            }
        });
    }
414152
private void addViewsToList(List<WebElement> allWebElements, List<WebElement> webElementsOnScreen){

		int[] xyViewFromSet = new int[2];
		int[] xyViewFromScreen = new int[2];

		for(WebElement textFromScreen : webElementsOnScreen){
			boolean foundView = false;
			textFromScreen.getLocationOnScreen(xyViewFromScreen);

			for(WebElement textFromList : allWebElements){
				textFromList.getLocationOnScreen(xyViewFromSet);

				if(textFromScreen.getText().equals(textFromList.getText()) && xyViewFromScreen[0] == xyViewFromSet[0] && xyViewFromScreen[1] == xyViewFromSet[1]) {
					foundView = true;
				}
			}

			if(!foundView){
				allWebElements.add(textFromScreen);
			}
		}

	}
1176097
private List<String> getHtmlLines(Map<String, String> infos) {

        List<String> htmlLines = new ArrayList<String>();

        for (String key : infos.keySet()) {
            htmlLines.add(
                "<div style=\"display:flex;align-items:flex-end;\"><div class=\""
                    + OpenCmsTheme.INFO_ELEMENT_NAME
                    + "\">"
                    + key
                    + " :</div><div style=\"width:140px;\" class=\""
                    + OpenCmsTheme.INFO_ELEMENT_VALUE
                    + "\">"
                    + infos.get(key)
                    + "</div></div>");
        }
        m_htmlLines = htmlLines;
        return htmlLines;
    }
1080433
@Override
	public void click() throws WidgetException {
		try {
		   final WebElement webElement = getWebElement();

		        if (!getGUIDriver().isJavascriptClickMode()) {
		            synchronized (InteractiveElement.class) {
		                getGUIDriver().focus();
		                highlight( HIGHLIGHT_MODES.PUT);
		                webElement.click();
		            }
		        } else {
                    highlight( HIGHLIGHT_MODES.PUT);
                    try {
                        eval("arguments[0].click();");
                    } catch (WidgetException we) {
                        throw new RuntimeException(we);
                    }
		        }

		        getGUIDriver().selectLastFrame();
		} catch (Exception e) {
			throw new WidgetException("Error while clicking element",
					getByLocator(), e);
		}
	}
166052
public boolean clickOnMenu(String[] menuOptions) {
        LOGGER.debug("clickOnMenu : " + menuOptions[menuOptions.length - 1]);
        if (click()) {
            String info = toString();
//            LOGGER.info("Click on button " + info);
            // TODO try to use Menu class for implementing select item
            WebLocator menu = new WebLocator("x-menu-floating");
            if (WebDriverConfig.isIE()) {
                // menu.isVisible is not considered but is executed and is just consuming time.
//                if(menu.isVisible()){
//                    LOGGER.info("In IE is visible");
//                }
            } else {
                menu.setStyle("visibility: visible;");
            }
            menu.setInfoMessage("active menu");
            ExtJsComponent option = new ExtJsComponent(menu);
            for (String menuOption : menuOptions) {
                option.setText(menuOption);
                if (!option.mouseOver()) {
                    return false;
                }
            }
            if (option.clickAt()) {
                return true;
            } else {
                LOGGER.warn("Could not locate option '" + option.getPathBuilder().getText() + "'. Performing simple click on button : " + info);
                doClickAt();
            }
        }
        return false;
    }
1186274
public void highlightElement() {

        if (m_highlighting == null) {
            m_highlighting = new CmsHighlightingBorder(m_position, CmsHighlightingBorder.BorderColor.red);
            RootPanel.get().add(m_highlighting);
        } else {
            m_highlighting.setPosition(CmsPositionBean.getBoundingClientRect(getElement()));
        }
    }
33175
public void addListeners()
    {
        super.addListeners();
        this.getScreenRecord().getField(PackagesReportScreenRecord.JNLP_FILE_ID).addListener(new ReadSecondaryHandler(this.getRecord(JnlpFile.JNLP_FILE_FILE)));
    }
237117
protected void appendElements(RendersnakeHtmlCanvas html,
			List<SubtitleItem.Inner> elements) throws IOException {
		for (SubtitleItem.Inner element : elements) {
			String kanji = element.getKanji();
			if (kanji != null) {
				html.spanKanji(kanji);
			} else {
				html.write(element.getText());
			}
		}
	}
1067774
public void addListeners()
    {
        if (ScreenConstants.HTML_SCREEN_TYPE.equalsIgnoreCase(this.getViewFactory().getViewSubpackage()))
            if (this.getProperty(EDIT_PARAM) == null)
                this.setEditing(false);     // For HTML default is no editing (specify explicitly by edit=true)
        super.addListeners();
    }
1333260
function evalHTMLonClick(e) {
        var $t = $(e.target);
        if ($t.hasClass('fa-caret-right')) {
            $t.removeClass('fa-caret-right').addClass('fa-caret-down');
            $t.siblings().removeClass('hidden');
        }
        else {
            if ($t.hasClass('fa-caret-down')) {
                $t.removeClass('fa-caret-down').addClass('fa-caret-right');
                $t.siblings().addClass('hidden');
            }
        }
    }
1214346
public void click() {
        String cantClick = "Unable to click ";
        String action = "Clicking " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to be clicked";
        try {
            if (isNotPresentDisplayedEnabled(action, expected, cantClick)) {
                return;
            }
            WebElement webElement = getWebElement();
            webElement.click();
        } catch (Exception e) {
            reporter.fail(action, expected, cantClick + prettyOutputEnd() + e.getMessage());
            log.warn(e);
            return;
        }
        reporter.pass(action, expected, "Clicked " + prettyOutputEnd().trim());
    }