Set widgets on the LayerMode tab.
426821
def set_widgets(self):
        """"""
        self.clear_further_steps()
        # Set widgets
        self.lblBandSelector.setText(tr(
            'Please select which band that contains the data that you want to '
            'use for this layer.'))
        self.lstBands.clear()
        band_num = self.parent.layer.bandCount()
        for i in range(band_num):
            item = QListWidgetItem(
                self.parent.layer.bandName(i + 1),
                self.lstBands)
            item.setData(QtCore.Qt.UserRole, i + 1)
            self.lstBands.addItem(item)
        existing_band = self.parent.get_existing_keyword('active_band')
        if existing_band:
            self.lstBands.setCurrentRow(existing_band - 1)
        else:
            # Set to Band 1 / index 0
            self.lstBands.setCurrentRow(0)
753164
def _update_widgets(self):
        ''

        self._time_sensitive = any(getattr(w, 'TIME_SENSITIVE', False)
                                    for w in self.widgets)
332913
def setViewWidget(self, viewWidget):
        
        self._viewWidget = viewWidget
        if viewWidget:
            viewWidget.resetFinished.connect(self.clearActive)
532840
@Override
    protected void defineWidgets() {

        super.defineWidgets();
        addWidget(new CmsWidgetDialogParameter(m_indexsource, "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_indexsource, "indexerClassName", PAGES[0], new CmsDisplayWidget()));
    }
591154
@Override
    protected void defineWidgets() {

        initModule();

        addWidget(new CmsWidgetDialogParameter(m_dependency, "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(m_dependency, "version.version", PAGES[0], new CmsDisplayWidget()));

    }
1243668
def setMode(self, mode):
		""""""
		_baseDes.setMode(self, mode)
		for key in (self.__key1, self.__key2, self.__key3):
			key.setMode(mode)
762917
def set_scrollbars_cb(self, w, tf):
        """"""
        scrollbars = 'on' if tf else 'off'
        self.t_.set(scrollbars=scrollbars)
721961
def setPalette(self, palette):
        
        super(XPopupWidget, self).setPalette(palette)
        self._scrollArea.setPalette(palette)
1347762
def create_tab(self, *widgets):
        """"""
        widget = QWidget()
        layout = QVBoxLayout()
        for widg in widgets:
            layout.addWidget(widg)
        layout.addStretch(1)
        widget.setLayout(layout)
        return widget
706936
def set_widgets(self):
        """"""
        self.clear_further_steps()
        purpose = self.parent.step_kw_purpose.selected_purpose()['name']
        subcategory = self.parent.step_kw_subcategory.\
            selected_subcategory()['name']
        self.lstClassifications.clear()
        self.lblDescribeClassification.setText('')
        self.lblSelectClassification.setText(
            classification_question % (subcategory, purpose))
        classifications = self.classifications_for_layer()
        for classification in classifications:
            if not isinstance(classification, dict):
                classification = definition(classification)
            item = QListWidgetItem(
                classification['name'],
                self.lstClassifications)
            item.setData(QtCore.Qt.UserRole, classification['key'])
            self.lstClassifications.addItem(item)

        # Set values based on existing keywords (if already assigned)
        classification_keyword = self.parent.get_existing_keyword(
            'classification')
        if classification_keyword:
            classifications = []
            for index in range(self.lstClassifications.count()):
                item = self.lstClassifications.item(index)
                classifications.append(item.data(QtCore.Qt.UserRole))
            if classification_keyword in classifications:
                self.lstClassifications.setCurrentRow(
                    classifications.index(classification_keyword))

        self.auto_select_one_item(self.lstClassifications)
864216
def create_widget(self):
        
        d = self.declaration
        self.widget = TabLayout(self.get_context(), None, d.style)
370092
def create_widgets(self):
        """"""
        self.bbox = QDialogButtonBox(
                QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
        self.idx_ok = self.bbox.button(QDialogButtonBox.Ok)
        self.idx_cancel = self.bbox.button(QDialogButtonBox.Cancel)

        self.idx_group = FormMenu([gr['name'] for gr in self.groups])

        chan_box = QListWidget()
        self.idx_chan = chan_box

        stage_box = QListWidget()
        stage_box.addItems(STAGE_NAME)
        stage_box.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.idx_stage = stage_box

        cycle_box = QListWidget()
        cycle_box.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.idx_cycle = cycle_box
110165
def setup_editorstack(self, parent, layout):
        """"""
        layout.setSpacing(1)

        self.fname_label = QLabel()
        self.fname_label.setStyleSheet(
            "QLabel {margin: 0px; padding: 3px;}")
        layout.addWidget(self.fname_label)

        menu_btn = create_toolbutton(self, icon=ima.icon('tooloptions'),
                                     tip=_('Options'))
        # Don't show menu arrow and remove padding
        if is_dark_interface():
            menu_btn.setStyleSheet(
                ("QToolButton::menu-indicator{image: none;}\n"
                 "QToolButton{margin: 1px; padding: 3px;}"))
        else:
            menu_btn.setStyleSheet(
                "QToolButton::menu-indicator{image: none;}")
        self.menu = QMenu(self)
        menu_btn.setMenu(self.menu)
        menu_btn.setPopupMode(menu_btn.InstantPopup)
        self.menu.aboutToShow.connect(self.__setup_menu)

        corner_widgets = {Qt.TopRightCorner: [menu_btn]}
        self.tabs = BaseTabs(self, menu=self.menu, menu_use_tooltips=True,
                             corner_widgets=corner_widgets)
        self.tabs.tabBar().setObjectName('plugin-tab')
        self.tabs.set_close_function(self.close_file)
        self.tabs.tabBar().tabMoved.connect(self.move_editorstack_data)
        self.tabs.setMovable(True)

        self.stack_history.refresh()

        if hasattr(self.tabs, 'setDocumentMode') \
           and not sys.platform == 'darwin':
            # Don't set document mode to true on OSX because it generates
            # a crash when the editor is detached from the main window
            # Fixes Issue 561
            self.tabs.setDocumentMode(True)
        self.tabs.currentChanged.connect(self.current_changed)

        if sys.platform == 'darwin':
            tab_container = QWidget()
            tab_container.setObjectName('tab-container')
            tab_layout = QHBoxLayout(tab_container)
            tab_layout.setContentsMargins(0, 0, 0, 0)
            tab_layout.addWidget(self.tabs)
            layout.addWidget(tab_container)
        else:
            layout.addWidget(self.tabs)
1181893
def set_ylimits_widgets(self, set_min=True, set_max=True):
        """"""
        ymin, ymax = self.tab_plot.ax.get_ylim()
        if set_min:
            self.w.y_lo.set_text('{0}'.format(ymin))
        if set_max:
            self.w.y_hi.set_text('{0}'.format(ymax))
701767
@Override
    protected void defineWidgets() {

        // initialize the object to use for the dialog
        initSynchronizeSettingsObject();
        setKeyPrefix(KEY_PREFIX);
        addWidget(new CmsWidgetDialogParameter(m_synchronizeSettings, "enabled", PAGES[0], new CmsCheckboxWidget()));
        addWidget(
            new CmsWidgetDialogParameter(
                m_synchronizeSettings,
                "destinationPathInRfs",
                PAGES[0],
                new CmsInputWidget()));
        addWidget(
            new CmsWidgetDialogParameter(
                m_synchronizeSettings,
                "sourceListInVfs",
                "/",
                PAGES[0],
                new CmsVfsFileWidget(false, ""),
                1,
                CmsWidgetDialogParameter.MAX_OCCURENCES));

    }
1355205
function() {
        for (var i=0, len=this.layers.length; i<len; i++) {
            var layer = this.layers[i];
            this.setLayerZIndex(layer, i);
        }
    }
257044
function setupAddonBarWidget() {
  var panel = panels.Panel({
    width: 200,
    height: 128,
    contentURL: self.data.url('widget-panel.html'),
    contentScriptFile: self.data.url('widget-panel.js')
  });
  panel.on('show', function() {
    var url = getCanonicalUrl(tabs.activeTab.url);
    if (!url.length) {
      panel.port.emit('show', null);
    } else {
      panel.port.emit('show', {
        'enabled': isInjectionEnabledForUrl(url)
      });
    }
  });
  panel.port.on('perform', function(action) {
    switch (action) {
      case 'toggle':
        toggleInjectionForActiveTab();
        panel.hide();
        break;
      case 'reset':
        resetOptionsForActiveTab();
        panel.hide();
        break;
      case 'show_ui':
        showUi();
        panel.hide();
        break;
    }
  });

  var widget = widgets.Widget({
    id: 'wtf-toggle',
    label: 'Toggle Web Tracing Framework',
    contentURL: self.data.url('widget.html'),
    contentScriptFile: self.data.url('widget.js'),
    panel: panel
  });

  // Update the widget icon when the URL changes.
  function tabChanged() {
    var url = getCanonicalUrl(tabs.activeTab.url);
    widget.port.emit('update', {
      'enabled': url.length ? isInjectionEnabledForUrl(url) : false
    });
  };
  tabs.on('open', tabChanged);
  tabs.on('close', tabChanged);
  tabs.on('ready', tabChanged);
  tabs.on('activate', tabChanged);
  tabs.on('deactivate', tabChanged);
}