Creates and return an instance of JButton that can be used to collapse
the right component in the split pane.

@return a one-touch button
423942
protected JButton createRightOneTouchButton() {
        SeaGlassArrowButton b            = new SeaGlassArrowButton(SwingConstants.NORTH);
        int                 oneTouchSize = lookupOneTouchSize();

        b.setName("SplitPaneDivider.rightOneTouchButton");
        b.setMinimumSize(new Dimension(oneTouchSize, oneTouchSize));
        // Rossi: Change cursors on "one touch" buttons. Better would be an mouse over effect
        b.setCursor(Cursor.getPredefinedCursor(
            splitPane.getOrientation() == 
                JSplitPane.HORIZONTAL_SPLIT ? 
                        Cursor.E_RESIZE_CURSOR:Cursor.S_RESIZE_CURSOR));
        b.setFocusPainted(false);
        b.setBorderPainted(false);
        b.setRequestFocusEnabled(false);
        b.setDirection(mapDirection(false));

        return b;
    }
102592
private JButton getBtnDecline() {
		if (btnDecline == null) {
			btnDecline = new JButton();
			btnDecline.setText("Decline");
			btnDecline.addActionListener(new java.awt.event.ActionListener() {

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {
				    accepted = false;
				    System.exit(1);

				}
			});

		}
		return btnDecline;
	}
112584
private I_CmsUploadButtonHandler createButtonHandler() {

        I_CmsUploadButtonHandler buttonHandler = null;
        switch (getState().getUploadType()) {
            case singlefile:
                buttonHandler = new CmsSingleFileUploadHandler(
                    new ButtonContextSupplier(),
                    getState().getDialogTitle());
                ((CmsSingleFileUploadHandler)buttonHandler).setTargetFolderPath(getState().getTargetFolderRootPath());
                ((CmsSingleFileUploadHandler)buttonHandler).setTargetFileName(getState().getTargetFileName());
                ((CmsSingleFileUploadHandler)buttonHandler).setTargetFileNamePrefix(
                    getState().getTargetFileNamePrefix());
                break;
            case multifile:
            default:
                buttonHandler = new CmsDialogUploadButtonHandler(new ButtonContextSupplier());
                ((CmsDialogUploadButtonHandler)buttonHandler).setIsTargetRootPath(true);
                ((CmsDialogUploadButtonHandler)buttonHandler).setTargetFolder(getState().getTargetFolderRootPath());
                break;
        }
        return buttonHandler;
    }
1077983
protected Component newRemoveAllComponent() {
        return new PaletteButton("removeAllButton") {
            private static final long serialVersionUID = 1L;

            protected void onComponentTag(ComponentTag tag) {
                super.onComponentTag(tag);
                tag.getAttributes().put("onclick", getRemoveAllOnClickJS());
            }
        };
    }
863849
private void createButtonBar() {
		// Update and reset controls for the repeater.
		WPanel buttonPanel = new WPanel(WPanel.Type.FEATURE);
		buttonPanel.setMargin(new Margin(Size.MEDIUM, null , Size.LARGE, null));
		buttonPanel.setLayout(new BorderLayout());

		WButton updateButton = new WButton("Update");
		updateButton.setImage("/image/document-save-5.png");
		updateButton.setImagePosition(WButton.ImagePosition.EAST);
		buttonPanel.add(updateButton, BorderLayout.EAST);

		WButton resetButton = new WButton("Reset");
		resetButton.setImage("/image/edit-undo-8.png");
		resetButton.setImagePosition(WButton.ImagePosition.WEST);
		resetButton.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				repeater.setData(fetchDataList());
			}
		});
		buttonPanel.add(resetButton, BorderLayout.WEST);
		add(buttonPanel);
		add(new WAjaxControl(updateButton, repeater));
		add(new WAjaxControl(resetButton, repeater));
	}
866605
private OnClickListener createNeutralButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                Toast.makeText(getActivity(), R.string.neutral_button_toast, Toast.LENGTH_SHORT)
                        .show();
            }

        };
    }
1227049
private JButton getHelpButton() {
        if (btnHelp == null) {
            btnHelp = new JButton();
            btnHelp.setBorder(null);
            btnHelp.setIcon(new ImageIcon(AbstractParamContainerPanel.class.getResource("/resource/icon/16/201.png"))); // help icon
            btnHelp.addActionListener(getShowHelpAction());
            btnHelp.setToolTipText(Constant.messages.getString("menu.help"));
        }
        
        return btnHelp;
    }
488073
private JButton getBtnOK() {
		if (btnOK == null) {
			btnOK = new JButton();
			btnOK.setText(Constant.messages.getString("all.button.ok"));
			btnOK.addActionListener(new java.awt.event.ActionListener() { 

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {
				    try {
				    	Pattern.compile(getTxtPattern().getText());
				    } catch (Exception e1) {
				        // ZAP: i18n
				        view.showWarningDialog(Constant.messages.getString("filter.replacedialog.invalidpattern"));
				        getTxtPattern().grabFocus();
				        return;
				    }
				    getTxtPattern().discardAllEdits();
				    FilterReplaceDialog.this.dispose();
				    exitCode = JOptionPane.OK_OPTION;

				}
			});

		}
		return btnOK;
	}
200197
private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.add(getBtnFind());
			jPanel1.add(getBtnCancel());
		}
		return jPanel1;
	}
1164297
private OnClickListener createWizardButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final View v) {
                Intent intent = new Intent(MainActivity.this, WizardActivity.class);
                intent.putExtra(PreferenceActivity.EXTRA_SHOW_BUTTON_BAR, true);
                intent.putExtra(PreferenceActivity.EXTRA_BACK_BUTTON_TEXT, R.string.back);
                intent.putExtra(PreferenceActivity.EXTRA_NEXT_BUTTON_TEXT, R.string.next);
                intent.putExtra(PreferenceActivity.EXTRA_FINISH_BUTTON_TEXT, R.string.finish);
                intent.putExtra(PreferenceActivity.EXTRA_SHOW_PROGRESS, true);
                intent.putExtra(PreferenceActivity.EXTRA_PROGRESS_FORMAT, R.string.progress);
                startActivity(intent);
            }

        };
    }
26692
private JButton getNewSessionButton() {
		if (newSessionButton == null) {
			newSessionButton = new JButton();
			newSessionButton.setText(Constant.messages.getString("httpsessions.toolbar.newsession.label"));
			newSessionButton.setIcon(DisplayUtils.getScaledIcon(new ImageIcon(HttpSessionsPanel.class.getResource("/resource/icon/16/103.png"))));
			newSessionButton.setToolTipText(Constant.messages.getString("httpsessions.toolbar.newsession.tooltip"));

			newSessionButton.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					HttpSessionsSite site = getCurrentHttpSessionSite();
					if (site != null) {
						site.createEmptySession();
					}
				}
			});

		}
		return newSessionButton;
	}
158812
protected final JButton getButtonOK() {
        if (buttonOK == null) {
            buttonOK = new JButton();
            buttonOK.setText("OK");
            buttonOK.setPreferredSize(new Dimension(80, 26));
            buttonOK.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                    if (destDirSelector != null) {
                        destDirSelector.ok();
                    }
                }
            });
        }
        return buttonOK;
    }
599304
public CmsPushButton createFavButton() {

        CmsPushButton favButton = new CmsPushButton();
        favButton.setImageClass(I_CmsButton.ButtonData.ADD_TO_FAVORITES.getSmallIconClass());
        favButton.setTitle(I_CmsButton.ButtonData.ADD_TO_FAVORITES.getTitle());
        favButton.setButtonStyle(I_CmsButton.ButtonStyle.FONT_ICON, null);
        add(favButton);
        favButton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {

                CmsContainerpageController.get().getHandler().addToFavorites(getContentId().toString());
            }
        });
        return favButton;
    }
1292395
protected Button getToggleButton(CmsStateBean stateBean) {

        if (stateBean.getType().equals(CmsOuTreeType.USER)) {
            return m_toggleButtonUser;
        }
        if (stateBean.getType().equals(CmsOuTreeType.ROLE)) {
            return m_toggleButtonRole;
        } else {
            return m_toggleButtonGroups;
        }
    }
316502
@SuppressWarnings("serial")
    private Button createSaveExitButton() {

        Button saveExitBtn = CmsToolBar.createButton(
            FontOpenCms.SAVE_EXIT,
            m_messages.key(Messages.GUI_BUTTON_SAVE_AND_EXIT_0));
        saveExitBtn.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {

                saveAction();
                closeAction();

            }
        });
        saveExitBtn.setEnabled(false);
        return saveExitBtn;
    }
482176
private JButton getCancelButton() {
    if (cancelButton == null) {
      cancelButton = new JButton();
      cancelButton.setText("Cancel");
      cancelButton.setMnemonic('C');
      cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          cancelled = true;
          timedOut = false;
          restore();
          setVisible(false);
        }
      });
    }
    return cancelButton;
  }
179513
public JComponent createComponentButton(String strProductType, BaseApplet applet)
    {
        ProductTypeInfo productType = ProductTypeInfo.getProductType(strProductType);
        if (productType == null)
        {
            ImageIcon icon = null;
            if (applet != null)
                icon = applet.loadImageIcon(strProductType, null);
            productType = new ProductTypeInfo(strProductType, icon, icon, 0x00c0c0c0, Colors.NULL);
        }
        JUnderlinedButton button = new JUnderlinedButton(productType.getDescription(), productType.getStartIcon());

        String strLink = strProductType;
        button.setName(strLink);
        
        button.setOpaque(false);
        Color colorBackground = new Color(productType.getSelectColor());
        button.setBackground(colorBackground); // Since the button is opaque, this is only needed for those look and feels that want their own background color.
        button.setBorderPainted(false);
        button.addActionListener(m_actionListener);
        button.addActionListener(this);
        return button;
    }