Creates the button which opens the flush dialogs.<p>

@return Button
321634
protected static Button getFlushToolButton() {

        Button res = new Button(FontOpenCms.CACHE);
        res.addStyleName(ValoTheme.BUTTON_BORDERLESS);
        res.addStyleName(OpenCmsTheme.TOOLBAR_BUTTON);
        res.addClickListener(new ClickListener() {

            /**vaadin serial id. */
            private static final long serialVersionUID = 7110311791006484514L;

            public void buttonClick(ClickEvent event) {

                Window window = CmsBasicDialog.prepareWindow(DialogWidth.content);

                window.setContent(new CmsFlushButtonHolderDialog(window));
                A_CmsUI.get().addWindow(window);
            }

        });
        return res;
    }
878365
public String dialogButtonsCustom() {

        if (getPages().size() > 1) {
            // this is a multi page dialog, create buttons according to current page
            int pageIndex = getPages().indexOf(getParamPage());
            if (pageIndex == (getPages().size() - 1)) {
                // this is the last dialog page
                return dialogButtons(new int[] {BUTTON_OK, BUTTON_BACK, BUTTON_CANCEL}, new String[3]);
            } else if (pageIndex > 0) {
                // this is a dialog page between first and last page
                return dialogButtons(new int[] {BUTTON_BACK, BUTTON_CONTINUE, BUTTON_CANCEL}, new String[3]);
            } else {
                // this is the first dialog page
                return dialogButtons(new int[] {BUTTON_CONTINUE, BUTTON_CANCEL}, new String[2]);
            }
        }
        boolean onlyDisplay = true;
        Iterator<CmsWidgetDialogParameter> it = getWidgets().iterator();
        while (it.hasNext()) {
            CmsWidgetDialogParameter wdp = it.next();
            if (!(wdp.getWidget() instanceof CmsDisplayWidget)) {
                onlyDisplay = false;
                break;
            }
        }
        if (!onlyDisplay) {
            // this is a single page dialog, create common buttons
            return dialogButtons(new int[] {BUTTON_OK, BUTTON_CANCEL}, new String[2]);
        }
        // this is a display only dialog
        return "";
    }
973316
protected JPanel buildButtonPanel() {
        buttonPanel = new JPanel();

        leftToRight = new JButton(">");
        allLeftToRight = new JButton(">>");
        rightToLeft = new JButton("<");
        allRightToLeft = new JButton("<<");
        Font smallerFont = leftToRight.getFont().deriveFont(9.0F);
        leftToRight.setFont(smallerFont);
        allLeftToRight.setFont(smallerFont);
        rightToLeft.setFont(smallerFont);
        allRightToLeft.setFont(smallerFont);

        Insets margin = new Insets(2, 4, 2, 4);
        leftToRight.setMargin(margin);
        allLeftToRight.setMargin(margin);
        rightToLeft.setMargin(margin);
        allRightToLeft.setMargin(margin);

        GridBagLayout gbl = new GridBagLayout();
        GridBagConstraints gbc = new GridBagConstraints();

        buttonPanel.setLayout(gbl);

        gbc.gridwidth = GridBagConstraints.REMAINDER;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbl.setConstraints(leftToRight, gbc);
        gbl.setConstraints(allLeftToRight, gbc);
        gbl.setConstraints(rightToLeft, gbc);
        gbl.setConstraints(allRightToLeft, gbc);

        buttonPanel.add(leftToRight);
        buttonPanel.add(allLeftToRight);
        buttonPanel.add(rightToLeft);
        buttonPanel.add(allRightToLeft);

        leftToRight.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                moveLeftToRight();
            }
        });
        allLeftToRight.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                moveAllLeftToRight();
            }
        });
        rightToLeft.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                moveRightToLeft();
            }
        });
        allRightToLeft.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                moveAllRightToLeft();
            }
        });

        buttonPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
        // buttonPanel.setBackground( Color.lightGray );
        return buttonPanel;
    }
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;
	}
1093690
private JButton getBtnClose() {
		if (btnClose == null) {
			btnClose = new JButton();
			btnClose.setText("Close");
			btnClose.setVisible(false);
			btnClose.addActionListener(new ActionListener() {     // Close this window
				@Override
				public void actionPerformed(ActionEvent arg0) {					
				        
                      stop();
                      
				}
		    });
		}
		return btnClose;
	}
1210517
private JButton getStartSessionButton() {
		if (startSessionButton == null) {
			startSessionButton = new JButton();
			startSessionButton.setText(Constant.messages.getString("database.newsession.button.start"));
			startSessionButton.setEnabled(false);
			startSessionButton.addActionListener(new java.awt.event.ActionListener() { 
				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {    
				    PersistSessionDialog.this.dispose();
				}
			});

		}
		return startSessionButton;
	}
533575
public CmsFileInput createFileInput() {

        // remove the current file input field and add a new one
        CmsFileInput previous = m_fileInput;
        if (m_fileInput != null) {
            m_fileInput.getElement().getStyle().setDisplay(Display.NONE);
        }
        m_fileInput = new CmsFileInput();
        m_fileInput.addChangeHandler(new ChangeHandler() {

            public void onChange(ChangeEvent event) {

                CmsDomUtil.ensureMouseOut(m_main.getElement());
                m_buttonHandler.onChange(m_fileInput);
            }
        });
        m_buttonHandler.initializeFileInput(m_fileInput);
        m_main.add(m_fileInput);
        return previous;
    }
1072366
private JButton getBtnCancel() {
		if (btnCancel == null) {
			btnCancel = new JButton();
			btnCancel.setText(Constant.messages.getString("all.button.cancel"));
			btnCancel.addActionListener(new java.awt.event.ActionListener() { 

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {
					getTxtPattern().discardAllEdits();
					FilterReplaceDialog.this.dispose();
				    exitCode = JOptionPane.CANCEL_OPTION;

				}
			});

		}
		return btnCancel;
	}
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;
    }
431522
private JButton getOkButton()
    {
        if (okButton == null)
        {
            okButton = new JButton();
            okButton.setText("Go!");
            okButton.addActionListener(new java.awt.event.ActionListener()
            {
                public void actionPerformed(java.awt.event.ActionEvent e)
                {
                    displayURL(urlText.getText());
                }
            });
        }
        return okButton;
    }
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;
    }
216196
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) {    
					saveAndClose();
				}
			});

		}
		return btnOK;
	}
1041746
private void addRefreshButton() {

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

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                m_fileView.updateView();

            }
        });
        m_uiContext.addToolbarButton(button);
    }
1032624
public final AbstractButton createButton(String faceDescriptorId, ButtonFactory buttonFactory) {
		return createButton(faceDescriptorId, buttonFactory, getDefaultButtonConfigurer());
	}
167618
@SuppressWarnings("unused")
    public static CmsGalleryDialog createDialog(final CmsPopup popup) {

        CmsGalleryDialog galleryDialog = new CmsGalleryDialog(new I_CmsGalleryHandler() {

            public boolean filterDnd(CmsResultItemBean resultBean) {

                // TODO: Auto-generated method stub
                return true;
            }

            public Widget getAdditionalTypeTabControl() {

                return null;
            }

            public I_CmsAutoHider getAutoHideParent() {

                return popup;
            }

            public CmsDNDHandler getDndHandler() {

                return null;
            }

            public void processResultItem(CmsResultListItem item) {

                // do nothing
            }

        }, CmsTabbedPanelStyle.buttonTabs);
        try {
            CmsGalleryDataBean data = getGalleryDataFromDict();
            CmsGallerySearchBean search = getSearchBeanFromDict();
            new CmsGalleryController(new CmsGalleryControllerHandler(galleryDialog), data, search);
        } catch (SerializationException e) {
            CmsErrorDialog.handleException(
                new Exception(
                    "Deserialization of gallery data failed. This may be caused by expired java-script resources, please clear your browser cache and try again.",
                    e));
        }

        return galleryDialog;
    }
1037497
public CmsPushButton createInfoButton() {

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

            public void onClick(ClickEvent event) {

                CmsResourceInfoDialog.load(m_editableData.getStructureId(), true, null, getInfoContext(), null);
            }
        });
        return infoButton;
    }
453858
private void createButtons() {

        m_okButton = createButton(org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_OK_0));
        m_okButton.addClickHandler(new ClickHandler() {

            /**
             * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
             */
            public void onClick(ClickEvent event) {

                uploadFile();
            }
        });
        if (m_fileInput == null) {
            m_okButton.disable(Messages.get().key(Messages.GUI_REPLACE_NO_FILE_SELECTED_0));
        }
        addButton(m_okButton);

        // add a new upload button
        m_uploadButton = new CmsUploadButton(m_handler);
        m_uploadButton.addStyleName(I_CmsLayoutBundle.INSTANCE.uploadButton().uploadDialogButton());
        m_uploadButton.setText(Messages.get().key(Messages.GUI_REPLACE_CHANGE_FILE_0));
        addButton(m_uploadButton);
        m_handler.setButton(m_uploadButton);
    }