Open the selected item with the system's pager
962154
def open_pager(self):
        
        n_rows, n_cols = self.term.stdscr.getmaxyx()

        if self.config['max_pager_cols'] is not None:
            n_cols = min(n_cols, self.config['max_pager_cols'])

        data = self.get_selected_item()
        if data['type'] == 'Submission':
            text = '\n\n'.join((data['permalink'], data['text']))
            self.term.open_pager(text, wrap=n_cols)
        elif data['type'] == 'Comment':
            text = '\n\n'.join((data['permalink'], data['body']))
            self.term.open_pager(text, wrap=n_cols)
        else:
            self.term.flash()
168875
def selection(self):
        """"""
        sel = QtGui.QItemSelection()
        for index in self.selectedIndexes():
            sel.select(index, index)
        return sel
630032
def selected_item(self):
        
        if self.items and self.selected_option != -1:
            return self.items[self.current_option]
        else:
            return None
626414
def selected(self):
        """"""
        self.selected_text = self.currentText()
        self.valid.emit(True, True)
        self.open_dir.emit(self.selected_text)
786671
def OnSelectReader(self, event):
        """"""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.readertreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.dialogpanel.OnSelectCard(itemdata)
            elif isinstance(itemdata, smartcard.reader.Reader.Reader):
                self.dialogpanel.OnSelectReader(itemdata)
            else:
                self.dialogpanel.OnDeselectCard(itemdata)
515961
def selected(self, interrupt=False):
        """"""
        self.ao2.output(self.get_title(), interrupt=interrupt)
1026954
def selected_display_item(self) -> typing.Optional[DisplayItem.DisplayItem]:
        
        # first check for the [focused] data browser
        display_item = self.focused_display_item
        if not display_item:
            selected_display_panel = self.selected_display_panel
            display_item = selected_display_panel.display_item if selected_display_panel else None
        return display_item
288935
void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {

            changeValueIfNotMultiSelect(itemId);

            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
                m_menu.setEntries(getMenuEntries(), getSearchIndexNames());
                m_menu.openForTable(event, itemId, propertyId, this);
            } else if (event.getButton().equals(MouseButton.LEFT) && TableProperty.Name.equals(propertyId)) {
                showSourcesWindow(((I_CmsSearchIndex)((Set<?>)getValue()).iterator().next()).getName());
            }
        }
    }
287765
def get_page_object(objects, sid):
    
    selected_object = None

    for obj in objects:
        if obj.sid == sid:
            selected_object = obj
            break
    return selected_object
943688
def item_selected(self, item=None):
        """"""
        if item is None:
            item = self.currentItem()

        # stack history is in inverse order
        try:
            index = self.stack_history[-(self.currentRow()+1)]
        except IndexError:
            pass
        else:
            self.editor.set_stack_index(index)
            self.editor.current_changed(index)
        self.hide()
354345
def create_current_pb(self, ):
        
        pb = QtGui.QPushButton("Select current")
        self.selection_tabw.setCornerWidget(pb)
        return pb
294827
def get_page(self, paginator):
        """"""
        page = int(self.get_and_save_value('page', 1))
        if page < 1:
            return self.save_value('page', 1)

        if page > paginator.num_pages:
            return self.save_value('page', paginator.num_pages)
        return page
156997
def OnPageSetup(self, event):
        """"""

        print_data = self.main_window.print_data
        new_print_data = \
            self.main_window.interfaces.get_print_setup(print_data)
        self.main_window.print_data = new_print_data
238138
public void select(Item item, boolean considerSelectableFlag) {
        if (considerSelectableFlag && !item.isSelectable()) {
            return;
        }
        item.withSetSelected(true);
        if (mSelectionListener != null) {
            mSelectionListener.onSelectionChanged(item, true);
        }
    }
1229639
def browse_clicked(self, widget, data=None):
        
        text = self.gui_helper.create_file_chooser_dialog("Please select directory", self.path_window)
        if text is not None:
            data.set_text(text)
105490
function selectPreviousItem(){
    var items = document.getElementById('searchresults').childNodes;
    var l = items.length;
    selectIndex((selectedSearchIndex + l - 1) % l);
  }
1136309
def run_selected_clicked(self):
        """"""
        # get all selected rows
        rows = sorted(set(index.row() for index in
                          self.table.selectedIndexes()))
        self.enable_busy_cursor()
        # iterate over selected rows
        for row in rows:
            current_row = row
            item = self.table.item(current_row, 0)
            status_item = self.table.item(current_row, 1)
            self.run_task(item, status_item)
        self.disable_busy_cursor()