Update the GUI to reflect channels and image listing.
420370
def update_channels(self):
        
        if not self.gui_up:
            return

        self.logger.debug("channel configuration has changed--updating gui")
        try:
            channel = self.fv.get_channel(self.chname)

        except KeyError:
            channel = self.fv.get_channel_info()

        if channel is None:
            raise ValueError('No channel available')

        self.chname = channel.name

        w = self.w.channel_name
        w.clear()

        self.chnames = list(self.fv.get_channel_names())
        #self.chnames.sort()
        for chname in self.chnames:
            w.append_text(chname)

        # select the channel that is the current one
        try:
            i = self.chnames.index(channel.name)
        except IndexError:
            i = 0
        self.w.channel_name.set_index(i)

        # update the image listing
        self.redo()
600351
def _update(self):
        
        self._colorbar.halfdim = self._halfdim
        self._border.halfdim = self._halfdim

        self._label.text = self._label_str
        self._ticks[0].text = str(self._clim[0])
        self._ticks[1].text = str(self._clim[1])

        self._update_positions()

        self._colorbar._update()
        self._border._update()
568633
def refresh(self):
        
        for cbar in self.colorbars:
            cbar.draw_all()
        self.canvas.draw()
753164
def _update_widgets(self):
        ''

        self._time_sensitive = any(getattr(w, 'TIME_SENSITIVE', False)
                                    for w in self.widgets)
374356
public void imageUpdate(ImageReader source, BufferedImage theImage,
            int minX, int minY, int width, int height, int periodX,
            int periodY, int[] bands)
    {
        if (image == null || !image.equals(theImage))
        {
            repaint(0);
            image = theImage;
        }
    }
454224
def _update_color_rgb(self, event=None):
        """"""
        if event is None or event.widget.old_value != event.widget.get():
            r = self.red.get()
            g = self.green.get()
            b = self.blue.get()
            h, s, v = rgb_to_hsv(r, g, b)
            self.hue.set(h)
            self.saturation.set(s)
            self.value.set(v)
            args = (r, g, b)
            if self.alpha_channel:
                args += (self.alpha.get(),)
                self.alphabar.set_color(args)
            hexa = rgb_to_hexa(*args)
            self.hexa.delete(0, "end")
            self.hexa.insert(0, hexa)
            self.square.set_hsv((h, s, v))
            self.bar.set(h)
            self._update_preview()
404983
def update(self, redraw=True):
        """"""
        # get the main urwid.Frame widget
        mainframe = self.root_widget.original_widget

        # body
        if self.current_buffer:
            mainframe.set_body(self.current_buffer)

        # footer
        lines = []
        if self._notificationbar:  # .get_text()[0] != ' ':
            lines.append(self._notificationbar)
        if self._show_statusbar:
            lines.append(self.build_statusbar())

        if lines:
            mainframe.set_footer(urwid.Pile(lines))
        else:
            mainframe.set_footer(None)
        # force a screen redraw
        if self.mainloop.screen.started and redraw:
            self.mainloop.draw_screen()
641642
def do_gui_update(self):
        
        with self.update_lock:
            changed_widget_dict = {}
            self.root.repr(changed_widget_dict)
            for widget in changed_widget_dict.keys():
                html = changed_widget_dict[widget]
                __id = str(widget.identifier)
                self._send_spontaneous_websocket_message(_MSG_UPDATE + __id + ',' + to_websocket(html))
        self._need_update_flag = False
573131
def redo(self, channel, image):
        """"""

        imname = image.get('name', 'none')
        chname = channel.name
        # is image in contents tree yet?
        in_contents = self.is_in_contents(chname, imname)

        # get old highlighted entries for this channel -- will be
        # an empty set or one key
        old_highlight = channel.extdata.contents_old_highlight

        # calculate new highlight keys -- again, an empty set or one key
        if image is not None:
            key = self._get_hl_key(chname, image)
            new_highlight = set([key])
        else:
            # no image has the focus
            new_highlight = set([])

        # Only highlights active image in the current channel
        if self.highlight_tracks_keyboard_focus:
            if in_contents:
                self.update_highlights(self._hl_path, new_highlight)
            self._hl_path = new_highlight

        # Highlight all active images in all channels
        else:
            if in_contents:
                self.update_highlights(old_highlight, new_highlight)
            channel.extdata.contents_old_highlight = new_highlight

        return True
1136876
public void updateImage()
    {
        if (m_iCurrentState == ON)
            this.setIcon(m_iconOn);
        else if (m_iCurrentState == OFF)
            this.setIcon(m_iconOff);
        else
            this.setIcon(m_iconNull);
    }
1262815
def update_monitor(self):
        """"""
        result = self._client.get_state(self._monitor_url)
        self._raw_result = result['monitor']
1165247
def _update_Prxy(self):
        """"""
        self.Prxy = self.Frxy * self.Qxy
        _fill_diagonals(self.Prxy, self._diag_indices)
190394
def update_views(self):
        """"""
        # Call the father's method
        super(Plugin, self).update_views()

        # Add specifics informations
        # Alert and log
        for key in ['user', 'system', 'iowait']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert_log(self.stats[key], header=key)
        # Alert only
        for key in ['steal', 'total']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
        # Alert only but depend on Core number
        for key in ['ctx_switches']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], maximum=100 * self.stats['cpucore'], header=key)
        # Optional
        for key in ['nice', 'irq', 'iowait', 'steal', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls']:
            if key in self.stats:
                self.views[key]['optional'] = True
295653
def update(self):
        '''
        
        '''
        self.image = self.blank.copy()
        
        bf = self.font.render(''.join(self.text[:self.cursor_loc]), 
                True, self.color)
        br = bf.get_rect().move(self.margin)
        
        af = self.font.render(''.join(self.text[self.cursor_loc:]), 
                True, self.color)
        
        cr = self.cursor.get_rect()
        cvec = Vector(br.w - cr.w, 0) + self.margin
        
        scroll = Vector()
        
        if cvec.x > self.rect.w:
            scroll.x = self.rect.w - cvec.x - self.font.size(' ')[0]
        
        vcenter_blit(self.image, bf, scroll + br)
        vcenter_blit(self.image, af, scroll + br.topright)
        
        if self.cursor_shown and self.focus and pygame.key.get_focused():
            vcenter_blit(self.image, self.cursor, scroll + cvec)
        
        if self.blink_frames != None:
            self.blinker += 1
            self.blinker %= self.blink_frames
            if not self.blinker:
                self.cursor_shown = not self.cursor_shown
277508
def update_views(self):
        """"""
        # Call the father's method
        super(Plugin, self).update_views()

        # Add specifics informations
        # Alert only
        for key in ['cpu', 'mem', 'swap']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
729765
def update_screen(self):
        """"""
        self.clock.tick(self.FPS)
        pygame.display.update()
553268
def update(self):
        
        super(BatchFolderContentsView, self).update()

        if self.on_batch_folder() and self.can_add_batches():
            self.context_actions[_("Add")] = {
                "url": "createObject?type_name=Batch",
                "permission": "Add portal content",
                "icon": "++resource++bika.lims.images/add.png"}