Initialize the widget UI and return the UI.
975663
def _init_ui(self) -> VBox:
        ""
        self._search_input = Text(placeholder="What images to search for?")
        self._count_input = BoundedIntText(placeholder="How many pics?", value=10, min=1, max=5000, step=1,
                                           layout=Layout(width='60px'))
        self._size_input = Dropdown(options= _img_sizes.keys(), value='>400*300', layout=Layout(width='120px'))
        self._download_button = Button(description="Search & Download", icon="download", layout=Layout(width='200px'))
        self._download_button.on_click(self.on_download_button_click)
        self._output = Output()
        self._controls_pane  = HBox([self._search_input, self._count_input, self._size_input, self._download_button],
                                    layout=Layout(width='auto', height='40px'))
        self._heading = ""
        self._download_complete_heading = "<h3>Download complete. Here are a few images</h3>"
        self._preview_header = widgets.HTML(self._heading, layout=Layout(height='60px'))
        self._img_pane = Box(layout=Layout(display='inline'))
        return VBox([self._controls_pane, self._preview_header, self._img_pane])
395675
public function init()
    {
        if ($this->widget !== null) {
            $this->widget->init();
        }

        // ensure the widget has an id
        if ($this->widget->id === null) {
            $this->widget->id = $this->widget->getUniqueId();
        }
    }
1057237
def create_widget(self):
        
        d = self.declaration
        self.widget = FrameLayout(self.get_context(), None, d.style)
1113357
def init_layout(self):
        
        super(AndroidDialog, self).init_layout()

        #: Set the content
        for view in self.child_widgets():
            self.dialog.setContentView(view)
            break

        #: Show it if needed
        d = self.declaration
        if d.show:
            self.set_show(d.show)
1154047
def __initialize_ui(self):
        

        self.setAutoScroll(True)
        self.setIndentation(self.__tree_view_indentation)
        self.setRootIsDecorated(False)
        self.setDragDropMode(QAbstractItemView.DragOnly)

        self.header().hide()

        self.setSortingEnabled(True)
        self.sortByColumn(0, Qt.AscendingOrder)

        self.__set_default_ui_state()

        # Signals / Slots.
        self.model().modelReset.connect(self.__set_default_ui_state)
895045
def init_widget(self):
        
        super(AndroidCalendarView, self).init_widget()

        #: Setup listener
        w = self.widget
        w.setOnDateChangeListener(w.getId())
        w.onSelectedDayChange.connect(self.on_selected_day_change)
656488
def init_widget(self):
        
        super(UiKitEditText, self).init_widget()

        #: Init font properties etc...
        self.init_text()

        d = self.declaration
        if d.placeholder:
            self.set_placeholder(d.placeholder)
        if d.input_type != 'text':
            self.set_input_type(d.input_type)
        if d.style:
            self.set_style(d.style)

        #: A really ugly way to add the target
        #: would be nice if we could just pass the block pointer here :)
        self.get_app().bridge.addTarget(
            self.widget,
            forControlEvents=UITextField.UIControlEventEditingChanged,
            andCallback=self.widget.getId(),
            usingMethod="onValueChanged",
            withValues=["text"]#,"selected"]
        )

        self.widget.onValueChanged.connect(self.on_value_changed)
409916
def add_ui(self, klass, *args, **kwargs):
        '''

        '''
        ui = klass(self.widget, *args, **kwargs)
        self.widget.uis.append(ui)
        return ui
1157965
def init_widget(self):
        
        super(AndroidRelativeLayout, self).init_widget()
        d = self.declaration
        if d.gravity:
            self.set_gravity(d.gravity)
        if d.horizontal_gravity:
            self.set_horizontal_gravity(d.horizontal_gravity)
        if d.vertical_gravity:
            self.set_vertical_gravity(d.vertical_gravity)
87568
def create_widget(self):
        
        d = self.declaration
        self.widget = View(self.get_context(), None, d.style)
132777
function init_ui()
    {
        if ($this->ui_initialized) {
            return;
        }

        // load localization
        $this->add_texts('localization/');

        $sieve_action = strpos($this->rc->action, 'plugin.managesieve') === 0;

        if ($this->rc->task == 'mail' || $sieve_action) {
            $this->include_script('managesieve.js');
        }

        // include styles
        $skin_path = $this->local_skin_path();
        if ($sieve_action || ($this->rc->task == 'settings' && empty($_REQUEST['_framed']))) {
            $this->include_stylesheet("$skin_path/managesieve.css");
        }
        else if ($this->rc->task == 'mail') {
            $this->include_stylesheet("$skin_path/managesieve_mail.css");
        }

        $this->ui_initialized = true;
    }
714173
def create_widget(self):
        
        d = self.declaration
        self.widget = RelativeLayout(self.get_context(), None, d.style)
452893
def init_widget(self):
        
        w = self.window
        d = self.declaration
        self.set_background_color(d.background_color)
        self.set_touchable(d.touchable)
        self.set_outside_touchable(d.outside_touchable)

        # Listen for events
        w.setOnDismissListener(w.getId())
        w.onDismiss.connect(self.on_dismiss)
        super(AndroidPopupWindow, self).init_widget()
63562
def create_widget(self):
        
        d = self.declaration
        self.widget = Chronometer(self.get_context(), None, d.style)
164534
def __initialize_ui(self):
        

        umbra.ui.common.set_window_default_icon(self)

        self.__model = SearchResultsModel(self)
        self.__delegate = RichText_QStyledItemDelegate(self)

        self.Search_Results_treeView.setParent(None)
        self.Search_Results_treeView = SearchResults_QTreeView(self,
                                                               self.__model,
                                                               message="No Search Result to view!")
        self.Search_Results_treeView.setItemDelegate(self.__delegate)
        self.Search_Results_treeView.setObjectName("Search_Results_treeView")
        self.Search_Results_frame_gridLayout.addWidget(self.Search_Results_treeView, 0, 0)
        self.__view = self.Search_Results_treeView
        self.__view.setContextMenuPolicy(Qt.ActionsContextMenu)
        self.__view_add_actions()

        self.__search_patterns_model = self.__container.search_and_replace.search_patterns_model
        self.Search_comboBox.setModel(self.__container.search_and_replace.search_patterns_model)
        self.Search_comboBox.setInsertPolicy(QComboBox.InsertAtTop)
        self.Search_comboBox.completer().setCaseSensitivity(Qt.CaseSensitive)

        self.__replace_with_patterns_model = self.__container.search_and_replace.replace_with_patterns_model
        self.Replace_With_comboBox.setModel(self.__container.search_and_replace.replace_with_patterns_model)
        self.Replace_With_comboBox.setInsertPolicy(QComboBox.InsertAtTop)
        self.Replace_With_comboBox.completer().setCaseSensitivity(Qt.CaseSensitive)

        self.Where_lineEdit.setParent(None)
        self.Where_lineEdit = Search_QLineEdit(self)
        self.Where_lineEdit.setObjectName("Where_lineEdit")
        self.Where_frame_gridLayout.addWidget(self.Where_lineEdit, 0, 0)
        self.__locations_menu = QMenu()
        for title, location in self.__locations.iteritems():
            self.__locations_menu.addAction(self.__container.engine.actions_manager.register_action(
                "Actions|Umbra|Components|factory.script_editor|Search In Files|{0}".format(title),
                text="{0}".format(title),
                slot=functools.partial(self.__add_location, location)))
        self.Where_lineEdit.search_active_label.set_menu(self.__locations_menu)
        self.Where_lineEdit.setPlaceholderText("Use the magnifier to add locations!")

        self.installEventFilter(ValidationFilter(self))

        # Signals / Slots.
        self.__view.selectionModel().selectionChanged.connect(self.__view_selectionModel__selectionChanged)
        self.__view.doubleClicked.connect(self.__view__doubleClicked)
        self.__search_patterns_model.pattern_inserted.connect(functools.partial(
            self.__patterns_model__pattern_inserted, self.Search_comboBox))
        self.__replace_with_patterns_model.pattern_inserted.connect(functools.partial(
            self.__patterns_model__pattern_inserted, self.Replace_With_comboBox))
        self.Search_pushButton.clicked.connect(self.__Search_pushButton__clicked)
        self.Close_pushButton.clicked.connect(self.__Close_pushButton__clicked)
1091070
def initialize_ui(self):
        

        LOGGER.debug("> Initializing '{0}' Component ui.".format(self.__class__.__name__))

        umbra.ui.common.set_toolBox_height(self.Preferences_Manager_toolBox)

        self.__Logging_Formatters_comboBox_set_ui()
        self.__Verbose_Level_comboBox_set_ui()
        self.__Restore_Geometry_On_Layout_Change_checkBox_set_ui()

        # Signals / Slots.
        self.__engine.verbosity_level_changed.connect(self.__engine__verbosity_level_changed)
        self.Logging_Formatters_comboBox.activated.connect(self.__Logging_Formatters_comboBox__activated)
        self.Verbose_Level_comboBox.activated.connect(self.__Verbose_Level_comboBox__activated)
        self.Restore_Geometry_On_Layout_Change_checkBox.stateChanged.connect(
            self.__Restore_Geometry_On_Layout_Change_checkBox__stateChanged)

        self.initialized_ui = True
        return True
414185
def setup_ui(self, ):
        
        self.main_vbox = QtGui.QVBoxLayout(self)
        self.import_all_references_cb = QtGui.QCheckBox("Import references")
        self.main_vbox.addWidget(self.import_all_references_cb)