Initializes the default button rendering callbacks.
345259
protected function initDefaultButtons()
    {
        $buttons = [
            'view' => [
                'title' => Yii::t('yii', 'View'),
                'aria-label' => Yii::t('yii', 'View'),
                'data-pjax' => '0',
                'icon' => 'eye-open',
            ],
            'update' => [
                'title' => Yii::t('yii', 'Update'),
                'aria-label' => Yii::t('yii', 'Update'),
                'data-pjax' => '0',
                'icon' => 'pencil'
            ],
            'delete' => [
                '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',
                'data-pjax' => '0',
                'icon' => 'trash'
            ]
        ];
        foreach ($buttons as $name => $button) {
            $this->buttons[$name] = array_merge($button, $this->buttonOptions, $this->buttons[$name]);
        }
    }
1318773
public function initialize()
    {
        /**
         * Attaches event fired before view render
         * It allows to use $this->view->partial inside of action method before action view is being rendered
         */
        $this->eventsManager->attach('view:beforeRenderView', function($event, $view, $engineViewPath) {
            if ($view instanceof View) {
                $view->setControllerViewPath($this->router->getControllerName());
            }
        });
    }
298818
function init() {
    var i, j;

    // Make collapse buttons clickable
    var buttons = document.querySelectorAll('.collapse-button');
    for (i = 0; i < buttons.length; i++) {
        buttons[i].onclick = toggleCollapseButton;

        // Show by default? Then toggle now.
        if (buttons[i].className.indexOf('show') !== -1) {
            toggleCollapseButton({target: buttons[i].children[0]});
        }
    }

    var responseCodes = document.querySelectorAll('.example-names');
    for (i = 0; i < responseCodes.length; i++) {
        var tabButtons = childrenByClass(responseCodes[i], 'tab-button');
        for (j = 0; j < tabButtons.length; j++) {
            tabButtons[j].onclick = toggleTabButton;

            // Show by default?
            if (j === 0) {
                toggleTabButton({target: tabButtons[j]});
            }
        }
    }

    // Make nav items clickable to collapse/expand their content.
    var navItems = document.querySelectorAll('nav .resource-group .heading');
    for (i = 0; i < navItems.length; i++) {
        navItems[i].onclick = toggleCollapseNav;

        // Show all by default
        toggleCollapseNav({target: navItems[i].children[0]});
    }
}
389152
public function createDefaultButtons()
	{
		$this->setButtonOneLeft(new DualListButton("&#60;--", DualListButtonType::Button));
		$this->setButtonAllLeft(new DualListButton("&#60;&#60;&#60;", DualListButtonType::Button));
		$this->setButtonOneRight(new DualListButton("--&#62;", DualListButtonType::Button));
		$this->setButtonAllRight(new DualListButton("&#62;&#62;&#62;", DualListButtonType::Button));
	}
93363
void initUI(){
        mLogo = ButterKnife.findById(this, R.id.logo);
        mEulaText = ButterKnife.findById(this, R.id.eula_text);
        mActionCancel = ButterKnife.findById(this, R.id.action_cancel);
        mActionAccept = ButterKnife.findById(this, R.id.action_accept);

        mActionCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                supportFinishAfterTransition();
            }
        });

        mActionAccept.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // do something
            }
        });
    }
1261030
protected void init() {
        setSizeFull();
        setImmediate(true);
        setId(getGridId());
        if (!hasSingleSelectionSupport()) {
            setSelectionMode(SelectionMode.NONE);
        }
        setColumnReorderingAllowed(true);
        addNewContainerDS();
        if (doSubscribeToEventBus()) {
            eventBus.subscribe(this);
        }
    }
100495
protected function initDefaultButtons()
	{
		if($this->viewButtonLabel===null)
			$this->viewButtonLabel=Yii::t('zii','View');
		if($this->updateButtonLabel===null)
			$this->updateButtonLabel=Yii::t('zii','Update');
		if($this->deleteButtonLabel===null)
			$this->deleteButtonLabel=Yii::t('zii','Delete');
		if($this->viewButtonImageUrl===null)
			$this->viewButtonImageUrl=$this->grid->baseScriptUrl.'/view.png';
		if($this->updateButtonImageUrl===null)
			$this->updateButtonImageUrl=$this->grid->baseScriptUrl.'/update.png';
		if($this->deleteButtonImageUrl===null)
			$this->deleteButtonImageUrl=$this->grid->baseScriptUrl.'/delete.png';
		if($this->deleteConfirmation===null)
			$this->deleteConfirmation=Yii::t('zii','Are you sure you want to delete this item?');

		foreach(array('view','update','delete') as $id)
		{
			$button=array(
				'label'=>$this->{$id.'ButtonLabel'},
				'url'=>$this->{$id.'ButtonUrl'},
				'imageUrl'=>$this->{$id.'ButtonImageUrl'},
				'options'=>$this->{$id.'ButtonOptions'},
			);
			if(isset($this->buttons[$id]))
				$this->buttons[$id]=array_merge($button,$this->buttons[$id]);
			else
				$this->buttons[$id]=$button;
		}

		if(!isset($this->buttons['delete']['click']))
		{
			if(is_string($this->deleteConfirmation))
				$confirmation="if(!confirm(".CJavaScript::encode($this->deleteConfirmation).")) return false;";
			else
				$confirmation='';

			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->afterDelete===null)
				$this->afterDelete='function(){}';

			$this->buttons['delete']['click']=<<<EOD
function() {
	$confirmation
	var th = this,
		afterDelete = $this->afterDelete;
	jQuery('#{$this->grid->id}').yiiGridView('update', {
		type: 'POST',
		url: jQuery(this).attr('href'),$csrf
		success: function(data) {
			jQuery('#{$this->grid->id}').yiiGridView('update');
			afterDelete(th, true, data);
		},
		error: function(XHR) {
			return afterDelete(th, false, XHR);
		}
	});
	return false;
}
EOD;
		}
	}
81319
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        if (isset($this->size)) {
            TbArray::defaultValue('size', $this->size, $this->htmlOptions);
        }
    }
1208729
protected function initDefaultButtons()
    {
        $this->initDefaultButton('view', 'eye-open', ($this->useModal ? ['data-toggle'=>'modal','data-target'=>'#codeup-basemodal', 'data-modal-type'=>'view'] : []));
        $this->initDefaultButton('update', 'pencil', ($this->useModal ? ['data-toggle'=>'modal','data-target'=>'#codeup-basemodal', 'data-modal-type'=>'update'] : []));
        $this->initDefaultButton('delete', 'trash', [
            'data-confirm' => Cii::t('yii', 'Are you sure you want to delete this item?'),
            'data-method' => 'post',
            'data-modal-type'=>'delete'
        ]);
    }
1316505
protected void init() {
        if (defaults) {
            initializeDefaults();
            return;
        }
        mapfx(cfgMap, new MapFunction<String, String>() {
            @Override
            public void apply(String name, String value) {
                processSetting(name, value);
            }
        });
        readComplete();
    }
377844
public function init()
    {
        // setting current view class name
        $this->_sThisAction = strtolower(get_class($this));

        if (!$this->_blIsComponent) {
            // assume that cached components does not affect this method ...
            $this->addGlobalParams();
        }
    }
699218
public function init()
    {
        parent::init();
        if ($this->buttonCollapse) {
            Html::addCssClass($this->buttonCollapseOptions, 'button-collapse');
            $this->buttonCollapseOptions['id'] = $this->id . '-button-collapse';
            $this->buttonCollapseOptions['data-activates'] = $this->id;
            echo Html::a($this->buttonCollapseLabel, '#', $this->buttonCollapseOptions);
        }
        if ($this->route === null && Yii::$app->controller !== null) {
            $this->route = Yii::$app->controller->getRoute();
        }
        if ($this->params === null) {
            $this->params = Yii::$app->request->getQueryParams();
        }
        Html::addCssClass($this->options, 'nav');
    }
1164832
public function init()
    {
        parent::init();
        if(empty($this->defaults)) $this->defaults = array();
        //copy mode from first level config to defaults (for compability)
        if(empty($this->defaults['mode'])) $this->defaults['mode'] = $this->mode;
        $defaults = CJavaScript::encode($this->defaults);
        Yii::app()->getClientScript()->registerScript(
           'editable-defaults', 'if($.fn.editable) $.extend($.fn.editable.defaults, '.$defaults.');'
        );
    }
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();
        });
    }
127283
private void initButtons()
	{
		JButton selectAll = new JButton("Select all");
		selectAll.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent arg0)
			{
				for (int i = 0; i < 22; i++) {
					namespaces.getModel().setValueAt(new Boolean(true), i, 1);
				}

			}
		});
		selectAll.setBounds(380, 10, 120, 25);
		this.add(selectAll);

		JButton unselectAll = new JButton("Unselect all");

		unselectAll.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent e)
			{
				for (int i = 0; i < 22; i++) {
					namespaces.getModel().setValueAt(new Boolean(false), i, 1);
				}

			}
		});

		unselectAll.setBounds(380, 40, 120, 25);
		this.add(unselectAll);
	}
1259852
protected function initDefaultButtons() {
		
		parent::initDefaultButtons();

		if ($this->viewButtonContext !== false && !isset($this->buttons['view']['context'])) {
			$this->buttons['view']['context'] = $this->viewButtonContext;
		}
		if ($this->updateButtonContext !== false && !isset($this->buttons['update']['context'])) {
			$this->buttons['update']['context'] = $this->updateButtonContext;
		}
		if ($this->deleteButtonContext !== false && !isset($this->buttons['delete']['context'])) {
			$this->buttons['delete']['context'] = $this->deleteButtonContext;
		}
	}
49930
static void initDefaultHandlers() {
		if (config != null && config.getDefaultHandlers() != null) {
			defaultHandlers = getHandlersFromExecList(config.getDefaultHandlers());
			handlerListById.put("defaultHandlers", defaultHandlers);
		}
	}