Widget 的所有数据处理都放在此函数中, 渲染 view 前调用.
340782
public function process()
    {
        foreach ($this->exports as $name => $url) {
            $this->addButton(self::BTN_RIGHT_TOP, $name, $url, 'lego-export-' . $name);
        }

        if (count($this->batches())) {
            LegoAssets::js('components/vue/dist/vue.min.js');
            LegoAssets::js('js/batch.js');
        }

        $this->paginator();
    }
917558
def create_widget(self):
        
        context = self.get_context()
        d = self.declaration
        style = d.style or '@attr/autoCompleteTextViewStyle'
        self.widget = AutoCompleteTextView(context, None, style)
        self.adapter = ArrayAdapter(context, '@layout/simple_list_item_1')
1276184
def list_view_changed(self, widget, event, data=None):
        
        adj = self.scrolled_window.get_vadjustment()
        adj.set_value(adj.get_upper() - adj.get_page_size())
156110
def draw_widget(self, item):
        """"""
        if item:
            self.filter_remove(remember=True)
            selected_id = self.treedata[item]['id']
            item = self.get_toplevel_parent(item)
            widget_id = self.treedata[item]['id']
            wclass = self.treedata[item]['class']
            xmlnode = self.tree_node_to_xml('', item)
            self.previewer.draw(item, widget_id, xmlnode, wclass)
            self.previewer.show_selected(item, selected_id)
            self.filter_restore()
567678
@Override
    protected void defineWidgets() {

        super.defineWidgets();

        // widgets to display in first block (like edit view)
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "rebuildMode", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "locale", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "project", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(
            getSearchIndexIndex(),
            "fieldConfigurationName",
            PAGES[0],
            new CmsDisplayWidget()));
    }
568830
def items( self ):
        
        layout = self.widget().layout()
        return [layout.itemAt(i).widget() for i in range(layout.count()-1)]
972887
def create_widget(self):
        
        d = self.declaration
        self.widget = CalendarView(self.get_context(), None,
                                   d.style or "@attr/calendarViewStyle")
392066
public function display()
    {
        if (!$this->visible) {
            return;
        }

        SwatWidget::display();

        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = $this->getCSSClassString();
        $div_tag->open();

        $this->label_tag = new SwatHtmlTag('label');
        $this->label_tag->class = 'swat-control';

        $this->input_tag = new SwatHtmlTag('input');
        $this->input_tag->type = 'checkbox';
        $this->input_tag->name = $this->id . '[]';

        if ($this->tree !== null) {
            $num_nodes = $this->displayNode($this->tree);
        } else {
            $num_nodes = 0;
        }

        // Only display the check-all widget if more than one checkable item is
        // displayed.
        $check_all = $this->getCompositeWidget('check_all');
        $check_all->visible = $num_nodes > 1 && $this->show_check_all;
        $check_all->display();

        $div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
485769
def get_view(self):
        
        d = self.declaration
        if d.cached and self.widget:
            return self.widget
        if d.defer_loading:
             self.widget = FrameLayout(self.get_context())
             app = self.get_context()
             app.deferred_call(
                 lambda: self.widget.addView(self.load_view(), 0))
        else:
            self.widget = self.load_view()
        return self.widget
618844
def display_view(self):
        """"""
        self.idx_start.setText(str(self.parent.value('window_start')))
        self.idx_length.setText(str(self.parent.value('window_length')))
        self.idx_scaling.setText(str(self.parent.value('y_scale')))
        self.idx_distance.setText(str(self.parent.value('y_distance')))
103860
public function display()
    {
        if (!$this->visible) {
            return;
        }

        SwatWidget::display();

        $div = new SwatHtmlTag('div');
        $div->id = $this->id;
        $div->class = $this->getCSSClassString();

        $div->open();
        $this->displayChildren();
        $div->close();
    }
1370836
def select_by_widget(self, widget):
        
        for a, li, holder in self._tabs.values():
            if holder.children['content'] == widget:
                self._on_tab_pressed(a, li, holder)
                return
54972
function(view, config, widget) {

		this._view = view;
		//this._config = config;
		this._widget = widget;

		if (('options' in config)) {

			if ('appender' in config.options) {
				if (Lava.schema.DEBUG && !this['_append' + config.options.appender]) Lava.t('[Emulated container] wrong appender: ' + config.options.appender);
				this.appendHTML = this['_append' + config.options.appender]
			}

			if ('prepender' in config.options) {
				if (Lava.schema.DEBUG && !this['_append' + config.options.prepender]) Lava.t('[Emulated container] wrong prepender: ' + config.options.prepender);
				this.prependHTML = this['_append' + config.options.prepender]
			}

		}

	}
881927
public function findAllWidgetsForView(View $view)
    {
        $qb = $this->getAllForView($view);

        return $qb->getQuery()->getResult();
    }
287760
public void setupViews(Widget widget) {
        if (widget.getUiStyle() == Widget.STYLE_LIGHT) {
            int color = ContextCompat.getColor(getContext(), R.color.albumLoadingDark);
            mProgressBar.setColorFilter(color);
        } else {
            mProgressBar.setColorFilter(widget.getToolBarColor());
        }
    }
1024467
function widgetsLayout(): array
    {
        if(!$this->layoutBuilt) {
            $this->buildWidgetsLayout();
            $this->layoutBuilt = true;
        }

        return [
            "rows" => collect($this->rows)->map(function(DashboardLayoutRow $row) {
                return $row->toArray();
            })->all()
        ];
    }
967824
def get_widget(self, index=None, path=None, tabs=None):
        
        if (index and tabs) or (path and tabs):
            return tabs.widget(index)
        elif self.plugin:
            return self.get_plugin_tabwidget(self.plugin).currentWidget()
        else:
            return self.plugins_tabs[0][0].currentWidget()