Creates Button to flush cashes.<p>

@param captionMessage caption
@param descriptionMessage description
@param dialog layout to be shown
@param okRun runnable called by clicking button
@return button with click listener
979391
private static Button getFlushButton(
        String captionMessage,
        String descriptionMessage,
        final I_CloseableDialog dialog,
        final Runnable okRun) {

        Button ret = new Button();
        ret.setWidth(BUTTON_WIDTH);
        ret.addStyleName("v-button");
        ret.addStyleName("o-button-blue");
        ret.setCaption(CmsVaadinUtils.getMessageText(captionMessage));
        ret.setDescription(CmsVaadinUtils.getMessageText(descriptionMessage));

        ret.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -4513263981209222571L;

            public void buttonClick(ClickEvent event) {

                final Window window = CmsBasicDialog.prepareWindow();
                dialog.setCloseRunnable(new Runnable() {

                    public void run() {

                        window.close();
                    }
                });
                dialog.setOkRunnable(okRun);
                window.setContent((Component)dialog);
                window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_CACHE_CLEAN_CONFIRM_0));
                UI.getCurrent().addWindow(window);
            }
        });
        return ret;
    }
660494
protected void createLoadingAnimation(String msg) {

        m_clientLoading = true;
        if (m_loadingPanel != null) {
            m_loadingPanel.removeFromParent();
        }
        m_loadingPanel = new FlowPanel();
        m_loadingPanel.addStyleName(
            org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.uploadButton().loadingPanel());
        m_loadingPanel.addStyleName(m_gwtCss.generalCss().cornerAll());

        CmsLoadingAnimation animationDiv = new CmsLoadingAnimation();
        animationDiv.addStyleName(
            org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.uploadButton().loadingAnimation());
        m_loadingPanel.add(animationDiv);

        HTML messageDiv = new HTML();
        messageDiv.addStyleName(org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.uploadButton().loadingText());
        messageDiv.setHTML(msg);
        m_loadingPanel.add(messageDiv);

        m_contentWrapper.add(m_loadingPanel);
        doResize();
    }
1266412
public Button createButtonOK() {

        return new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0));
    }
1050915
@SuppressWarnings("serial")
    private Button createSaveButton() {

        Button saveBtn = CmsToolBar.createButton(FontOpenCms.SAVE, m_messages.key(Messages.GUI_BUTTON_SAVE_0));
        saveBtn.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {

                saveAction();
            }

        });
        saveBtn.setEnabled(false);
        return saveBtn;
    }
753900
public void setCaption(String caption) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(caption)) {
            getElement().removeClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().hideCaption());
            m_caption.setText(caption);
        } else {
            getElement().addClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().hideCaption());
        }
    }
660249
private void cmdCreateNewActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonAcceptActionPerformed
		String id = txtQueryID.getText();
		String group = (String) cmbQueryGroup.getSelectedItem();

		if (id.isEmpty()) {
			JOptionPane.showMessageDialog(this, "The query ID can't be blank!", "Error", JOptionPane.ERROR_MESSAGE);
			return;
		}
		final int index = queryController.getElementPosition(id);
		if (index != -1) {
			JOptionPane.showMessageDialog(this, "The query or group ID already exists!", "Error", JOptionPane.ERROR_MESSAGE);
			return;
		}

		if (group.equals(NOGROUP)) { // no group selected
			queryController.addQuery(query, id);
		} else if (group.equals(NEWGROUP)) { // create a new group
			group = txtGroupName.getText().trim();
			if (group.isEmpty()) {
				JOptionPane.showMessageDialog(this, "The group ID can't be blank!", "Error", JOptionPane.ERROR_MESSAGE);
				return;
			}
			//query and group ID have not yet been added to the queryController elements, but we need to prevent the use of the same name for both
			if (id.equals(group)){
                JOptionPane.showMessageDialog(this, "The group ID can't have the same name as the query ID!", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
			try {
				queryController.createGroup(group);
				queryController.addQuery(query, id, group);
			} catch (Exception e) {

                OptionPaneUtils.showPrettyMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);

				return;
			}
		} else { // a group selected
			queryController.addQuery(query, id, group);
		}
		parent.dispose();
	}
1288797
private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdAddActionPerformed
    	// Open a save dialog if it is a new query
		JDialog saveDialog = new JDialog();
		saveDialog.setTitle("New Query");
		saveDialog.setModalityType(ModalityType.MODELESS);
		
		SaveQueryPanel savePanel = new SaveQueryPanel("", saveDialog, queryController);
		saveDialog.getContentPane().add(savePanel, java.awt.BorderLayout.CENTER);
		saveDialog.pack();
		
		DialogUtils.centerDialogWRTParent(this, saveDialog);
		DialogUtils.installEscapeCloseOperation(saveDialog);
		
		saveDialog.setVisible(true);
    }
161515
public VisDialog button (String text, Object object, VisTextButtonStyle buttonStyle) {
		return button(new VisTextButton(text, buttonStyle), object);
	}
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);
    }
205572
protected static void showSendBroadcastDialog(Set<String> ids, String caption, final CmsSessionsTable table) {

        final Window window = CmsBasicDialog.prepareWindow();

        window.setCaption(caption);
        CmsBasicDialog dialog = new CmsSendBroadcastDialog(ids, CmsSessionsTable.getCloseRunnable(window, table));
        window.setContent(dialog);
        dialog.setWindowMinFullHeight(500);
        A_CmsUI.get().addWindow(window);

    }
1214718
private CmsPushButton createCancelButton() {

        addDialogClose(null);
        CmsPushButton button = new CmsPushButton();
        button.setText(Messages.get().key(Messages.GUI_CANCEL_0));
        button.setUseMinWidth(true);
        button.addClickHandler(new ClickHandler() {

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

                CmsSeoOptionsDialog.this.hide();
            }
        });

        return button;
    }
634425
public static void showAbout() {

        final CmsPopup popup = new CmsPopup(Messages.get().key(Messages.GUI_ABOUT_DIALOG_TITLE_0));
        FlowPanel container = new FlowPanel();
        int height = 450;
        if (Window.getClientHeight() < height) {
            height = Math.max(300, Window.getClientHeight() - 50);
        }
        container.setHeight(height + "px");
        Frame frame = new Frame();

        frame.setWidth("100%");
        frame.setHeight("100%");
        frame.setUrl(CmsCoreProvider.get().getAboutLink());
        container.add(frame);
        popup.setMainContent(container);
        popup.center();
        popup.addDialogClose(null);
        CmsPushButton closeButton = new CmsPushButton();
        closeButton.setText(Messages.get().key(Messages.GUI_CLOSE_0));
        closeButton.setUseMinWidth(true);

        closeButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE);
        closeButton.addClickHandler(new ClickHandler() {

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

                popup.hide();
            }
        });
        popup.addButton(closeButton);
        popup.addDialogClose(null);
    }
336475
private void createButtons() {

        addDialogClose(new Command() {

            public void execute() {

                cancelUpload();
            }
        });

        CmsPushButton cancelButton = new CmsPushButton();
        cancelButton.setTitle(org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_CANCEL_0));
        cancelButton.setText(org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_CANCEL_0));
        cancelButton.setSize(I_CmsButton.Size.medium);
        cancelButton.setUseMinWidth(true);
        cancelButton.addClickHandler(new ClickHandler() {

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

                cancelUpload();
            }
        });
        addButton(cancelButton);

        m_okButton = new CmsPushButton();
        m_okButton.setTitle(org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_OK_0));
        m_okButton.setText(org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_OK_0));
        m_okButton.setSize(I_CmsButton.Size.medium);
        m_okButton.setUseMinWidth(true);
        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) {

                onOkClick();
            }
        });
        addButton(m_okButton);

        CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(
            new Supplier<I_CmsUploadContext>() {

                public I_CmsUploadContext get() {

                    return m_context;
                }
            });
        buttonHandler.setUploadDialog(this);
        // add a new upload button
        CmsUploadButton uploadButton = new CmsUploadButton(buttonHandler);
        uploadButton.addStyleName(I_CmsLayoutBundle.INSTANCE.uploadCss().uploadDialogButton());
        uploadButton.setText(Messages.get().key(Messages.GUI_UPLOAD_BUTTON_ADD_FILES_0));
        addButton(uploadButton);
        m_uploadButton = uploadButton;
    }
422501
static void showWarning(final String caption, final String description) {

        Notification warning = new Notification(caption, description, Type.WARNING_MESSAGE, true);
        warning.setDelayMsec(-1);
        warning.show(UI.getCurrent().getPage());

    }
481076
public static void creatFontDialog(DatabaseManagerSwing owner) {

        if (isRunning) {
            frame.setVisible(true);
        } else {
            CommonSwing.setSwingLAF(frame, CommonSwing.Native);

            fOwner = owner;

            frame.setIconImage(CommonSwing.getIcon("Frame"));

            isRunning = true;

            frame.setSize(600, 100);
            CommonSwing.setFramePositon(frame);

            ckbitalic = new JCheckBox(
                new ImageIcon(CommonSwing.getIcon("ItalicFont")));

            ckbitalic.putClientProperty("is3DEnabled", Boolean.TRUE);
            ckbitalic.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    setStyle();
                }
            });

            ckbbold =
                new JCheckBox(new ImageIcon(CommonSwing.getIcon("BoldFont")));

            ckbbold.putClientProperty("is3DEnabled", Boolean.TRUE);
            ckbbold.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    setStyle();
                }
            });

            fgColorButton = new JButton(
                "Foreground",
                new ImageIcon(CommonSwing.getIcon("ColorSelection")));

            fgColorButton.putClientProperty("is3DEnabled", Boolean.TRUE);
            fgColorButton.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    setColor(FOREGROUND);
                }
            });

            bgColorButton = new JButton(
                "Background",
                new ImageIcon(CommonSwing.getIcon("ColorSelection")));

            bgColorButton.putClientProperty("is3DEnabled", Boolean.TRUE);
            bgColorButton.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    setColor(BACKGROUND);
                }
            });

            closeButton =
                new JButton("Close",
                            new ImageIcon(CommonSwing.getIcon("Close")));

            closeButton.putClientProperty("is3DEnabled", Boolean.TRUE);
            closeButton.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    frame.setVisible(false);
                }
            });

            GraphicsEnvironment ge =
                GraphicsEnvironment.getLocalGraphicsEnvironment();
            String[]  fontNames = ge.getAvailableFontFamilyNames();
            Dimension fontsComboBoxDimension = new Dimension(160, 25);

            fontsComboBox = new JComboBox(fontNames);

            fontsComboBox.putClientProperty("is3DEnabled", Boolean.TRUE);
            fontsComboBox.setMaximumSize(fontsComboBoxDimension);
            fontsComboBox.setPreferredSize(fontsComboBoxDimension);
            fontsComboBox.setMaximumSize(fontsComboBoxDimension);
            fontsComboBox.setEditable(false);
            fontsComboBox.setSelectedItem(defaultFont);
            fontsComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    setFont();
                }
            });

            // weconsultants@users 20050215 - Added for Compatbilty fix for  JDK 1.3
            fontSizesComboBox = new JComboBox(fontSizes);

            Dimension spinnerDimension = new Dimension(45, 25);

            fontSizesComboBox.putClientProperty("is3DEnabled", Boolean.TRUE);
            fontSizesComboBox.setMinimumSize(spinnerDimension);
            fontSizesComboBox.setPreferredSize(spinnerDimension);
            fontSizesComboBox.setMaximumSize(spinnerDimension);
            fontSizesComboBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent evt) {

                    if (evt.getStateChange() == ItemEvent.SELECTED) {
                        setFontSize((String) evt.getItem());
                    }
                }
            });

            // weconsultants@users 20050215 - Commented out for Compatbilty fix for  JDK 1.3
            //            Dimension spinnerDimension = new Dimension(50, 25);
            //            spinnerFontSizes = new JSpinner();
            //            spinnerFontSizes.putClientProperty("is3DEnabled", Boolean.TRUE);
            //            spinnerFontSizes.setMinimumSize(spinnerDimension);
            //            spinnerFontSizes.setPreferredSize(spinnerDimension);
            //            spinnerFontSizes.setMaximumSize(spinnerDimension);
            //            spinnerModelSizes = new SpinnerNumberModel(12, 8, 72, 1);
            //            spinnerFontSizes.setModel(spinnerModelSizes);
            //            spinnerFontSizes.addChangeListener(new ChangeListener() {
            //                public void stateChanged(ChangeEvent e) {
            //                    setFontSize();
            //                }
            //            });
            Container contentPane = frame.getContentPane();

            contentPane.setLayout(new FlowLayout());
            contentPane.add(fontsComboBox);

            // weconsultants@users 20050215 - Commented out for Compatbilty fix for 1.3
            // contentPane.add(spinnerFontSizes);
            // weconsultants@users 20050215 - Added for Compatbilty fix for 1.3
            contentPane.add(fontSizesComboBox);
            contentPane.add(ckbbold);
            contentPane.add(ckbitalic);
            contentPane.add(fgColorButton);
            contentPane.add(bgColorButton);
            contentPane.add(closeButton);
            frame.pack();
            frame.setVisible(false);
        }
    }
1168526
public void clickOnButton(String text) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnButton(\""+text+"\")");
		}
			
		clicker.clickOn(Button.class, text);

	}
1135120
void onClickOk() {

        CmsContainerPageCopier copier = new CmsContainerPageCopier(m_context.getCms());
        try {
            CmsContainerPageCopier.CopyMode mode = (CmsContainerPageCopier.CopyMode)(m_copyMode.getValue());
            copier.setCopyMode(mode);
            TargetInfo info = new TargetInfo(m_context.getCms(), m_targetSelect.getValue());
            if (!info.isValid()) {
                Type type = Type.ERROR_MESSAGE;
                String error = CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_INVALID_TARGET_0);
                Notification.show(error, type);
                return;
            }
            CmsResource targetFolder = info.getTargetFolder();
            copier.run(m_context.getResources().get(0), targetFolder, info.getTargetName());
            m_context.finish(
                Arrays.asList(
                    copier.getTargetFolder().getStructureId(),
                    copier.getCopiedFolderOrPage().getStructureId()));
        } catch (CmsException e) {
            m_context.error(e);
        } catch (NoCustomReplacementException e) {
            String errorMessage = CmsVaadinUtils.getMessageText(
                Messages.GUI_COPYPAGE_NO_REPLACEMENT_FOUND_1,
                e.getResource().getRootPath());
            CmsErrorDialog.showErrorDialog(errorMessage, e);
        }
    }