Adds a button to this {@link ComboButton}. Beware that this method does
change the styling (colors, borders etc.) of the button to make it fit
the {@link ComboButton}.

@param button
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);
    }
617259
public void addButtonToFront(Widget w) {

        m_buttonPanel.insert(w, 0);
        if (CmsCoreProvider.get().isIe7()) {
            m_buttonPanel.getElement().getStyle().setWidth(m_buttonPanel.getWidgetCount() * 22, Unit.PX);
        }
    }
470893
protected void onButtonAttached(AbstractButton button) {
		if (logger.isDebugEnabled()) {
			logger.debug("Configuring newly attached button for command '" + getId() + "' enabled=" + isEnabled()
					+ ", visible=" + isVisible());
		}
		button.setEnabled(isEnabled());
		button.setVisible(isVisible());
	}
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);
	}
440766
public void removeButton(Widget button) {

        m_buttonPanel.remove(button);
        if (m_buttonPanel.getWidgetCount() == 0) {
            m_buttonPanel.setStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().hideButtonPanel());
        }
    }
373550
@SuppressWarnings({ "unchecked", "rawtypes" })
	private JPanel createButtonsPanel() {
		final JComboBox requestComboBox = new JComboBox(
				databaseInformations.getRequestNames().toArray());
		requestComboBox.setFont(requestComboBox.getFont().deriveFont(Font.BOLD));
		requestComboBox.setSelectedIndex(databaseInformations.getSelectedRequestIndex());
		requestComboBox.setRenderer(new DefaultListCellRenderer() {
			private static final long serialVersionUID = 1L;

			@Override
			public Component getListCellRendererComponent(JList list, Object value, int index,
					boolean isSelected, boolean cellHasFocus) {
				final String requestKey = (String) value;
				final String label = getString(requestKey);
				return super.getListCellRendererComponent(list, label, index, isSelected,
						cellHasFocus);
			}
		});
		requestComboBox.addItemListener(new ItemListener() {
			@Override
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED) {
					final int requestIndex = requestComboBox.getSelectedIndex();
					try {
						refresh(requestIndex);
					} catch (final IOException ex) {
						showException(ex);
					}
				}
			}
		});

		final MButton refreshButton = createRefreshButton();
		refreshButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				try {
					refresh(getDatabaseInformations().getSelectedRequestIndex());
				} catch (final IOException ex) {
					showException(ex);
				}
			}
		});
		final MButton pdfButton = createPdfButton();
		pdfButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				try {
					actionPdf();
				} catch (final IOException ex) {
					showException(ex);
				}
			}
		});
		final MButton xmlJsonButton = createXmlJsonButton(databaseInformations);

		return Utilities.createButtonsPanel(requestComboBox, new JLabel("             "),
				refreshButton, pdfButton, xmlJsonButton);
	}
1071022
public void setDefaultButton(SBaseButton button)
    {
        this.getScreenFieldView().setDefaultButton(button == null ? null : button.getScreenFieldView());
    }
1063414
public JButton addButton(String strLink, String strIcon)
    {
        return this.addButton(strLink, strIcon, strIcon);
    }
406979
private void addButtons() {
		// Validation Button
		WButton buttonValidate = new WButton("Validate and Update Bean");
		add(buttonValidate);
		buttonValidate.setAction(new ValidatingAction(messages.getValidationErrors(), layout) {
			@Override
			public void executeOnValid(final ActionEvent event) {
				WebUtilities.updateBeanValue(layout);
				messages.success("OK");
			}
		});

		// Update Bean
		WButton buttonUpdate = new WButton("Update Bean");
		add(buttonUpdate);
		buttonUpdate.setAction(new Action() {

			@Override
			public void execute(final ActionEvent event) {
				WebUtilities.updateBeanValue(layout);
			}
		});

		// Reset Inputs
		WButton buttonReset = new WButton("Reset Inputs");
		add(buttonReset);
		buttonReset.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				layout.reset();
			}
		});

		// Reset Bean
		WButton buttonBean = new WButton("Reset Bean");
		add(buttonBean);
		buttonBean.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				InputBeanBindingExample.this.setBean(new MyDemoBean());
			}
		});

		add(new WButton("submit"));
	}
273460
public final void addButton(String label, String className, SimpleCallback callback) {
        addButton(BUTTON_PREFIX + BUTTON_INDEX++, label, className,
            callback != null ? callback : SimpleCallback.DEFAULT_SIMPLE_CALLBACK);
    }
259828
public boolean onButtonPress(MouseButton button)
	{
		if (!isEnabled())
			return false;

		return parent != null ? parent.onButtonPress(button) : false;
	}
80690
public function addButton($button)
    {
        $buttons = $this->buttons;

        // If buttons isn't an array, set it
        if (!is_array($buttons)) {
            $buttons = array();
        }

        $buttons[] = $button;

        $this->buttons = $buttons;

        return $this;
    }
1280427
public static void setButtonDimensionHint(Button button) {
		Assert.isNotNull(button);
		Object gd= button.getLayoutData();
		if (gd instanceof GridData) {
			((GridData)gd).widthHint= getButtonWidthHint(button);
			((GridData)gd).horizontalAlignment = GridData.FILL;
		}
	}
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);

    }
969272
@Override
	public void setStyleName(String styleName) {
		super.setStyleName(styleName);
		memberLayout.setStyleName(styleName + "Body");
		titleLabel.setStyleName(styleName + "Title");
		buttonBaseStyle = styleName.substring(0, styleName.length() - 5) + "Button";
		for (RibbonColumn column : columns) {
			column.setButtonBaseStyle(buttonBaseStyle);
		}
	}
87343
public void addButton(Component button, boolean right) {

        if (right) {
            m_buttonPanelRight.addComponent(button);
        } else {
            m_buttonPanelLeft.addComponent(button);
            m_buttonPanelLeft.setVisible(true);
        }
    }
1039820
public function addButton(Button $button)
    {
        $this->list[] = $button;
        $this->listCount++;
        $this->ulList = false;
        return $this;
    }