Called when an item (calibration_observable) is inserted into the list widget. Returns a widget.
195896
def make_calibration_row_widget(ui, calibration_observable, label: str=None):
    """"""
    calibration_row = ui.create_row_widget()
    row_label = ui.create_label_widget(label, properties={"width": 60})
    row_label.widget_id = "label"
    offset_field = ui.create_line_edit_widget(properties={"width": 60})
    offset_field.widget_id = "offset"
    scale_field = ui.create_line_edit_widget(properties={"width": 60})
    scale_field.widget_id = "scale"
    units_field = ui.create_line_edit_widget(properties={"width": 60})
    units_field.widget_id = "units"
    float_point_4_converter = Converter.FloatToStringConverter(format="{0:.4f}")
    offset_field.bind_text(Binding.PropertyBinding(calibration_observable, "offset", converter=float_point_4_converter))
    scale_field.bind_text(Binding.PropertyBinding(calibration_observable, "scale", converter=float_point_4_converter))
    units_field.bind_text(Binding.PropertyBinding(calibration_observable, "units"))
    # notice the binding of calibration_index below.
    calibration_row.add(row_label)
    calibration_row.add_spacing(12)
    calibration_row.add(offset_field)
    calibration_row.add_spacing(12)
    calibration_row.add(scale_field)
    calibration_row.add_spacing(12)
    calibration_row.add(units_field)
    calibration_row.add_stretch()
    return calibration_row
121992
def _on_item_clicked(self, item):
        
        if item:
            name = item.data(0, QtCore.Qt.UserRole)
            if name:
                go = name.block.blockNumber()
                helper = TextHelper(self._editor)
                if helper.current_line_nbr() != go:
                    helper.goto_line(go, column=name.column)
                self._editor.setFocus()
692337
def update(self, observable, handlers):
        """"""
        addedreaders, removedreaders = handlers
        for reader in addedreaders:
            item = self.Append(str(reader))
            self.SetClientData(item, reader)
        for reader in removedreaders:
            item = self.FindString(str(reader))
            if wx.NOT_FOUND != item:
                self.Delete(item)
        selection = self.GetSelection()
414268
def put_nowait(self, item):
        
        self._parent._check_closing()
        with self._parent._sync_mutex:
            if self._parent._maxsize > 0:
                if self._parent._qsize() >= self._parent._maxsize:
                    raise AsyncQueueFull

            self._parent._put_internal(item)
            self._parent._notify_async_not_empty(threadsafe=False)
            self._parent._notify_sync_not_empty()
857548
protected void onSelectedItemChanged() {
        if (selectedItem == null) {
            anchorLabel();
            getInputWidget().setText("");
        } else {
            getInputWidget().setText(getItemPrinter().print(selectedItem));
            floatLabel();
        }

        if (itemChooserListener != null) itemChooserListener.onSelectionChanged(this, selectedItem);
    }
556087
def show_data(self, item):
        
        child, cookie = self.mainview_tree.GetFirstChild(item)
        child_list = []
        while child.IsOk():
            child_list.append(child)
            child, cookie = self.mainview_tree.GetNextChild(item, cookie)

        lc = self.nodeview_lc
        lc.DeleteAllItems()
        for i, child in enumerate(child_list):
            text = self.mainview_tree.GetItemText(child)
            try:
                k, v = [s.strip() for s in text.split(':')]
            except ValueError:
                k, v = text, '...'
            idx = lc.InsertItem(MAXNROW, v)
            lc.SetItem(idx, 1, k)
786968
def triggerItem(self, item):
        
        if not item:
            return
        
        # emit the trigger action
        self._triggerText = item.text(0)
        self._completer.hide()
        self._completer.setCurrentItem(None)
        self.parent().hide()
        
        # trigger the action
        unwrapVariant(item.data(0, Qt.UserRole)).trigger()
1276184
def list_view_changed(self, widget, event, data=None):
        
        adj = self.scrolled_window.get_vadjustment()
        adj.set_value(adj.get_upper() - adj.get_page_size())
1170058
function () {
            return new me.ObservableVector2d(Math.floor(this._x), Math.floor(this._y), {onUpdate: this.onUpdate});
        }
1236881
def _on_items_changed(self, change):
        
        if change['type'] != 'container':
            return
        op = change['operation']
        if op == 'append':
            i = len(change['value'])-1
            self.adapter.notifyItemInserted(i)
        elif op == 'insert':
            self.adapter.notifyItemInserted(change['index'])
        elif op in ('pop', '__delitem__'):
            self.adapter.notifyItemRemoved(change['index'])
        elif op == '__setitem__':
            self.adapter.notifyItemChanged(change['index'])
        elif op == 'extend':
            n = len(change['items'])
            i = len(change['value'])-n
            self.adapter.notifyItemRangeInserted(i, n)
        elif op in ('remove', 'reverse', 'sort'):
            # Reset everything for these
            self.adapter.notifyDataSetChanged()
537208
def list_view_on_selected(self, widget, selected_item_key):
        
        self.lbl.set_text('List selection: ' + self.listView.children[selected_item_key].get_text())
46934
def init_widget(self):
        
        w = self.widget
        # Selection listener
        w.setAdapter(self.adapter)
        w.setOnItemSelectedListener(w.getId())
        w.onItemSelected.connect(self.on_item_selected)
        w.onNothingSelected.connect(self.on_nothing_selected)
        super(AndroidSpinner, self).init_widget()
931132
def init_widget(self):
        
        super(AndroidListView, self).init_widget()
        d = self.declaration
        self.set_arrangement(d.arrangement)
624057
def folderitem(self, obj, item, index):
        
        url = item.get("url")
        title = item.get("Title")
        calibrator = obj.getCalibrator()

        item["getDownFrom"] = self.localize_date(obj.getDownFrom())
        item["getDownTo"] = self.localize_date(obj.getDownTo())
        item["getCalibrator"] = ""
        if calibrator:
            props = api.get_user_properties(calibrator)
            name = props.get("fullname", calibrator)
            item["getCalibrator"] = name
        item["replace"]["Title"] = get_link(url, value=title)

        # calibration with the most remaining days
        if obj == self.latest_calibration:
            item["state_class"] = "state-published"
        # running calibrations
        elif obj in self.active_calibrations:
            item["state_class"] = "state-active"
        # inactive calibrations
        else:
            item["state_class"] = "state-inactive"

        return item
614121
function(item) {
            var hasFiltered = item.$el.hasClass("hr-list-fiter-on");
            var state = !(this._filter != null && !this._filter(item.model, item));
            item.$el.toggleClass("hr-list-fiter-on", !state);

            if (hasFiltered == state) this.trigger("filter", item, state);
            return state;
        }
890066
def add_item(name, checked = false, position = 'bottom')
      client.post("/checklists/#{id}/checkItems", {name: name, checked: checked, pos: position})
    end
841261
def _viewEntryItem(self, item=None, *dum):
        
        # if item not set, look for selected items in listview. Only 1 must be selected.
        select = True
        if item is None:
            selected = [item for item in self.etw.iterator(self.etw.Iterator.Selected) if item._ientry is not None]
            if len(selected) != 1:
                return
            item = selected[0]
            select = False;  # already selected
        else:
            # make sure item is open -- the click will cause it to close
            self.etw.expandItem(item)
        # show dialog
        ientry = getattr(item, '_ientry', None)
        if ientry is not None:
            self._viewEntryNumber(ientry, select=select)