Method called when selected item is changed
489938
def OnSelChanged(self, event):
        """"""
        # Get the selected item object
        item = event.GetItem()
        obj = self.leftPanel.model.ItemToObject(item)
        if isinstance(obj, compass.Survey):
            l = [
                'Survey Name: %s' % obj.name,
                'Survey Date: %s' % obj.date,
                'Comment: %s' % obj.comment,
                'Team: %s' % ', '.join(obj.team),
                'Surveyed Footage: %0.1f' % obj.length,
                '',
                ]
            l.extend(['  '.join(['%s: %s' % (k,v) for (k,v) in shot.items()]) for shot in obj.shots])
            self.display.SetLabel(str('\n'.join(l)))
        else:
            self.display.SetLabel('')
1334741
@UiHandler("navTree")
  final void menuItemSelected(final SelectionEvent<TreeItem> pselectionEvent) {
    if (selectedItem != null && !selectedItem.equals(pselectionEvent.getSelectedItem())) {
      // workaround, revert selection, it's triggered by the selected page
      pselectionEvent.getSelectedItem().setSelected(false);
      selectedItem.setSelected(true);
    }
  }
757997
def select_item(self, items):
        
        if not items:
            return
        elif not hasattr(items, "__iter__"):
            items = (items,)
        selection_changed = False
        with self._suppress_selection_events():
            for item in items:
                self.queue_draw_item(item)
                if item is not None and item.model not in self._selection:
                    self._selection.add(item.model)
                    selection_changed = True
        if selection_changed:
            self.emit('selection-changed', self._get_selected_items())
887420
def onselection(self, widget):
        """"""
        self._selected_key = None
        for k in self.children:
            if self.children[k] == widget:  # widget is the selected ListItem
                self._selected_key = k
                if (self._selected_item is not None) and self._selectable:
                    self._selected_item.attributes['selected'] = False
                self._selected_item = self.children[self._selected_key]
                if self._selectable:
                    self._selected_item.attributes['selected'] = True
                break
        return (self._selected_key,)
89527
def item_selection_changed(self):
        """"""
        is_selection = len(self.selectedItems()) > 0
        self.expand_selection_action.setEnabled(is_selection)
        self.collapse_selection_action.setEnabled(is_selection)
101499
public void itemStateChanged(ItemEvent e) {

        ItemSelectable item = e.getItemSelectable();

        if (item == lTable) {
            if (iSelectionStep == SELECT_SOURCE_TABLES) {
                String table    = lTable.getSelectedItem();
                int    selected = ((Integer) e.getItem()).intValue();

                for (int i = 0; i < tTable.size(); i++) {
                    TransferTable t = (TransferTable) tTable.elementAt(i);

                    if (t == null) {
                        continue;
                    }

                    if (i == selected) {
                        saveTable();
                        displayTable(t);
                        updateEnabled(true);
                    }
                }
            }
        } else {

            // it must be a checkbox
            saveTable();
            updateEnabled(true);
        }
    }
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());
            }
        }
    }
347512
void addSelectionBinding(ReadOnlyObjectProperty<Change> currentChange) {
    currentChange.addListener(
        (observable, oldValue, newValue) -> getSelectionModel().select(newValue)
    );
  }
230920
public void onChanged(ChangedEvent event) {
		String value = (String) scaleItem.getValue();

		Double scale = valueToScale.get(value);
		if (scale != null && !Double.isNaN(pixelLength) && 0.0 != pixelLength) {
			mapView.setCurrentScale(scale / pixelLength, MapView.ZoomOption.LEVEL_CLOSEST);
		}
	}
500000
function(item) {
        var id = item.id || item;

        var removedItem;
        var index = Selectivity.findIndexById(this._data, id);
        if (index > -1) {
            removedItem = this._data[index];
            this._data.splice(index, 1);
        }

        if (this._value[index] !== id) {
            index = this._value.indexOf(id);
        }
        if (index > -1) {
            this._value.splice(index, 1);
        }

        if (removedItem) {
            this.triggerChange({ removed: removedItem });
        }

        if (id === this._highlightedItemId) {
            this._highlightedItemId = null;
        }

        this._updateInputWidth();
    }
1019872
@SuppressWarnings("unchecked")
    void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

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

            if (event.getButton().equals(MouseButton.LEFT)) {
                setValue(null);
            }
            changeValueIfNotMultiSelect(itemId);
            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
                m_menu.removeAllItems();
                fillContextMenu((Set<Logger>)getValue());
                m_menu.openForTable(event, itemId, propertyId, this);
            }

        }
    }
819155
public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.DESELECTED) {
            // disable text entry
            m_customPIDField.setEditable(false);
        } else if (e.getStateChange() == ItemEvent.SELECTED) {
            // enable text entry
            m_customPIDField.setEditable(true);
        }
    }
47235
@Override
	public void setSelected(boolean selected) {
		if (selected) {
			((ToolbarModalAction) toolbarAction).onSelect(null);
		} else {
			((ToolbarModalAction) toolbarAction).onDeselect(null);
		}
	}
650602
void onItemsChanged(boolean structureChanged) {
        if (!mPreventDispatchingItemsChanged) {
            if (structureChanged) {
                mIsVisibleItemsStale = true;
                mIsActionItemsStale = true;
            }

            dispatchPresenterUpdate(structureChanged);
        } else {
            mItemsChangedWhileDispatchPrevented = true;
        }
    }
777889
public void deselectSelectedItem() {
        // Check whether tree has selected item
        if (selectedItem != null) {
            clearSelectedStyles(selectedItem);
            setSelectedItem(null);
            SelectionEvent.fire(this, null);
        }
    }
1336537
function (items, options) {


            options = options || {};
            _.defaults(options, {silent: false, index: this.$items.length});

            var index = options.index;

            if (!_.isArray(items)) {
                items = [items];
            }
            var item, itemIndex;
            for (var i = 0; i < items.length; i++) {
                item = items[i];
                if (item instanceof Bindable) {
                    item.bind('change', this._onItemChange, this);
                    item.bind('*', this._onItemEvent, this);
                }
                itemIndex = index + i;
                if (_.isUndefined(this.$items[itemIndex]) || itemIndex >= this.$items.length) {
                    this.$items[itemIndex] = item;
                } else {
                    this.$items.splice(itemIndex, 0, item);
                }
                if (options.silent !== true) {
                    this.trigger('add', {item: item, index: itemIndex});
                }
            }
        }
781200
function somethingChanged() {
                // don't fire events if the editor is readOnly as they are false detections
                if (editor.readOnly)
                    return;

                if (timer)
                    return;

                timer = setTimeout(function () {
                    timer = 0;
                    editor.fire('change');
                }, editor.config.minimumChangeMilliseconds || 100);
            }