Set's a list of dialog button

@param buttons
@return instance of the current component
17194
public Dialog setButtons(DialogButton... buttons)
	{
		if (buttons != null && buttons.length > 0)
		{
			ArrayItemOptions<DialogButton> buttons2 = new ArrayItemOptions<DialogButton>();
			for (DialogButton button : buttons)
			{
				if (button instanceof AjaxDialogButton)
				{
					((AjaxDialogButton) button).activateCallback(ajaxBehavior);
				}
				buttons2.add(button);
			}
			this.options.put("buttons", buttons2);
		}
		return this;
	}
907396
def setup_buttons(self):
        """"""
        self.fromcursor_btn = create_toolbutton(
            self, icon=ima.icon('fromcursor'), tip=_('Go to cursor position'),
            triggered=self.treewidget.go_to_cursor_position)

        buttons = [self.fromcursor_btn]
        for action in [self.treewidget.collapse_all_action,
                       self.treewidget.expand_all_action,
                       self.treewidget.restore_action,
                       self.treewidget.collapse_selection_action,
                       self.treewidget.expand_selection_action]:
            buttons.append(create_toolbutton(self))
            buttons[-1].setDefaultAction(action)
        return buttons
1071022
public void setDefaultButton(SBaseButton button)
    {
        this.getScreenFieldView().setDefaultButton(button == null ? null : button.getScreenFieldView());
    }
346930
public void addButton(final AbstractButton button) {
        WidgetUtils.setDefaultButtonStyle(button);
        final EmptyBorder baseBorder =
                new EmptyBorder(WidgetUtils.BORDER_WIDE_WIDTH - 1, 9, WidgetUtils.BORDER_WIDE_WIDTH - 1, 9);
        if (getComponentCount() == 0) {
            button.setBorder(baseBorder);
        } else {
            final Component lastComponent = getComponent(getComponentCount() - 1);
            if (lastComponent instanceof AbstractButton) {
                // previous component was also a button - add a line on the left
                // side
                final Border outsideBorder = new MatteBorder(0, 1, 0, 0, WidgetUtils.BG_COLOR_LESS_BRIGHT);
                button.setBorder(new CompoundBorder(outsideBorder, baseBorder));
            } else {
                button.setBorder(baseBorder);
            }
        }
        button.setOpaque(false);
        _buttons.add(button);

        add(button);
    }
399459
function (aButtons) {
			var iVisibleButtons = 0;
			for (var i = 0; i < aButtons.length; i++) {
				if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
					iVisibleButtons++;
				} else {
					aButtons[i].setVisible(false);
				}
			}

			return iVisibleButtons;
		}
471377
public List<CmsPushButton> getButtons() {

        List<CmsPushButton> result = new ArrayList<CmsPushButton>();
        result.add(m_backButton);
        result.add(m_cancelButton);
        m_actionButtons.clear();
        if (m_actions != null) {
            for (final CmsWorkflowAction action : m_actions) {
                CmsPushButton actionButton = new CmsPushButton();
                actionButton.setText(action.getLabel());
                actionButton.setUseMinWidth(true);
                actionButton.addClickHandler(new ClickHandler() {

                    public void onClick(ClickEvent event) {

                        executeAction(action);
                    }
                });
                m_actionButtons.add(actionButton);
            }
        }
        result.addAll(m_actionButtons);
        return result;
    }
721451
public void addButtons()
    {
        this.addButton(Constants.BACK);
        this.addButton(Constants.GRID);
        this.addButton(Constants.SUBMIT);
        this.addButton(Constants.RESET);
        this.addButton(Constants.DELETE);
        this.addButton(Constants.HELP);
    }
242034
public void updateButtons() {
		AbstractButton cancelButton = wizard.getCancelButton();
		if (cancelButton != null) {
			cancelButton.setEnabled(currentPage.isCancelAllowed());
		}
		AbstractButton previousButton = wizard.getPreviousButton();
		if (previousButton != null) {
			previousButton.setEnabled(currentPage.isPreviousAllowed() && !pageHistory.isEmpty());
		}
		AbstractButton nextButton = wizard.getNextButton();
		if (nextButton != null) {
			nextButton.setEnabled(currentPage.isNextAllowed() && (currentPage.getNextPage() != null));
		}
		AbstractButton finishButton = wizard.getFinishButton();
		if (finishButton != null) {
			finishButton.setEnabled(currentPage.isFinishAllowed());
		}
	}
291684
private void addButtons() {
        int y = DEFAULT_DIALOG_HEIGHT - 19;
        int x = DEFAULT_DIALOG_WIDTH - DEFAULT_SIDE_PANE_WIDTH - 70;

        previousButtonName = this.insertButton(new PreviousActionListener(), x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_PREV, ((short) PushButtonType.STANDARD_value));
        x += 50;
        nextButtonName = this.insertButton(new NextActionListener(), x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_NEXT, ((short) PushButtonType.STANDARD_value));
        x += 50;
        cancelButtonName = this.insertButton(this, x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_CANCEL, ((short) PushButtonType.CANCEL_value));
    }
1074382
public void reinitializeButtons() {

        if (isGroupcontainerEditing()) {
            m_groupEditor.reinitializeButtons();
        } else {
            List<CmsContainerPageElementPanel> elemWidgets = getAllContainerPageElements(true);

            for (CmsContainerPageElementPanel elemWidget : elemWidgets) {
                if (requiresOptionBar(elemWidget, elemWidget.getParentTarget())) {
                    getContainerpageUtil().addOptionBar(elemWidget);
                } else {
                    // otherwise remove any present option bar
                    elemWidget.setElementOptionBar(null);
                }
                elemWidget.showEditableListButtons();
            }
        }
    }
1016447
public void setActiveButton(I_CmsToolbarButton button) {

        m_activeButton = button;
        setEditButtonsVisible((button == null) || m_editor.getSelection().equals(button));
    }
322097
def refreshButtons(self):
        
        last = self._last
        first = self._first
        
        joiner = self._containerWidget.currentJoiner()
        
        # the first button set can contain the toggle options
        if first:
            self.uiJoinSBTN.setActionTexts(['AND', 'OR'])
        elif joiner == QueryCompound.Op.And:
            self.uiJoinSBTN.setActionTexts(['AND'])
        else:
            self.uiJoinSBTN.setActionTexts(['OR'])
        
        # the last option should not show an active action
        if last:
            self.uiJoinSBTN.setCurrentAction(None)
        
        # otherwise, highlight the proper action
        else:
            act = self.uiJoinSBTN.findAction(QueryCompound.Op[joiner].upper())
            self.uiJoinSBTN.setCurrentAction(act)
        
        enable = QueryCompound.typecheck(self._query) or self.isChecked()
        self.uiEnterBTN.setEnabled(enable)
783301
public JToggleButton getSelectedToggleButton() {
        for (final AbstractButton button : _buttons) {
            if (button instanceof JToggleButton) {
                if (button.isSelected()) {
                    return (JToggleButton) button;
                }
            }
        }
        return null;
    }
83406
function buildButtonList() {
		var buttons=[];
		// var i = 0;
/*
		buttons.push({
			id:id_prefix + 'markers_off',
			title:'Turn off all markers',
			type:'context',
			events: { 'click': setMarkerSet },
			panel: 'marker_panel'
		});
		buttons.push({
			id:id_prefix + 'markers_dimension',
			title:'Dimension',
			type:'context',
			events: { 'click': setMarkerSet },
			panel: 'marker_panel'
		});
		buttons.push({
			id:id_prefix + 'markers_label',
			title:'Label',
			type:'context',
			events: { 'click': setMarkerSet },
			panel: 'marker_panel'
		});
*/
		$.each(mtypes, function (k, pos) {
			var listname = pos + "_marker_list";
			var def = true;
			$.each(marker_types, function (id, v) {
				var title = getTitle('en', id);
				buttons.push({
					id: id_prefix + pos + '_' + id,
					svgicon: id,
					title: title,
					type: 'context',
					events: {'click': setArrowFromButton},
					panel: 'marker_panel',
					list: listname,
					isDefault: def
				});
				def = false;
			});
		});
		return buttons;
	}
1066338
def _set_buttons(self, chat, bot):
        
        if isinstance(self.reply_markup, (
                types.ReplyInlineMarkup, types.ReplyKeyboardMarkup)):
            self._buttons = [[
                MessageButton(self._client, button, chat, bot, self.id)
                for button in row.buttons
            ] for row in self.reply_markup.rows]
            self._buttons_flat = [x for row in self._buttons for x in row]
178448
private OnClickListener createListItemListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final DialogInterface dialog, final int which) {
                selectedIndex = which;
                ListPreference.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
                dialog.dismiss();
            }
        };
    }
1038582
private void initializeListDialog() {
        MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
        configureHeaderDialogBuilder(builder);
        configureButtonBarDialogBuilder(builder);
        builder.setItems(R.array.list_items, createSingleChoiceListener());
        listDialog = builder.create();
    }