Create the underlying widget.
769561
def create_widget(self):
        
        d = self.declaration
        self.widget = FloatingActionButton(self.get_context(), None, d.style)
966225
def init_widget(self):
        
        d = self.declaration
        w = self.widget
        date = d.date
        w.init(date.year, date.month-1, date.day, w.getId())
        super(AndroidDatePicker, self).init_widget()
        w.onDateChanged.connect(self.on_date_changed)
439552
def create(self):
        """"""
        self.idx_chan = QComboBox()
        self.idx_chan.activated.connect(self.display_window)

        self.idx_fig = QGraphicsView(self)
        self.idx_fig.scale(1, -1)

        layout = QVBoxLayout()
        layout.addWidget(self.idx_chan)
        layout.addWidget(self.idx_fig)
        self.setLayout(layout)

        self.resizeEvent(None)
1057237
def create_widget(self):
        
        d = self.declaration
        self.widget = FrameLayout(self.get_context(), None, d.style)
695341
@Override
	public Widget createDetailWidget() {
		return new AbstractWidget() {

			@Override
			public void onAboutToShow() {
				DefaultDataEditorWidget.this.onAboutToShow();
			}

			@Override
			public void onAboutToHide() {
				DefaultDataEditorWidget.this.onAboutToHide();
			}

			public JComponent getComponent() {
				return getDetailForm().getControl();
			}

			@Override
			public List<? extends AbstractCommand> getCommands() {
				return Arrays.asList(getDetailForm().getCommitCommand());
			}

			@Override
			public String getId() {
				return DefaultDataEditorWidget.this.getId() + "."
						+ getDetailForm().getId();
			}
		};
	}
1205907
def _add_widget(self, widget):
        
        widgets = self.widgets()
        widgets += [widget]
        self._save_customization(widgets)
333450
def create_widget(self):
        
        d = self.declaration
        self.dialog = BottomSheetDialog(self.get_context(), d.style)
327174
def create_widget(self):
        
        d = self.declaration

        if self.indeterminate:
            #: Note: Style will only exist on activity indicators!
            style = ProgressBar.STYLES[d.size]
        else:
            style = ProgressBar.STYLE_HORIZONTAL
        self.widget = ProgressBar(self.get_context(), None, style)
745742
def init_widget(self):
        
        super(AndroidPicker, self).init_widget()
        d = self.declaration
        w = self.widget
        if d.items:
            self.set_items(d.items)
        else:
            if d.max_value:
                self.set_max_value(d.max_value)
            if d.min_value:
                self.set_min_value(d.min_value)
        self.set_value(d.value)
        if d.wraps:
            self.set_wraps(d.wraps)

        if d.long_press_update_interval:
            self.set_long_press_update_interval(d.long_press_update_interval)

        w.setOnValueChangedListener(w.getId())
        w.onValueChange.connect(self.on_value_change)
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()
568202
def add_widget(self, widget):
        
        if self._buttons.get(widget):
            return
        btn = self.create_button(widget)
        cb = partial(self.focus_widget, w=widget)
        btn.clicked.connect(cb)
        self.layout().addWidget(btn)
        self._buttons[widget] = btn
534972
def create_widget(self):
        
        d = self.declaration
        self.widget = DatePicker(self.get_context(), None,
                                 d.style or "@attr/datePickerStyle")
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
319233
def create_widget(self):
        
        d = self.declaration
        self.widget = RadioButton(self.get_context(), None,
                                  d.style or '@attr/radioButtonStyle')
758829
def _create_ui(self):
        """"""

        self.preview = None
        self.about_dialog = None
        self.preferences = None
        self.builder = pygubu.Builder(translator)
        self.currentfile = None
        self.is_changed = False

        uifile = os.path.join(FILE_PATH, "ui/pygubu-ui.ui")
        self.builder.add_from_file(uifile)
        self.builder.add_resource_path(os.path.join(FILE_PATH, "images"))

        #build main ui
        self.builder.get_object('mainwindow', self.master)
        toplevel = self.master.winfo_toplevel()
        menu = self.builder.get_object('mainmenu', toplevel)
        toplevel['menu'] = menu

        #project name
        self.project_name = self.builder.get_object('projectname_lbl')

        #Class selector values
        self.widgetlist_sf = self.builder.get_object("widgetlist_sf")
        self.widgetlist = self.builder.get_object("widgetlist")
        self.configure_widget_list()

        #widget tree
        self.treeview = self.builder.get_object('treeview1')
        self.bindings_frame = self.builder.get_object('bindingsframe')
        self.bindings_tree = self.builder.get_object('bindingstree')

        #Preview
        previewc = self.builder.get_object('preview_canvas')
        self.previewer = PreviewHelper(previewc)
        #tree editor
        self.tree_editor = WidgetsTreeEditor(self)

        self.builder.connect_callbacks(self)

        #Status bar
        self.statusbar = self.builder.get_object('statusbar')
        handler = StatusBarHandler(self.statusbar)
        handler.setLevel(logging.INFO)
        logger.addHandler(handler)
        pygubu.builder.logger.addHandler(handler)

        #app grid
        self.set_resizable()

        #
        #Application bindings
        #
        master = self.master
        master.bind_all(
            '<Control-KeyPress-n>',
            lambda e: self.on_file_menuitem_clicked('file_new'))
        master.bind_all(
            '<Control-KeyPress-o>',
            lambda e: self.on_file_menuitem_clicked('file_open'))
        master.bind_all(
            '<Control-KeyPress-s>',
            lambda e: self.on_file_menuitem_clicked('file_save'))
        master.bind_all(
            '<Control-KeyPress-q>',
            lambda e: self.on_file_menuitem_clicked('file_quit'))
        master.bind_all(
            '<Control-KeyPress-i>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_up'))
        master.bind_all(
            '<Control-KeyPress-k>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_down'))
        master.bind_all(
            '<F5>',
            lambda e: self.tree_editor.preview_in_toplevel())
        master.bind_all(
            '<F6>',
            lambda e: self.previewer.close_toplevel_previews())

        #
        # Widget bindings
        #
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-c>',
            lambda e: self.tree_editor.copy_to_clipboard())
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-v>',
            lambda e: self.tree_editor.paste_from_clipboard())
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-x>',
            lambda e: self.tree_editor.cut_to_clipboard())
        self.tree_editor.treeview.bind(
            '<KeyPress-Delete>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_delete'))

        def clear_key_pressed(event, newevent):
            # when KeyPress, not Ctrl-KeyPress, generate event.
            if event.keysym_num == ord(event.char):
                self.tree_editor.treeview.event_generate(newevent)
        self.tree_editor.treeview.bind('<i>',
                lambda e: clear_key_pressed(e, '<Up>'))
        self.tree_editor.treeview.bind('<k>',
                lambda e: clear_key_pressed(e, '<Down>'))

        #grid move bindings
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-i>',
            lambda e: self.on_edit_menuitem_clicked('grid_up'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-k>',
            lambda e: self.on_edit_menuitem_clicked('grid_down'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-j>',
            lambda e: self.on_edit_menuitem_clicked('grid_left'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-l>',
            lambda e: self.on_edit_menuitem_clicked('grid_right'))
            
        # On preferences save binding
        self.master.bind('<<PygubuDesignerPreferencesSaved>>', self.on_preferences_saved)

        #
        # Setup tkk styles
        #
        self._setup_styles()

        #
        # Setup dynamic theme submenu
        #
        self._setup_theme_menu()

        #app config
        top = self.master.winfo_toplevel()
        try:
            top.wm_iconname('pygubu')
            top.tk.call('wm', 'iconphoto', '.', StockImage.get('pygubu'))
        except StockImageException as e:
            pass

        self.set_title(_('Pygubu a GUI builder for tkinter'))
        self.set_size('640x480')
333002
def create_widget(self):
        
        widget = QDoubleSpinBox(self.parent_widget())
        widget.setKeyboardTracking(False)
        self.widget = widget
278779
protected function createWidget()
    {
        $type   = $this->widgetData('type');
        $widget = $this->resolveWidget($type);

        if (!$widget->ident()) {
            $widget->setIdent($this->propertyIdent());
        }

        if ($this instanceof FormInputInterface) {
            if ($widget instanceof FormGroupInterface) {
                $widget->setForm($this->formGroup()->form());
            }

            if ($widget instanceof FormInputInterface) {
                $widget->setFormGroup($this->formGroup());
            }
        } elseif ($this instanceof FormGroupInterface) {
            if ($widget instanceof FormGroupInterface) {
                $widget->setForm($this->form());
            }

            if ($widget instanceof FormInputInterface) {
                $widget->setFormGroup($this);
            }
        }

        $widget->setData($this->widgetData());
        $widget->setData($this->renderableData());

        return $widget;
    }