Configures the given button with the properties held in this instance. Note that this
instance doesn't hold any keystroke accelerator information.

@param button The button to be configured.

@throws IllegalArgumentException if {@code button} is null.
435982
public void configureButton(AbstractButton button) {
        Assert.notNull(button);
        button.setText(this.text);
        button.setMnemonic(getMnemonic());
        button.setDisplayedMnemonicIndex(getMnemonicIndex());
    }
821901
private void init(){
        MAX_BUTTON_WIDTH = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 124f, getResources().getDisplayMetrics());
        MIN_BUTTON_WIDTH = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 88f, getResources().getDisplayMetrics());
    }
999893
@UiChild(tagname="backButton", limit=1)
    public void setBackButton(JQMButton button) {
        button.setBack(true);
        setLeftButton(button);
    }
853370
public void setBinding(javax.faces.component.UIComponent _binding) {
		getStateHelper().put(PropertyKeys.binding, _binding);
	}
957106
private void setNewButtonStyle(CmsPushButton newButton) {

        newButton.setImageClass(I_CmsButton.ADD_SMALL);
        newButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
    }
1342752
protected void initializeButton(final Button button, final Color foreground,
		final Color background)
	{
		button.setForeground(foreground);
		button.setBackground(background);
	}
1280387
public Dialog setButtons(ArrayItemOptions<DialogButton> buttons)
	{
		for (DialogButton button : buttons)
		{
			if (button instanceof AjaxDialogButton)
			{
				((AjaxDialogButton) button).activateCallback(ajaxBehavior);
			}
		}
		this.options.put("buttons", buttons);
		return this;
	}
175795
public void setParamTabExButtonStyle(String value) {

        try {
            m_userSettings.setExplorerButtonStyle(Integer.parseInt(value));
        } catch (Throwable t) {
            // should usually never happen
        }
    }
1190089
private static void addButton(JFrame frame, String s) {
        AnnotatedString as = new AnnotatedString(s);
        JButton button = new JButton(as.toString());
        button.setMnemonic(as.getMnemonic());
        button.setDisplayedMnemonicIndex(as.getMnemonicIndex());
        frame.getContentPane().add(button);

        System.out.println("\"" + s + "\" \"" + as + "\" '" + as.getMnemonic() + "' " + as.getMnemonicIndex());
    }
98259
public final synchronized void setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("null label to a button is not allowed");
        }
        if(label.isEmpty()) {
            label = " ";
        }
        this.label = label;
        invalidate();
    }
1373734
@UiChild(tagname="leftButton", limit=1)
    public void setLeftButton(JQMButton button) {
        if (left != null) remove(left);
        button.setPosOnBand(PosOnBand.LEFT);
        left = button;
        insert(left, 0);
    }
821404
private void defineButtons(UIDefaults d) {
        
        d.put("Button.contentMargins", new InsetsUIResource(6, 14, 6, 14));
        d.put("Button.defaultButtonFollowsFocus", Boolean.FALSE);
        
        d.put("buttonBorderBaseEnabled", new Color(0x709ad0));
        d.put("buttonBorderBasePressed", new Color(0x4879bf));

        d.put("buttonInteriorBaseEnabled", new Color(0xd5e8f7));
        d.put("buttonInteriorBasePressed", new Color(0x6d8fba));
        d.put("buttonInteriorBaseSelected", new Color(0x80a6d2));
        d.put("buttonInteriorBasePressedSelected", new Color(0x7497c2));

        d.put("texturedButtonBorderBaseEnabled", new Color(0x999999));

        d.put("texturedButtonInteriorBaseEnabled", new Color(0xf0f0f0));
        d.put("texturedButtonInteriorBasePressed", new Color(0x8eb3d2));
        d.put("texturedButtonInteriorBaseSelected", new Color(0x98c1e2));
        d.put("texturedButtonInteriorBasePressedSelected", new Color(0x7e9fba));

        d.put("buttonBulletBottomEnabled", Color.BLACK);

        d.put("buttonArrow", Color.BLACK);

        String p = "Button";
        String c = PAINTER_PREFIX + "ButtonPainter";

        // Initialize Button
        d.put(p + ".States", "Enabled,Pressed,Disabled,Focused,Default");
        d.put(p + "[Default+Pressed].textForeground", new ColorUIResource(Color.black));
        d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true));
        d.put(p + "[Default].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DEFAULT));
        d.put(p + "[Default+Focused].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DEFAULT_FOCUSED));
        d.put(p + "[Default+Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_DEFAULT));
        d.put(p + "[Default+Focused+Pressed].backgroundPainter",
              new LazyPainter(c,
                              ButtonPainter.Which.BACKGROUND_PRESSED_DEFAULT_FOCUSED));
        d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DISABLED));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_FOCUSED));
        d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED));
        d.put(p + "[Focused+Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED));

        // Initialize ToggleButton
        p = "ToggleButton";
        d.put(p + ".contentMargins", new InsetsUIResource(6, 14, 6, 14));
        d.put(p + ".States", "Enabled,Pressed,Disabled,Focused,Selected");
        d.put(p + "[Selected].textForeground", new ColorUIResource(Color.black));
        d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true));
        d.put(p + "[Default+Pressed].textForeground", new ColorUIResource(Color.black));
        d.put(p + "[Focused+Selected].textForeground", new ColorUIResource(Color.black));
        d.put(p + "[Disabled+Selected].textForeground", new ColorUIResource(new Color(0, 0, 0, 0x80)));
        d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DISABLED));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_FOCUSED));
        d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED));
        d.put(p + "[Focused+Pressed].backgroundPainter",
              new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED));
        d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_SELECTED));
        d.put(p + "[Focused+Selected].backgroundPainter",
              new LazyPainter(c, ButtonPainter.Which.BACKGROUND_SELECTED_FOCUSED));
        d.put(p + "[Pressed+Selected].backgroundPainter",
              new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_SELECTED));
        d.put(p + "[Focused+Pressed+Selected].backgroundPainter",
              new LazyPainter(c,
                              ButtonPainter.Which.BACKGROUND_PRESSED_SELECTED_FOCUSED));
        d.put(p + "[Disabled+Selected].backgroundPainter",
              new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DISABLED_SELECTED));

        // Initialize CheckBox
        p = "CheckBox";
        c = PAINTER_PREFIX + "CheckBoxPainter";
        d.put(p + ".States", "Enabled,Pressed,Disabled,Focused,Selected");
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true));
        d.put(p + "[Disabled].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_DISABLED));
        d.put(p + "[Enabled].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_ENABLED));
        d.put(p + "[Focused].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_FOCUSED));
        d.put(p + "[Pressed].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_PRESSED));
        d.put(p + "[Focused+Pressed].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_PRESSED_FOCUSED));
        d.put(p + "[Selected].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_SELECTED));
        d.put(p + "[Focused+Selected].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_SELECTED_FOCUSED));
        d.put(p + "[Pressed+Selected].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_PRESSED_SELECTED));
        d.put(p + "[Focused+Pressed+Selected].iconPainter",
              new LazyPainter(c, CheckBoxPainter.Which.ICON_PRESSED_SELECTED_FOCUSED));
        d.put(p + "[Disabled+Selected].iconPainter", new LazyPainter(c, CheckBoxPainter.Which.ICON_DISABLED_SELECTED));
        d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 18, 18));

        // Initialize RadioButton
        p = "RadioButton";
        c = PAINTER_PREFIX + "RadioButtonPainter";
        d.put(p + ".States", "Enabled,Pressed,Disabled,Focused,Selected");
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true));
        d.put(p + "[Disabled].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_DISABLED));
        d.put(p + "[Enabled].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_ENABLED));
        d.put(p + "[Focused].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_FOCUSED));
        d.put(p + "[Pressed].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_PRESSED));
        d.put(p + "[Focused+Pressed].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_PRESSED_FOCUSED));
        d.put(p + "[Selected].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_SELECTED));
        d.put(p + "[Focused+Selected].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_SELECTED_FOCUSED));
        d.put(p + "[Pressed+Selected].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_PRESSED_SELECTED));
        d.put(p + "[Focused+Pressed+Selected].iconPainter",
              new LazyPainter(c,
                              RadioButtonPainter.Which.ICON_PRESSED_SELECTED_FOCUSED));
        d.put(p + "[Disabled+Selected].iconPainter", new LazyPainter(c, RadioButtonPainter.Which.ICON_DISABLED_SELECTED));
        d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 18, 18));
    }
1369581
protected void configureAccelerator(AbstractButton button, KeyStroke keystrokeAccelerator) {
        if ((button instanceof JMenuItem) && !(button instanceof JMenu)) {
            ((JMenuItem)button).setAccelerator(keystrokeAccelerator);
        }
    }
634208
@Override
	public void setTitle(String title) {
		buttonAction.setTitle(title);
		titleLabel.setContents(prepareTitle());
	}
1220585
private JButton getButtonAddActivities() {
        if (btnAddActivities == null) {
            btnAddActivities = new JButton();
            btnAddActivities.setAction(addActivitiesAction);
        }
        return btnAddActivities;
    }
1327204
private void addNewPropertyButton(final CmsPropertyTable table) {

        Button add = CmsToolBar.createButton(
            FontOpenCms.WAND,
            CmsVaadinUtils.getMessageText(Messages.GUI_DATABASEAPP_PROPERTY_NEW_CAPTION_0));
        add.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                final Window window = CmsBasicDialog.prepareWindow();
                window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_DATABASEAPP_PROPERTY_NEW_CAPTION_0));
                window.setContent(new CmsAddPropertyDefinitionDialog(window, table));
                A_CmsUI.get().addWindow(window);
            }
        });
        m_uiContext.addToolbarButton(add);

    }
88178
public void setMenuButtonText(MenuButton button, String text) {
        switch (button) {
            case MID:
                mMidText.setText(text);
                break;
            case LEFT:
                mLeftText.setText(text);
                break;
            case RIGHT:
                mRightText.setText(text);
                break;
        }
    }