This method is called when the user selects a star from the table.
171496
def select_star_cb(self, widget, res_dict):
        
        keys = list(res_dict.keys())
        if len(keys) == 0:
            self.selected = []
            self.replot_stars()
        else:
            idx = int(keys[0])
            star = self.starlist[idx]
            if not self._select_flag:
                self.mark_selection(star, fromtable=True)
        return True
1276747
public boolean hasUnqualifiedStarSelectItem() {
        for (SelectItem each : items) {
            if (each instanceof StarSelectItem && !((StarSelectItem) each).getOwner().isPresent()) {
                return true;
            }
        }
        return false;
    }
1064447
public void onItemSelected() {

        // Reset the current filter (if any)
        DataColumn firstColumn = dataSet.getColumnByIndex(0);
        String firstColumnId = firstColumn.getId();
        List<Integer> currentFilter = filterIndexes(firstColumnId);
        if (currentFilter != null && !currentFilter.isEmpty()) {
            filterReset();
        }

        ColumnSettings columnSettings = displayerSettings.getColumnSettings(firstColumn);
        String firstColumnName = columnSettings.getColumnName();
        String selected = view.getSelectedId();
        if (selected != null) {
            // Filter by the selected value (if any)
            filterUpdate(firstColumnId, Integer.parseInt(selected));
            view.showResetHint(firstColumnName);
        } else {
            view.showSelectHint(firstColumnName);
        }
    }
200797
public void doEventSelected(final JRebirthEvent eventSelected, final Wave wave) {
        // Same object (reference)
        if (getEventModel() == eventSelected) {
            view().getScaleTransition().play();
        } else {
            view().getScaleTransition().stop();
            view().resetScale();
        }
    }
1238024
public void onFeatureSelected(FeatureSelectedEvent event) {
		Feature feature = event.getFeature();

		// Only select if it is actually deselected:
		boolean selected = false;
		ListGridRecord[] selections = getSelection();
		for (ListGridRecord selection : selections) {
			if (selection.getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
				selected = true;
				break;
			}
		}

		// If deselected, find the correct row and select:
		if (!selected) {
			ListGridRecord[] records = this.getRecords();
			for (int i = 0; i < records.length; i++) {
				if (records[i].getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
					selectRecord(i);
					break;
				}
			}
		}
	}
569481
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType)
    {
        boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType);
        if (bChanged)
        { // Notify all the listSelectionListeners
            this.fireMySelectionChanged(new MyListSelectionEvent(source, this, m_iSelectedRow, iSelectType));
        }
        return bChanged;
    }
540498
function setTableSelection(table, rowData) {
      if (table.isPanel) {
        table = table.getView();
      }
      var model = this.findRecord(table.getStore(), rowData);

      table.setSelection(model);
    }
788560
@Override
    public void selectionChanged(IAction action, ISelection selection) {

        bugInstance = null;
        // TODO learn to deal with ALL elements
        IMarker markerFromSelection = MarkerUtil.getMarkerFromSingleSelection(selection);
        marker = markerFromSelection;

        if (marker == null) {
            // No marker selected.
            return;
        }
        if (DEBUG) {
            System.out.println("Found a marker!");
        }

        bugInstance = MarkerUtil.findBugInstanceForMarker(marker);
        if (bugInstance != null) {
            if (DEBUG) {
                System.out.println("Found BugInstance for SpotBugs warning marker!");
            }
        }
    }
1191316
def select_one_artist(artists):
        

        if len(artists) == 1:
            select_i = 0
        else:
            table = PrettyTable(['Sequence', 'Artist Name'])
            for i, artist in enumerate(artists, 1):
                table.add_row([i, artist['name']])
            click.echo(table)

            select_i = click.prompt('Select one artist', type=int, default=1)
            while select_i < 1 or select_i > len(artists):
                select_i = click.prompt('Error Select! Select Again', type=int)

        artist_id = artists[select_i-1]['id']
        artist_name = artists[select_i-1]['name']
        artist = Artist(artist_id, artist_name)
        return artist
1359138
def _on_click(self, event):
        
        if callable(self.__callback):
            self.__callback(self.selection)
891313
public void checkSelect(Table table, boolean[] checkList) {

        if (isFullyAccessibleByRole(table)) {
            return;
        }

        Right right = (Right) fullRightsMap.get(table.getName());

        if (right != null && right.canSelect(table, checkList)) {
            return;
        }

        throw Error.error(ErrorCode.X_42501, table.getName().name);
    }
279557
protected void updateFromSelection() {
    DBIDSelection sel = context.getSelection();
    if(sel != null) {
      this.dbids = DBIDUtil.newArray(sel.getSelectedIds());
      this.dbids.sort();
    }
    else {
      this.dbids = DBIDUtil.newArray();
    }
  }
85272
function (element, event) {
                var pageX = (event.changedTouches) ? event.changedTouches[0].pageX : event.pageX;

                var offsetx = pageX - $(element).offset().left;
                if (!ltr) { offsetx = range.width() - offsetx };
                if (offsetx > range.width()) { offsetx = range.width(); }
                if (offsetx < 0) { offsetx = 0; }

                return score = Math.ceil(offsetx / itemdata('starwidth') * (1 / itemdata('step')));
            }
920413
public AnimaQuery<T> select(String columns) {
        if (null != this.selectColumns) {
            throw new AnimaException("Select method can only be called once.");
        }
        this.selectColumns = columns;
        return this;
    }
201597
def on_table_row_click(self, row, item):
        ''' 
        '''
        if not self.multi_selection_enabled:
            self.remove_selection()
        if row not in self.selected_row_list:
            self.selected_row_list.append(row)
            row.style['outline'] = "2px dotted blue"
        return (row, item)
109819
public void onFeatureDeselected(FeatureDeselectedEvent event) {
		Feature feature = event.getFeature();

		// Only deselect if it is actually selected:
		boolean selected = false;
		ListGridRecord[] selections = getSelection();
		for (ListGridRecord selection : selections) {
			if (selection.getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
				selected = true;
				break;
			}
		}

		// If selected, find the correct row and deselect:
		if (selected) {
			ListGridRecord[] records = this.getRecords();
			for (ListGridRecord record : records) {
				if (record.getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
					deselectRecord(record);
					break;
				}
			}
		}
	}
799407
public void onSelectionChanged(SelectionEvent event) {
		Record record = event.getRecord();
		String featureId = record.getAttribute(FIELD_NAME_FEATURE_ID);

		// Check if selection and deselection are really necessary, to avoid useless events.
		if (event.getState()) {
			// Only select a feature if it is not yet selected:
			if (!layer.isFeatureSelected(featureId)) {
				layer.getFeatureStore().getFeature(featureId, GeomajasConstant.FEATURE_INCLUDE_ALL,
						new LazyLoadCallback() {

							public void execute(List<Feature> response) {
								layer.selectFeature(response.get(0));
							}
						});
			}
		} else {
			// Only deselect a feature if it is not yet deselected:
			if (layer.isFeatureSelected(featureId)) {
				layer.getFeatureStore().getFeature(featureId, GeomajasConstant.FEATURE_INCLUDE_ALL,
						new LazyLoadCallback() {

							public void execute(List<Feature> response) {
								layer.deselectFeature(response.get(0));
							}
						});
			}
		}
	}