Add button(s) to the toolbar.
972238
public void addToolbarButtons(ToolScreen toolScreen)
    {
        BaseApplication application = (BaseApplication)this.getTask().getApplication();
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, application.getResources(ResourceConstants.PRODUCT_RESOURCE, true).getString(MessageInfo.PROCESS_DETAIL_SCREEN), MenuConstants.GRID, MessageInfo.PROCESS_DETAIL_SCREEN, null);
        super.addToolbarButtons(toolScreen);
    }
327118
def addButton(self, button, alignment=None):
        
        if alignment == None:
            if button.pos().x() < self.pos().x():
                alignment = Qt.AlignLeft
            else:
                alignment = Qt.AlignRight
        
        all_buttons = self.buttons()
        if button in all_buttons:
            return False
        
        # move the button to this edit
        button.setParent(self)
        button.setAutoRaise(True)
        button.setIconSize(self.iconSize())
        button.setCursor(Qt.ArrowCursor)
        button.setFixedSize(QSize(self.height() - 2, self.height() - 2))
        
        self._buttons.setdefault(alignment, [])
        self._buttons[alignment].append(button)
        self.adjustButtons()
        return True
85536
def adjustButtons( self ):
        
        tabbar = self.tabBar()
        tabbar.adjustSize()
        
        w = self.width() - self._optionsButton.width() - 2
        self._optionsButton.move(w, 0)
        
        if self.count():
            need_update = self._addButton.property('alone') != False
            if need_update:
                self._addButton.setProperty('alone', False)
                
            
            self._addButton.move(tabbar.width(), 1)
            self._addButton.setFixedHeight(tabbar.height())
        else:
            need_update = self._addButton.property('alone') != True
            if need_update:
                self._addButton.setProperty('alone', True)
            
            self._addButton.move(tabbar.width() + 2, 1)
        
        self._addButton.stackUnder(self.currentWidget())
        
        # force refresh on the stylesheet (Qt limitation for updates)
        if need_update:
            app = QApplication.instance()
            app.setStyleSheet(app.styleSheet())
1278062
public void addActionButton(final ToolbarAction action) {
		final IButton button = new IButton();
		button.setWidth(buttonSize);
		button.setHeight(buttonSize);
		button.setIconSize(buttonSize - WidgetLayout.toolbarStripHeight);
		button.setIcon(action.getIcon());
		button.setActionType(SelectionType.BUTTON);
		button.addClickHandler(action);
		button.setShowRollOver(false);
		button.setShowFocused(false);
		button.setTooltip(action.getTooltip());
		button.setDisabled(action.isDisabled());

		if (getMembers() != null && getMembers().length > 0) {
			LayoutSpacer spacer = new LayoutSpacer();
			spacer.setWidth(2);
			super.addMember(spacer);
		}
		action.addToolbarActionHandler(new ToolbarActionHandler() {

			public void onToolbarActionDisabled(ToolbarActionDisabledEvent event) {
				button.setDisabled(true);
			}

			public void onToolbarActionEnabled(ToolbarActionEnabledEvent event) {
				button.setDisabled(false);
			}
		});
		super.addMember(button);
	}
46369
def setup_button_connectors(self):
        """"""
        self.help_button.clicked.connect(self.show_help)
        self.run_button.clicked.connect(self.accept)
        self.about_button.clicked.connect(self.about)
        self.print_button.clicked.connect(self.show_print_dialog)
        self.hazard_layer_combo.currentIndexChanged.connect(
            self.index_changed_hazard_layer_combo)
        self.exposure_layer_combo.currentIndexChanged.connect(
            self.index_changed_exposure_layer_combo)
        self.aggregation_layer_combo.currentIndexChanged.connect(
            self.index_changed_aggregation_layer_combo)
568202
def add_widget(self, widget):
        
        if self._buttons.get(widget):
            return
        btn = self.create_button(widget)
        cb = partial(self.focus_widget, w=widget)
        btn.clicked.connect(cb)
        self.layout().addWidget(btn)
        self._buttons[widget] = btn
357065
private void enableButtons() {
		final int itemCount = this.list.getTable().getItemCount();
		final boolean hasElement = itemCount > 0;
		IStructuredSelection selection;
		if (hasElement) {
			selection = this.list.getStructuredSelection();
			final int selectionCount = selection.size();
			if (selectionCount <= 0 || selectionCount > itemCount) {
				selection = null;
			}
		} else {
			selection = null;
		}
		this.removeButton.setEnabled(selection != null);
		this.clearButton.setEnabled(hasElement);
		if (this.isSortedElements) {
			final Object firstElement = selection != null ? this.list.getTable().getItem(0).getData() : null;
			final Object lastElement = selection != null ? this.list.getTable().getItem(this.list.getTable().getItemCount() - 1).getData() : null;
			final boolean isNotFirst = firstElement != null && selection != null && firstElement != selection.getFirstElement();
			final boolean isNotLast = lastElement != null && selection != null && lastElement != selection.getFirstElement();
			this.moveTopButton.setEnabled(isNotFirst);
			this.moveUpButton.setEnabled(isNotFirst);
			this.moveDownButton.setEnabled(isNotLast);
			this.moveBottomButton.setEnabled(isNotLast);
		}
	}
91965
function( buttonName, buttonLabel, commandName, commandExec )
			{
				editor.addCommand( commandName, new CKEDITOR.command( editor, { exec : commandExec }) );

				editor.ui.addButton( buttonName,
					{
						label : buttonLabel,
						command : commandName
					});
			}
1148494
def add_toolbars_to_menu(self, menu_title, actions):
        """"""
        # Six is the position of the view menu in menus list
        # that you can find in plugins/editor.py setup_other_windows.
        view_menu = self.menus[6]
        if actions == self.toolbars and view_menu:
            toolbars = []
            for toolbar in self.toolbars:
                action = toolbar.toggleViewAction()
                toolbars.append(action)
            add_actions(view_menu, toolbars)
666577
def load_toolbars(self):
        """"""
        toolbars_names = CONF.get('main', 'last_visible_toolbars', default=[])
        if toolbars_names:
            dic = {}
            for toolbar in self.toolbars:
                dic[toolbar.objectName()] = toolbar
                toolbar.toggleViewAction().setChecked(False)
                toolbar.setVisible(False)
            for name in toolbars_names:
                if name in dic:
                    dic[name].toggleViewAction().setChecked(True)
                    dic[name].setVisible(True)
841427
protected void updateButtons() {

        List<Button> buttons = ((A_CmsModuleImportForm)m_tabs.getSelectedTab()).getButtons();
        m_buttons.removeAllComponents();
        for (Button button : buttons) {
            m_buttons.addComponent(button);
        }
    }
1041360
def add_tools(self, *tools):
        ''' 

        '''
        for tool in tools:
            if not isinstance(tool, Tool):
                raise ValueError("All arguments to add_tool must be Tool subclasses.")

            self.toolbar.tools.append(tool)
465318
def addButton(self, button, role=QDialogButtonBox.ActionRole):
        
        return self._buttonBox.addButton(button, role)
1104884
def update_all_buttons(self, ):
        
        for widget, button in self._buttons.items():
            self.update_button(button, widget)
        self.adjustSize()
1084966
def setup_options_button(self):
        """"""
        if not self.options_button:
            self.options_button = create_toolbutton(
                self, text=_('Options'), icon=ima.icon('tooloptions'))

            actions = self.actions + [MENU_SEPARATOR] + self.plugin_actions
            self.options_menu = QMenu(self)
            add_actions(self.options_menu, actions)
            self.options_button.setMenu(self.options_menu)

        if self.tools_layout.itemAt(self.tools_layout.count() - 1) is None:
            self.tools_layout.insertWidget(
                self.tools_layout.count() - 1, self.options_button)
        else:
            self.tools_layout.addWidget(self.options_button)
204293
private void addChannelButton() {

        Button button = CmsToolBar.createButton(
            FontOpenCms.LOG,
            CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGSETTINGS_TOOL_NAME_0));
        button.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                openSubView(PATH_LOGCHANNEL, true);
            }
        });
        m_uiContext.addToolbarButton(button);

    }
1363328
public ToolScreen addToolbars()
    {
        ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.SUBMIT);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.RESET);
        String strDesc = "Create account";
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, null, strDesc, MenuConstants.FORM, MenuConstants.FORM, MenuConstants.FORM + "Tip");
        return screen;
    }