Create the underlying widget.

        A dialog is not a subclass of view, hence we don't set name as widget
        or children will try to use it as their parent.
333450
def create_widget(self):
        
        d = self.declaration
        self.dialog = BottomSheetDialog(self.get_context(), d.style)
714173
def create_widget(self):
        
        d = self.declaration
        self.widget = RelativeLayout(self.get_context(), None, d.style)
990900
def create_dialog(self):
        """"""
        self.bbox = QDialogButtonBox(QDialogButtonBox.Ok | 
                QDialogButtonBox.Cancel)
        self.idx_ok = self.bbox.button(QDialogButtonBox.Ok)
        self.idx_cancel = self.bbox.button(QDialogButtonBox.Cancel)

        filebutton = QPushButton()
        filebutton.setText('Choose')
        self.idx_filename = filebutton

        self.new_format = FormMenu(['EDF', 'Wonambi'])
        self.all_time = FormBool('Entire length of record')
        self.all_chan = FormBool('All channels')

        self.times = {}
        self.times['beg'] = FormFloat()
        self.times['end'] = FormFloat()

        chan_box = QListWidget()
        chan_box.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.idx_chan = chan_box

        filebutton.clicked.connect(self.save_as)
        self.all_time.connect(self.toggle_buttons)
        self.all_chan.connect(self.toggle_buttons)
        self.bbox.clicked.connect(self.button_clicked)

        self.all_time.set_value(True)
        self.all_chan.set_value(True)

        form = QFormLayout()
        form.addRow('Filename',
                    filebutton)
        #form.addRow('Format', self.new_format)
        form.addRow(self.all_time)
        form.addRow('Start time (sec)',
                    self.times['beg'])
        form.addRow('End time (sec)',
                    self.times['end'])
        form.addRow(self.all_chan)
        form.addRow('Channel(s)',
                    self.idx_chan)

        btnlayout = QHBoxLayout()
        btnlayout.addStretch(1)
        btnlayout.addWidget(self.bbox)

        vlayout = QVBoxLayout()
        vlayout.addLayout(form)
        vlayout.addStretch(1)
        vlayout.addLayout(btnlayout)

        self.setLayout(vlayout)
1000419
def init_widget(self):
        
        super(AndroidSwitch, self).init_widget()
        d = self.declaration
        self.set_show_text(d.show_text)
        if d.split_track:
            self.set_split_track(d.split_track)
        if d.text_off:
            self.set_text_off(d.text_off)
        if d.text_on:
            self.set_text_on(d.text_on)
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)
769561
def create_widget(self):
        
        d = self.declaration
        self.widget = FloatingActionButton(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)
818417
def create_widget(self):
        
        d = self.declaration
        self.widget = CardView(self.get_context(), None, d.style)
1243400
def create_widget(self):
        
        d = self.declaration
        mode = 1 if d.mode == 'dropdown' else 0
        self.widget = Spinner(self.get_context(), mode)

        # Create the adapter simple_spinner_item = 0x01090008
        self.adapter = ArrayAdapter(self.get_context(),
                                    '@layout/simple_spinner_dropdown_item')
50978
Widget createWidget() {

        if (isTrue(m_jsonConfig, CmsDataViewConstants.CONFIG_PREVIEW)) {
            return new CmsDataViewPreviewWidget(
                m_config,
                m_valueAccessor,
                new CmsDataViewPreviewWidget.ContentImageLoader());
        } else {
            I_ImageProvider provider = null;
            CmsDataViewValue val = m_valueAccessor.getValue();
            JSONValue iconVal = m_jsonConfig.get(CmsDataViewConstants.CONFIG_ICON);
            if ((iconVal != null) && (iconVal.isString() != null)) {
                provider = new CmsDataViewPreviewWidget.SimpleImageLoader(iconVal.isString().stringValue());
            }
            return new CmsDataViewPreviewWidget(m_config, m_valueAccessor, provider);
        }

    }
226033
@Override
    protected void defineWidgets() {

        // initialize the project object to use for the dialog
        initSessionObject();

        setKeyPrefix(KEY_PREFIX);

        // widgets to display
        addWidget(new CmsWidgetDialogParameter(
            this,
            "resources",
            "/",
            PAGES[0],
            new CmsVfsFileWidget(false, null),
            1,
            CmsWidgetDialogParameter.MAX_OCCURENCES));
    }
423012
def create_ui(self):
        
        self.entry = gtk.Entry()
        self.widget.add(self.entry)
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)
333818
def create_widget(self):
        
        d = self.declaration
        self.widget = DrawerLayout(self.get_context(),  None, d.style)
370793
def create_widget(self):
        
        d = self.declaration
        style = d.style if d.style else (
            '@attr/borderlessButtonStyle' if d.flat else '@attr/buttonStyle')
        self.widget = Button(self.get_context(), None, style)
1027421
def create_configwidget(self, parent):
        """"""
        if self.CONFIGWIDGET_CLASS is not None:
            configwidget = self.CONFIGWIDGET_CLASS(self, parent)
            configwidget.initialize()
            return configwidget
1264486
private CmsGalleryPopup createPopup() {

        I_CmsGalleryWidgetHandler handler = new I_CmsGalleryWidgetHandler() {

            @Override
            public void setWidgetValue(
                String resourcePath,
                CmsUUID structureId,
                CmsCroppingParamBean croppingParameter) {

                setValueFromGallery(resourcePath, structureId, croppingParameter);
            }
        };
        m_configuration.setCurrentElement(getCurrentElement());
        return new CmsGalleryPopup(handler, m_configuration);
    }