Handles user clicking select button, launches the picker UI
502511
private void selectImage() {
        // Start picker activity

        // For simplicity we're loading credentials from a string res, don't do this in production
        String apiKey = getString(R.string.filestack_api_key);
        if (apiKey.equals("")) {
            throw new RuntimeException("Create a string res value for \"filestack_api_key\"");
        }

        Config config = new Config(apiKey, "https://form.samples.android.filestack.com");
        Context context = getContext();
        Intent pickerIntent = new Intent(context, FsActivity.class);
        pickerIntent.putExtra(FsConstants.EXTRA_CONFIG, config);
        // Restrict file selections to just images
        String[] mimeTypes = {"image/*"};
        pickerIntent.putExtra(FsConstants.EXTRA_MIME_TYPES, mimeTypes);
        context.startActivity(pickerIntent);

        // Show loading progress spinner
        ((MainActivity) getActivity()).setLoading(true);
    }
739457
def _on_click(self, *args):
        
        if callable(self._callback):
            self._callback(self.selection)
960624
function (o) {
            // The input argument is either an Event or a TapRecognizer. Both have the same properties for determining
            // the mouse or tap location.
            var x = o.clientX,
                y = o.clientY;

            var redrawRequired = highlightedItems.length > 0; // must redraw if we de-highlight previously picked items

            // De-highlight any previously highlighted placemarks.
            for (var h = 0; h < highlightedItems.length; h++) {
                highlightedItems[h].highlighted = false;
            }
            highlightedItems = [];

            // Perform the pick. Must first convert from window coordinates to canvas coordinates, which are
            // relative to the upper left corner of the canvas rather than the upper left corner of the page.
            var pickList = wwd.pick(wwd.canvasCoordinates(x, y));
            //console.log(wwd.frameStatistics.frameTime);
            if (pickList.objects.length > 0) {
                redrawRequired = true;
            }

            // Highlight the items picked by simply setting their highlight flag to true.
            if (pickList.objects.length > 0) {
                for (var p = 0; p < pickList.objects.length; p++) {
                    pickList.objects[p].userObject.highlighted = true;

                    // Keep track of highlighted items in order to de-highlight them later.
                    highlightedItems.push(pickList.objects[p].userObject);
                }
            }

            // Update the window if we changed anything.
            if (redrawRequired) {
                wwd.redraw(); // redraw to make the highlighting changes take effect on the screen
            }
        }
858922
public void onItemClick() {
        if (selected) {
            selected = false;
            getView().reset();

            if (onResetCommand != null) {
                onResetCommand.execute();
            }
        }
        else {
            selected = true;
            getView().select();

            if (onSelectCommand != null) {
                onSelectCommand.execute();
            }
        }
    }
1341046
@Override
    public void go() {
        logger.info("Waiting for select {}...", element);
        Select select = new Select(findElementOrFail(getWebDriver(), element));
        if (OptionSelectorType.INDEX.equals(optionSelectorType)) {
            logger.info("Selecting index {}...", optionSelector);
            select.selectByIndex((Integer) optionSelector);
        } else if (OptionSelectorType.VALUE.equals(optionSelectorType)) {
            logger.info("Selecting value {}...", optionSelector);
            select.selectByValue((String) optionSelector);
        } else if (OptionSelectorType.TEXT.equals(optionSelectorType)) {
            logger.info("Selecting text {}...", optionSelector);
            select.selectByVisibleText((String) optionSelector);
        }
    }
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());
    }
932259
function init ($container, elementSelector, eventSelectors, handler) {
      $container = $container || $(document.body)

      // Handle control clicks
      function deferred () {
        var $control = $(this)
        handler($control, getToggledContent($control))
      }

      // Prepare ARIA attributes
      var $controls = $(elementSelector)
      $controls.each(initToggledContent)

      // Handle events
      $.each(eventSelectors, function (idx, eventSelector) {
        $container.on('click.' + selectors.namespace, eventSelector, deferred)
      })

      // Any already :checked on init?
      if ($controls.is(':checked')) {
        $controls.filter(':checked').each(deferred)
      }
    }
1243401
public void click(String locator) {
        getDispatcher().beforeClick(this, locator);
        
        getElement().click();
        validatePresenceOfAlert();
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIAction(UIActions.CLICKED);
        }
        WebDriverWaitUtils.waitUntilElementIsPresent(locator);
        
        getDispatcher().afterClick(this, locator);
    }
1090649
function handleItemKeydown(e) {
    eventUtils.handleActionKeydown(e, () => {
        this.handleItemClick(e);
    });

    eventUtils.handleEscapeKeydown(e, () => {
        this.buttonEl.focus();
        this.setState('expanded', false);
    });
}
163338
function Manager(element, options) {
  options = options || {};

  this.options = defaults(options, Mallet.defaults);
  this.options.inputTarget = this.options.inputTarget || element;

  this.handlers = {};
  this.session = {};
  this.recognizers = [];

  this.element = element;
  this.input = createInputInstance(this);
  this.touchAction = new TouchAction(this, this.options.touchAction);

  toggleCssProps(this, true);

  options.recognizers.forEach(function (item) {
    var recognizer = this.add(new (item[0])(item[1]));
    item[2] && recognizer.recognizeWith(item[2]);
    item[3] && recognizer.requireFailure(item[3]);
  }, this);
}
1352362
public void handleSelection(String itemId) {

        Collection<?> selection = (Collection<?>)m_fileTable.getValue();
        if (selection == null) {
            m_fileTable.select(itemId);
        } else if (!selection.contains(itemId)) {
            m_fileTable.setValue(null);
            m_fileTable.select(itemId);
        }
    }
813007
def _start_selecting(self, event):
        """"""
        self._selecting = True
        canvas = self._canvas
        x = canvas.canvasx(event.x)
        y = canvas.canvasy(event.y)
        self._sstart = (x, y)
        if not self._sobject:
            self._sobject = canvas.create_rectangle(
                self._sstart[0], self._sstart[1], x, y,
                dash=(3,5), outline='#0000ff'
            )
        canvas.itemconfigure(self._sobject, state=tk.NORMAL)
34555
function () {
					var elemData = $.data($this, 'wsjPicker') || $this;
					container.find('td.Radio input').off('click', radioClicked);
					currentPreview.off('click', currentClicked);
					cancelButton.off('click', cancelClicked);
					okButton.off('click', okClicked);
					container.find('.QuickColor').off('click', quickPickClicked);
					colorMapDiv = null;
					colorBarDiv = null;
					colorMapL1 = null;
					colorMapL2 = null;
					colorMapL3 = null;
					colorBarL1 = null;
					colorBarL2 = null;
					colorBarL3 = null;
					colorBarL4 = null;
					colorBarL5 = null;
					colorBarL6 = null;
					colorMap.destroy();
					colorMap = null;
					colorBar.destroy();
					colorBar = null;
					colorPicker.destroy();
					colorPicker = null;
					activePreview = null;
					currentPreview = null;
					okButton = null;
					cancelButton = null;
					grid = null;
					commitCallback = null;
					cancelCallback = null;
					liveCallback = null;
					container.html('');

					for (i = 0; i < List.length; i++) {
						if (List[i] == elemData) {
							List.splice(i, 1);
							break;
						}
					}
				}
1135159
def onColorPicker(self):
        
        dlg = QtGui.QColorDialog(QtGui.QColor(self._color), None)

        # if self._color:
        #    dlg.setCurrentColor(QtGui.QColor(self._color))

        if dlg.exec_():
            self.setColor(dlg.currentColor().name())
53302
function() {
        if (this._opening || this.dropdown || !this.triggerEvent('selectivity-opening')) {
            return;
        }

        this._opening = true;

        var Dropdown = this.options.dropdown || Selectivity.Dropdown;
        if (Dropdown) {
            this.dropdown = new Dropdown(this, {
                items: this.items,
                position: this.options.positionDropdown,
                query: this.options.query,
                showSearchInput: this.options.showSearchInputInDropdown !== false
            });
        }

        this.search('');

        this.focus();

        toggleClass(this.el, 'open', true);

        this._opening = false;
    }
775450
protected void startSelecting()
	{
		if (GuiScreen.isShiftKeyDown())
		{
			if (!selectingText)
				selectionCursor.from(cursor);
			selectingText = true;
		}
		else
			selectingText = false;
	}
759427
function handleFocusToOpenEvent( event ) {

        // Stop the event from propagating to the doc.
        event.stopPropagation()

        // If it’s a focus event, add the “focused” class to the root.
        if ( event.type == 'focus' ) {
            P.$root.addClass( CLASSES.focused )
        }

        // And then finally open the picker.
        P.open()
    }