Update event types in event type box.
508622
def update_event_types(self):
        """"""
        self.idx_evt_type.clear()
        self.idx_evt_type.setSelectionMode(QAbstractItemView.ExtendedSelection)
        event_types = sorted(self.parent.notes.annot.event_types,
                             key=str.lower)

        for ty in event_types:
            item = QListWidgetItem(ty)
            self.idx_evt_type.addItem(item)
544071
function updatePointer(type, pointerEvent) {
    if(type == EVENT_END) {
      delete this.pointers[pointerEvent.pointerId];
    }
    else {
      pointerEvent.identifier = pointerEvent.pointerId;
      this.pointers[pointerEvent.pointerId] = pointerEvent;
    }

    // it's save to use Object.keys, since pointerEvents are only in newer browsers
    return Object.keys(this.pointers).length;
  }
802936
public void setEvent_type(String v) {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_event_type == null)
      jcasType.jcas.throwFeatMissing("event_type", "ch.epfl.bbp.uima.genia.Event");
    jcasType.ll_cas.ll_setStringValue(addr, ((Event_Type)jcasType).casFeatCode_event_type, v);}
402948
def type_to_interface(event_type):
    """"""
    global _lookup
    if not isinstance(event_type, library.VBoxEventType):
        raise TypeError("event_type was not of VBoxEventType")
    if not _lookup:
        for attr in dir(library):
            event_interface = getattr(library, attr)
            if not inspect.isclass(event_interface):
                continue
            if not issubclass(event_interface, library.Interface):
                continue
            et = getattr(event_interface, 'id', None)
            if et is None:
                continue
            if not isinstance(et, library.VBoxEventType):
                continue
            _lookup[int(et)] = event_interface
    return _lookup[int(event_type)]
470495
function eventCheck(obj, type) {
  var t;
  
  if (!obj._events) {
    return false;
  }
  
  t = obj._events[type]
  
  if (typeof t === 'function') {
    return true;
  }
  if (Array.isArray(t) && t.length) {
    return true;
  }
  return false;
}
372659
@Override protected void handleEvents(final String EVENT_TYPE) {
        if ("RESIZE".equals(EVENT_TYPE)) {
            resize();
            redraw();
        }else if ("REDRAW".equals(EVENT_TYPE)) {
            redraw();
        } else if ("VISIBILITY".equals(EVENT_TYPE)) {
            Helper.enableNode(titleText, !gauge.getTitle().isEmpty());
            Helper.enableNode(unitText, !gauge.getUnit().isEmpty());
            redraw();
        } else if ("RESIZE".equals(EVENT_TYPE)) {
            resize();
        } else if ("RECALC".equals(EVENT_TYPE)) {
            if (Orientation.VERTICAL == orientation) {
                width    = height / aspectRatio;
                stepSize = (0.79699248 * height) / gauge.getRange();
            } else {
                height   = width / aspectRatio;
                stepSize = (0.79699248 * width) / gauge.getRange();
            }
            resize();
            redraw();
            updateBar();
        } else if ("FINISHED".equals(EVENT_TYPE)) {
            barTooltip.setText(formatNumber(gauge.getLocale(), gauge.getFormatString(), gauge.getDecimals(), gauge.getValue()));
        }
    }
1055518
def update(self, event_or_list):
        """"""

        event_or_list = super().update(event_or_list)

        for e in event_or_list:
            if e.type == KEYDOWN:
                if e.key == K_RIGHT:
                    if e.mod * KMOD_CTRL:
                        self.move_cursor_one_word(self.RIGHT)
                    else:
                        self.move_cursor_one_letter(self.RIGHT)

                elif e.key == K_LEFT:
                    if e.mod * KMOD_CTRL:
                        self.move_cursor_one_word(self.LEFT)
                    else:
                        self.move_cursor_one_letter(self.LEFT)

                elif e.key == K_BACKSPACE:
                    if self.cursor == 0:
                        continue

                    if e.mod & KMOD_CTRL:
                        self.delete_one_word(self.LEFT)
                    else:
                        self.delete_one_letter(self.LEFT)

                elif e.key == K_DELETE:
                    if e.mod & KMOD_CTRL:
                        self.delete_one_word(self.RIGHT)
                    else:
                        self.delete_one_letter(self.RIGHT)

                elif e.unicode != '' and e.unicode.isprintable():
                    self.add_letter(e.unicode)
447285
function triggerEvent(el, type, options) {
  if (isString(el)) {
    options = type;
    type = el;
    el = document;
  }

  var e = createEvent(type, options);

  el.dispatchEvent
    ? el.dispatchEvent(e)
    : el.fireEvent('on' + type, e);
}
777863
def update_evt_types(self):
        """"""
        self.event_types = self.parent.notes.annot.event_types
        self.idx_evt_type.clear()
        self.frequency['norm_evt_type'].clear()
        for ev in self.event_types:
            self.idx_evt_type.addItem(ev)
            self.frequency['norm_evt_type'].addItem(ev)
352561
def new_event_type(self, name, mergeable=False):
    '''  '''

    self.event_types[name] = self.EventType(name, mergeable)
652998
def toggle_buttons(self):
        """"""
        all_types = self.all_types.get_value()
        self.idx_evt_type.setEnabled(not all_types)
336191
def delete_eventtype(self, test_type_str=None):
        """"""
        if test_type_str:
            answer = test_type_str, True
        else:
            answer = QInputDialog.getText(self, 'Delete Event Type',
                                          'Enter event\'s name to delete')
        if answer[1]:
            self.annot.remove_event_type(answer[0])
            self.display_eventtype()
            self.update_annotations()
558633
def update(self, attrs):
        """"""
        self._validateAttrs(attrs)
        for k,v in attrs.items():
            typecast = type( getattr(self, k) )
            if typecast==bool and v=="False":   newval = False # "False" evalued as boolean is True because its length > 0
            else:                               newval = typecast(v.lower())
            setattr(self, k, newval)
17041
def create_event_object(self,
                            event_type,
                            code,
                            value,
                            timeval=None):
        """"""
        if not timeval:
            timeval = self.__get_timeval()
        try:
            event_code = self.manager.codes['type_codes'][event_type]
        except KeyError:
            raise UnknownEventType(
                "We don't know what kind of event a %s is." % event_type)
        event = struct.pack(EVENT_FORMAT,
                            timeval[0],
                            timeval[1],
                            event_code,
                            code,
                            value)
        return event
1298164
def update(self, event_or_list):
        """"""

        for e in super().update(event_or_list):
            if e.type == MOUSEBUTTONDOWN:
                if e.pos in self:
                    self.click()
                else:
                    self.release(force_no_call=True)

            elif e.type == MOUSEBUTTONUP:
                self.release(force_no_call=e.pos not in self)

            elif e.type == MOUSEMOTION:
                if e.pos in self:
                    self.hovered = True
                else:
                    self.hovered = False
1165143
function() { // clear all the event listeners for every input and event type
				each(inp_change_events, function(event_type) {
					each(inps, function(inp) {
						rEL(inp, event_type, on_change);
					});
				});
			}
1285276
def rename_event_type(self, name, new_name):
        """"""

        if name not in self.event_types:
            lg.info('Event type ' + name + ' was not found.')

        events = self.rater.find('events')

        for e in list(events):
            if e.get('type') == name:
                e.set('type', new_name)

        self.save()