Initializes the default buttons (toggle).
510449
protected function initButton()
	{
		if ($this->checkedButtonLabel === null)
			$this->checkedButtonLabel = Yii::t('zii', 'Uncheck');

		if ($this->uncheckedButtonLabel === null)
			$this->uncheckedButtonLabel = Yii::t('zii', 'Check');

		if ($this->emptyButtonLabel === null)
			$this->emptyButtonLabel = Yii::t('zii', 'Not set');

		$this->button = array(
			'url' => 'Yii::app()->controller->createUrl("' . $this->toggleAction . '",array("pk"=>$data->primaryKey,"attribute"=>"' . $this->name . '"))',
			'htmlOptions' => array('class' => $this->name . '_toggle' . $this->uniqueClassSuffix),
		);

		if (Yii::app()->request->enableCsrfValidation) {
			$csrfTokenName = Yii::app()->request->csrfTokenName;
			$csrfToken = Yii::app()->request->csrfToken;
			$csrf = "\n\t\tdata:{ '$csrfTokenName':'$csrfToken' },";
		} else {
			$csrf = '';
		}

		if ($this->afterToggle === null) {
			$this->afterToggle = 'function(){}';
		}

		$this->button['click'] = "js:
function() {
	var th=this;
	var afterToggle={$this->afterToggle};
	$.fn.yiiGridView.update('{$this->grid->id}', {
		type:'POST',
		url:$(this).attr('href'),{$csrf}
		success:function(data) {
			$.fn.yiiGridView.update('{$this->grid->id}');
			afterToggle(true, data);
		},
		error:function(XHR){
			afterToggle(false,XHR);
		}
	});
	return false;
}";
	}
54591
def __initialize_ui(self):
        

        self.setAutoScroll(False)
        self.setDragDropMode(QAbstractItemView.NoDragDrop)
        self.setEditTriggers(QAbstractItemView.NoEditTriggers)
        self.setIndentation(self.__tree_view_indentation)
        self.setSelectionMode(QAbstractItemView.ExtendedSelection)

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

        self.__set_default_ui_state()

        # Signals / Slots.
        self.model().modelReset.connect(self.__set_default_ui_state)
843933
protected function initDefaultButtons()
    {
        if (!isset($this->buttons['view'])) {
            $this->buttons['view'] = function ($url, $model, $key) {
                $options = ArrayHelper::merge([
                    'title' => Yii::t('yii', 'View'),
                    'aria-label' => Yii::t('yii', 'View'),
                ], $this->buttonOptions);
                return Html::a(Icon::widget([
                    'name' => 'visibility',
                ]), $url, $options);
            };
        }
        if (!isset($this->buttons['update'])) {
            $this->buttons['update'] = function ($url, $model, $key) {
                $options = ArrayHelper::merge([
                    'title' => Yii::t('yii', 'Update'),
                    'aria-label' => Yii::t('yii', 'Update'),
                ], $this->buttonOptions);
                return Html::a(Icon::widget([
                    'name' => 'edit',
                ]), $url, $options);
            };
        }
        if (!isset($this->buttons['delete'])) {
            $this->buttons['delete'] = function ($url, $model, $key) {
                $options = ArrayHelper::merge([
                    'title' => Yii::t('yii', 'Delete'),
                    'aria-label' => Yii::t('yii', 'Delete'),
                    'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
                    'data-method' => 'post',
                ], $this->buttonOptions);
                return Html::a(Icon::widget([
                    'name' => 'delete',
                ]), $url, $options);
            };
        }
    }
91463
private void initialize() {
        this.setContentPane(getJPanel());
        this.setVisible(false);
        this.setTitle(Constant.messages.getString("history.filter.title"));
        if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
        	this.setSize(600, 300);
        }
        centreDialog();
        this.getRootPane().setDefaultButton(btnApply);
        this.pack();
	}
863260
public function init()
    {
        $this->assets = array(
            'js' => YII_DEBUG ? 'foundation/foundation.reveal.js' : 'foundation.min.js'
        );

        Html::addCssClass($this->htmlOptions, Enum::DIALOG);
        $this->setId(ArrayHelper::removeValue($this->htmlOptions, 'id', $this->getId()));
        $this->registerClientScript();
        parent::init();

        $this->htmlOptions['id'] = $this->getId();

        echo $this->renderToggleButton() . "\n";
        echo \CHtml::openTag('div', $this->htmlOptions) . "\n";
        echo $this->renderHeader() . "\n";
    }
94255
private function initialize(): void
    {
        if (!$this->isBootstrapLayout()) {
            return;
        }

        switch ($this->layout->cols) {
            case '2cll':
                $this->leftClass = $this->layout->bs_leftClass;
                $this->mainClass = $this->layout->bs_mainClass;
                break;

            case '2clr':
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            case '3cl':
                $this->leftClass  = $this->layout->bs_leftClass;
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            default:
                $this->useGrid = false;

                return;
        }

        $this->useGrid = true;
    }
532285
private void initClearButton() {
        if (mClearButtonEnabled) {
            final Drawable[] drawables = getCompoundDrawables();
            mTappableDrawable = ((drawables != null && drawables[2] != null)
                    ? drawables[2]
                    : getContext().getResources().getDrawable(mClearButtonResId));
            if (mTappableDrawable != null) {
                mTappableDrawable.setBounds(0,
                        0,
                        mTappableDrawable.getIntrinsicWidth(),
                        mTappableDrawable.getIntrinsicHeight());
                setOnClearClickListener(new DefaultClearButtonClickListener(this));
            }
        }
    }
63761
void initButtons() {

        m_okButton = new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0));
        m_okButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                onClickOk();
            }
        });
        addButton(m_okButton);
        m_cancelButton = new Button(
            CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CANCEL_0));
        m_cancelButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            @SuppressWarnings("synthetic-access")
            public void buttonClick(ClickEvent event) {

                m_context.finish(new ArrayList<CmsUUID>());
            }
        });

        addButton(m_cancelButton);
    }
438082
private void initializeFloatingActionButton() {
        floatingActionButton = findViewById(R.id.floating_action_button);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            floatingActionButton.show();
            floatingActionButton.setOnClickListener(createFloatingActionButtonListener());
        } else {
            floatingActionButton.hide();
        }
    }
1138437
@PostConstruct
    public void init() {
        root.getChildren().remove(dialog);

        centerButton.setOnAction(action -> {
            dialog.setTransitionType(DialogTransition.CENTER);
            dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
        });

        topButton.setOnAction(action -> {
            dialog.setTransitionType(DialogTransition.TOP);
            dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
        });

        rightButton.setOnAction(action -> {
            dialog.setTransitionType(DialogTransition.RIGHT);
            dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
        });

        bottomButton.setOnAction(action -> {
            dialog.setTransitionType(DialogTransition.BOTTOM);
            dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
        });

        leftButton.setOnAction(action -> {
            dialog.setTransitionType(DialogTransition.LEFT);
            dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
        });

        acceptButton.setOnAction(action -> dialog.close());

        alertButton.setOnAction(action -> {
            JFXAlert alert = new JFXAlert((Stage) alertButton.getScene().getWindow());
            alert.initModality(Modality.APPLICATION_MODAL);
            alert.setOverlayClose(false);
            JFXDialogLayout layout = new JFXDialogLayout();
            layout.setHeading(new Label("Modal Dialog using JFXAlert"));
            layout.setBody(new Label("Lorem ipsum dolor sit amet, consectetur adipiscing elit,"
                                     + " sed do eiusmod tempor incididunt ut labore et dolore magna"
                                     + " aliqua. Utenim ad minim veniam, quis nostrud exercitation"
                                     + " ullamco laboris nisi ut aliquip ex ea commodo consequat."));
            JFXButton closeButton = new JFXButton("ACCEPT");
            closeButton.getStyleClass().add("dialog-accept");
            closeButton.setOnAction(event -> alert.hideWithAnimation());
            layout.setActions(closeButton);
            alert.setContent(layout);
            alert.show();
        });
    }
168972
public void initialise() {
        mSelectedPosition = DEFAULT_SELECTED_POSITION;
        mBottomNavigationTabs.clear();

        if (!mBottomNavigationItems.isEmpty()) {
            mTabContainer.removeAllViews();
            if (mMode == MODE_DEFAULT) {
                if (mBottomNavigationItems.size() <= MIN_SIZE) {
                    mMode = MODE_FIXED;
                } else {
                    mMode = MODE_SHIFTING;
                }
            }
            if (mBackgroundStyle == BACKGROUND_STYLE_DEFAULT) {
                if (mMode == MODE_FIXED) {
                    mBackgroundStyle = BACKGROUND_STYLE_STATIC;
                } else {
                    mBackgroundStyle = BACKGROUND_STYLE_RIPPLE;
                }
            }

            if (mBackgroundStyle == BACKGROUND_STYLE_STATIC) {
                mBackgroundOverlay.setVisibility(View.GONE);
                mContainer.setBackgroundColor(mBackgroundColor);
            }

            int screenWidth = Utils.getScreenWidth(getContext());

            if (mMode == MODE_FIXED || mMode == MODE_FIXED_NO_TITLE) {

                int[] widths = BottomNavigationHelper.getMeasurementsForFixedMode(getContext(), screenWidth, mBottomNavigationItems.size(), mScrollable);
                int itemWidth = widths[0];

                for (BottomNavigationItem currentItem : mBottomNavigationItems) {
                    FixedBottomNavigationTab bottomNavigationTab = new FixedBottomNavigationTab(getContext());
                    setUpTab(mMode == MODE_FIXED_NO_TITLE, bottomNavigationTab, currentItem, itemWidth, itemWidth);
                }

            } else if (mMode == MODE_SHIFTING || mMode == MODE_SHIFTING_NO_TITLE) {

                int[] widths = BottomNavigationHelper.getMeasurementsForShiftingMode(getContext(), screenWidth, mBottomNavigationItems.size(), mScrollable);

                int itemWidth = widths[0];
                int itemActiveWidth = widths[1];

                for (BottomNavigationItem currentItem : mBottomNavigationItems) {
                    ShiftingBottomNavigationTab bottomNavigationTab = new ShiftingBottomNavigationTab(getContext());
                    setUpTab(mMode == MODE_SHIFTING_NO_TITLE, bottomNavigationTab, currentItem, itemWidth, itemActiveWidth);
                }
            }

            if (mBottomNavigationTabs.size() > mFirstSelectedPosition) {
                selectTabInternal(mFirstSelectedPosition, true, false, false);
            } else if (!mBottomNavigationTabs.isEmpty()) {
                selectTabInternal(0, true, false, false);
            }
        }
    }
1272951
public function init()
	{
		parent::init();

		if($this->buttonType=='buttonset')
		{
			if(!isset($this->htmlOptions['id']))
				$this->htmlOptions['id']=$this->getId();

			echo CHtml::openTag($this->htmlTag,$this->htmlOptions);
		}
	}
480119
private function init()
    {
        $this->set($this->getConfig('default', ''));
        $this->setSiteName($this->getConfig('site-name', ''));
        $this->setSeparator($this->getConfig('separator', '-'));
        $this->switchPosition($this->getConfig('first', true));
        $this->setMax($this->getConfig('max', 55));
    }
49930
static void initDefaultHandlers() {
		if (config != null && config.getDefaultHandlers() != null) {
			defaultHandlers = getHandlersFromExecList(config.getDefaultHandlers());
			handlerListById.put("defaultHandlers", defaultHandlers);
		}
	}
1291726
private void initSelectButtons() {

        m_selectGroup = new CmsTriStateCheckBox("");
        m_selectGroup.addStyleName(I_CmsInputLayoutBundle.INSTANCE.inputCss().inlineBlock());
        m_selectGroup.setNextStateAfterIntermediateState(State.on);
        m_selectGroup.addValueChangeHandler(new ValueChangeHandler<CmsTriStateCheckBox.State>() {

            public void onValueChange(ValueChangeEvent<State> event) {

                State state = event.getValue();
                if (state == State.on) {
                    m_model.signalGroup(Signal.publish, m_groupIndex);
                } else if (state == State.off) {
                    m_model.signalGroup(Signal.unpublish, m_groupIndex);
                }
            }

        });
        m_header.add(m_selectGroup);
    }
33030
function() {
			if (this.$buttonContainer && Array.isArray(this.buttons)) {
				var self = this;
				this.buttons.forEach(function(buttonDefinition) {
					var button = uiUtil.createButton(buttonDefinition.text, buttonDefinition.callback);
					if (buttonDefinition.id) {
						button.id = buttonDefinition.id;
						self['$'+ button.id] = button; //$NON-NLS-0$					
					}
					if (buttonDefinition.isDefault) {
						self._defaultCallback = buttonDefinition.callback;
						self._defaultButton = button;
						button.classList.add("primaryButton"); //$NON-NLS-0$
					}
					self.$buttonContainer.appendChild(button);
				});
			}
		}
47293
private void initButtonPanel() {

        if ((m_buttonPanel == null) && m_isFrame) {
            m_buttonPanel = new FlowPanel();
            m_buttonPanel.addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupButtonPanel());
            m_main.add(m_buttonPanel);
        }
    }