Selects the given *component* according to *command* policy
        (actually, only toggle supported). If index is None, looks up index
        of component in model
359672
def selectComponent(self, component, index=None, command=QtGui.QItemSelectionModel.Toggle):
        """"""
        if command == QtGui.QItemSelectionModel.Toggle:
            if component in self._selectedComponents:
                self._selectedComponents.remove(component)
                if index is None:
                    index = self.model().indexByComponent(component)
                self.selectionChanged.emit(self.selection(), QtGui.QItemSelection(index, index))
                if len(self._selectedComponents) == 0:
                    self.hintRequested.emit('Select Components in view to modify')
            else:
                self._selectedComponents.append(component)
                self.selectionChanged.emit(self.selection(), QtGui.QItemSelection())
                self.hintRequested.emit('Select more components, or click again to toggle inclusion. To edit parameter type or bounds, select parameter field in table')
        else:
            raise Exception("Selection command not supported")
754002
function keyIndexing(selector, maxLen, index) {
  var opts = resolverOpts(RESOLVE_MODE.KEY, maxLen, index);
  return resolveSelector(selector, opts);
}
242179
public static void associateCommand(String commandName, BaseUIComponent component, BaseUIComponent commandTarget) {
        getCommand(commandName, true).bind(component, commandTarget);
    }
1326241
def select_window(pymux, variables):
    
    window_id = variables['<target-window>']

    def invalid_window():
        raise CommandException('Invalid window: %s' % window_id)

    if window_id.startswith(':'):
        try:
            number = int(window_id[1:])
        except ValueError:
            invalid_window()
        else:
            w = pymux.arrangement.get_window_by_index(number)
            if w:
                pymux.arrangement.set_active_window(w)
            else:
                invalid_window()
    else:
        invalid_window()
341987
def _on_select(self, *args):
        
        if callable(self.__callback):
            self.__callback(self.selection)
397592
def control_command_set_current_selection(title, text, control, occurrance)
      command('ControlCommand', [title, text, control, 'SetCurrentSelection', occurrance])
    end
1110583
def x_select_cb(self, w, index):
        """"""
        try:
            self.x_col = self.cols[index]
        except IndexError as e:
            self.logger.error(str(e))
        else:
            self.plot_two_columns(reset_xlimits=True)
405808
public boolean selectItem(int dataIndex, boolean select) {
        Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "selectItem [%d] select [%b]", dataIndex, select);
        if (dataIndex < 0 || dataIndex >= mContent.size()) {
            throw new IndexOutOfBoundsException("Selection index [" + dataIndex + "] is out of bounds!");
        }

        updateSelectedItemsList(dataIndex, select);

        ListItemHostWidget hostWidget = getHostView(dataIndex, false);
        if (hostWidget != null) {
            hostWidget.setSelected(select);
            hostWidget.requestLayout();
            return true;
        }

        return false;
    }
1273089
def toggle_template_selector(self):
        
        if self.search_directory_radio.isChecked():
            self.template_combo.setEnabled(True)
        else:
            self.template_combo.setEnabled(False)

        if self.search_on_disk_radio.isChecked():
            self.template_path.setEnabled(True)
            self.template_chooser.setEnabled(True)
        else:
            self.template_path.setEnabled(False)
            self.template_chooser.setEnabled(False)
443814
def componentSelection(self, comp):
        """"""
        # current row which is selected in auto parameters to all component selection to
        indexes = self.selectedIndexes()
        index = indexes[0]
        self.model().toggleSelection(index, comp)
456200
def on_select(self, item, action):
        

        if not isinstance(item, int):
            item = self.items.index(item)

        self._on_select[item] = action
1012935
def SelectByIndex(cls, index):
        ''' 
        '''
        try:
            Select(cls._element()).select_by_index(int(index))
        except:
            return False
145656
private boolean isAlwaysShow(Component comp) {

        return ((comp == m_appIndicator)
            || (comp == m_contextMenu)
            || (comp == m_userDropDown)
            || (comp == m_quickLaunchDropDown)
            || comp.getStyleName().contains(OpenCmsTheme.REQUIRED_BUTTON));
    }
968641
def _call_zincrby(self, command, value, *args, **kwargs):
        
        if self.indexable:
            self.index([value])
        return self._traverse_command(command, value, *args, **kwargs)
195858
public void setSelectedIndex (int selidx)
    {
        // update the display
        updateSelection(selidx);

        // let the model know what's up
        Object item = (selidx == -1) ? null : _model.getElementAt(selidx);
        _model.setSelectedItem(item);
    }
1357767
private void toggleSelection(TreePath path)
    {
        Object node = path.getLastPathComponent();
        State state = getSelectionState(node);
        if (state == null)
        {
            return;
        }
        if (state == State.SELECTED)
        {
            setSelectionState(node, State.UNSELECTED);
            updateSelection(node);
        }
        else if (state == State.UNSELECTED)
        {
            setSelectionState(node, State.SELECTED);
            updateSelection(node);
        }
        else
        {
            setSelectionState(node, State.SELECTED);
            updateSelection(node);
        }
        
    }
62545
def select(self, cmd, *args, **kwargs):
        
        self.cursor.execute(cmd, *args, **kwargs)
        return self.cursor.fetchall()