Button to open log file view settings dialog.<p>
193361
private void addSettingsButton() {

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

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                Window window = CmsBasicDialog.prepareWindow(CmsBasicDialog.DialogWidth.wide);
                window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGVIEW_SETTINGS_SHORT_0));
                window.setContent(new CmsLogFileViewSettings(window));
                window.addCloseListener(new CloseListener() {

                    private static final long serialVersionUID = -7058276628732771106L;

                    public void windowClose(CloseEvent e) {

                        m_fileView.updateView();
                    }
                });
                A_CmsUI.get().addWindow(window);
            }
        });
        m_uiContext.addToolbarButton(button);
    }
832513
public void setOpen(boolean open) {

        m_opened = open;
        if (m_opened) {
            // show content
            m_visibilityStyle.setValue(
                I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll()
                    + " "
                    + I_CmsLayoutBundle.INSTANCE.fieldsetCss().fieldsetVisible());
            m_opener.setDown(true);
        } else {
            // hide content
            m_visibilityStyle.setValue(I_CmsLayoutBundle.INSTANCE.fieldsetCss().fieldsetInvisible());
            m_opener.setDown(false);
        }
        CmsDomUtil.resizeAncestor(getParent());
    }
981015
public void clickOnButton(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnButton("+index+")");
		}
		
		clicker.clickOn(Button.class, index);
	}
1012374
public static void setFileBrowsingOnWidgets( JTextField pathTextField, JButton browseButton, String[] allowedExtensions,
            Runnable postRunnable ) {
        FileFilter filter = null;
        if (allowedExtensions != null) {
            filter = new FileFilter(){

                @Override
                public String getDescription() {
                    return Arrays.toString(allowedExtensions);
                }

                @Override
                public boolean accept( File f ) {
                    if (f.isDirectory()) {
                        return true;
                    }
                    String name = f.getName();
                    for( String ext : allowedExtensions ) {
                        if (name.toLowerCase().endsWith(ext.toLowerCase())) {
                            return true;
                        }
                    }
                    return false;
                }
            };
        }
        FileFilter _filter = filter;
        browseButton.addActionListener(e -> {
            File lastFile = GuiUtilities.getLastFile();
            File[] res = showOpenFilesDialog(browseButton, "Select file", false, lastFile, _filter);
            if (res != null && res.length == 1) {
                String absolutePath = res[0].getAbsolutePath();
                pathTextField.setText(absolutePath);
                setLastPath(absolutePath);
                if (postRunnable != null) {
                    postRunnable.run();
                }
            }
        });
    }
1202253
void setOkButtonEnabled() {

        m_ok.setEnabled(true);
        m_ok.setCaption(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CLOSE_0));
        m_ok.removeClickListener(m_okClickListener);
        m_ok.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 5637556711524961424L;

            public void buttonClick(ClickEvent event) {

                closeDailog(true);
            }
        });
    }
137415
private static void openDialog(String uploadTarget) {

        try {
            A_CmsUploadDialog dialog = GWT.create(CmsUploadDialogImpl.class);
            dialog.setContext(new I_CmsUploadContext() {

                public void onUploadFinished(List<String> uploadedFiles) {

                    Window.Location.reload();
                }
            });
            dialog.setTargetFolder(uploadTarget);
            dialog.loadAndShow();
        } catch (Exception e) {
            CmsErrorDialog.handleException(
                new Exception(
                    "Deserialization of dialog data failed. This may be caused by expired java-script resources, please clear your browser cache and try again.",
                    e));
        }
    }
729226
private static function _openLogFile()
    {
        try {
            self::$_file = fopen(self::$_file, "a");

            if (!self::$_file) {
                self::$_file = null;
                return false;
            }
        } catch (Exception $e) {
        }
        return true;
    }
120986
public void displayDialog() throws IOException, ServletException {

        getSettings().setExplorerMode(CmsExplorer.VIEW_LIST);
        Map<String, String[]> addParams = new HashMap<String, String[]>();
        HttpServletRequest req = getJsp().getRequest();
        String addParamsVal = req.getParameter(CmsExplorer.PARAMETER_CONTEXTMENUPARAMS);
        if (addParamsVal != null) {
            addParams.put(CmsExplorer.PARAMETER_CONTEXTMENUPARAMS, new String[] {addParamsVal});
        }
        getToolManager().jspForwardPage(this, FILE_EXPLORER_FILELIST, addParams);
    }
704770
protected void addSaveButton() {

        if (m_editorDialog != null) {
            m_saveButton = new CmsPushButton();
            m_saveButton.setText(Messages.get().key(Messages.GUI_BUTTON_SAVE_TEXT_0));
            m_saveButton.setUseMinWidth(true);
            m_saveButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.GREEN);
            m_saveButton.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    saveEdit();
                }
            });
            m_editorDialog.addButton(m_saveButton);
        }
    }
932143
public void displayDialog() throws Exception {

        if (getAction() == ACTION_CANCEL) {
            actionCloseDialog();
        }
        JspWriter out = getJsp().getJspContext().getOut();
        out.print("<link rel='stylesheet' type='text/css' href='");
        out.print(getStyleUri(getJsp()));
        out.println("diff.css'>");
        out.println(dialogContentStart(getParamTitle()));
        out.print("<form name='diff-form' method='post' action='");
        out.print(getDialogUri());
        out.println("'>");
        out.println(allParamsAsHidden());
        out.println("</form>");
        // icon is displayed on the right in order that the user needs not scroll to the icon for long lines
        out.println("<p>");
        out.println(getDiffOnlyButtonsHtml());
        out.println("</p>");
        out.println(dialogBlockStart(null));
        out.println("<table cellspacing='0' cellpadding='0' class='xmlTable'>\n<tr><td><pre style='overflow:auto'>");
        try {
            CmsHtmlDifferenceConfiguration conf = new CmsHtmlDifferenceConfiguration(
                getMode() == CmsDiffViewMode.ALL ? -1 : getLinesBeforeSkip(),
                getLocale());
            String diff = Diff.diffAsHtml(getOriginalSource(), getCopySource(), conf);
            if (CmsStringUtil.isNotEmpty(diff)) {
                out.println(diff);
            } else {
                // print original source, if there are no differences
                out.println(
                    wrapLinesWithUnchangedStyle(
                        CmsStringUtil.substitute(CmsStringUtil.escapeHtml(getOriginalSource()), "<br/>", "")));
            }
        } catch (Exception e) {
            out.print(e);
        }
        out.println("</pre></td></tr>\n</table>");
        out.println(dialogBlockEnd());
        out.println(dialogContentEnd());
        out.println(dialogEnd());
        out.println(bodyEnd());
        out.println(htmlEnd());
    }
1261572
public void openUpdateServerConfigDailog() {

        CmsWebServerConfigForm form = new CmsWebServerConfigForm(this);
        openDialog(form, CmsVaadinUtils.getMessageText(Messages.GUI_SITE_WEBSERVERCONFIG_0));
    }
1279796
private void showDialog(@Nullable final Bundle dialogState) {
        AbstractButtonBarDialogBuilder<?, ?> dialogBuilder = createDialogBuilder(dialogTheme);
        dialogBuilder.setFullscreen(isDialogFullscreen());
        dialogBuilder.setMaxWidth(getDialogMaxWidth());
        dialogBuilder.setMaxHeight(getDialogMaxHeight());
        dialogBuilder.setMargin(getDialogLeftMargin(), getDialogTopMargin(), getDialogRightMargin(),
                getDialogBottomMargin());
        dialogBuilder
                .setPadding(getDialogPaddingLeft(), getDialogPaddingTop(), getDialogPaddingRight(),
                        getDialogPaddingBottom());
        dialogBuilder.setFitsSystemWindows(isDialogFitsSystemWindowsLeft(),
                isDialogFitsSystemWindowsTop(), isDialogFitsSystemWindowsRight(),
                isDialogFitsSystemWindowsBottom());
        dialogBuilder.setTitle(getDialogTitle());
        dialogBuilder.setMessage(getDialogMessage());
        dialogBuilder.setPositiveButton(getPositiveButtonText(), this);
        dialogBuilder.setNegativeButton(getNegativeButtonText(), this);
        dialogBuilder.showHeader(isDialogHeaderShown());
        dialogBuilder.showButtonBarDivider(isDialogButtonBarDividerShown());
        dialogBuilder.showDividersOnScroll(areDialogDividersShownOnScroll());
        dialogBuilder.setShowAnimation(getDialogShowAnimation());
        dialogBuilder.setDismissAnimation(getDialogDismissAnimation());
        dialogBuilder.setCancelAnimation(getDialogCancelAnimation());
        dialogBuilder.setIconTintList(getDialogIconTintList());
        dialogBuilder.setIconTintMode(getDialogIconTintMode());
        dialogBuilder.setHeaderIconTintList(getDialogHeaderIconTintList());
        dialogBuilder.setHeaderIconTintMode(getDialogHeaderIconTintMode());

        if (dialogScrollableArea != null) {
            dialogBuilder.setScrollableArea(dialogScrollableArea.getTopScrollableArea(),
                    dialogScrollableArea.getBottomScrollableArea());
        }

        if (dialogIconId != -1) {
            dialogBuilder.setIcon(dialogIconId);
        } else {
            dialogBuilder.setIcon(dialogIconBitmap);
        }

        if (dialogBackgroundId != -1) {
            dialogBuilder.setBackground(dialogBackgroundId);
        } else if (dialogBackgroundColor != -1) {
            dialogBuilder.setBackgroundColor(dialogBackgroundColor);
        } else if (dialogBackgroundBitmap != null) {
            dialogBuilder.setBackground(dialogBackgroundBitmap);
        }

        if (dialogWindowBackgroundId != -1) {
            dialogBuilder.setWindowBackground(dialogWindowBackgroundId);
        } else if (dialogWindowBackgroundBitmap != null) {
            dialogBuilder.setBackground(dialogWindowBackgroundBitmap);
        }

        if (dialogHeaderBackgroundId != -1) {
            dialogBuilder.setHeaderBackground(dialogHeaderBackgroundId);
        } else if (dialogHeaderBackgroundColor != -1) {
            dialogBuilder.setHeaderBackgroundColor(dialogHeaderBackgroundColor);
        } else if (dialogHeaderBackgroundBitmap != null) {
            dialogBuilder.setHeaderBackground(dialogHeaderBackgroundBitmap);
        }

        if (dialogHeaderIconId != -1) {
            dialogBuilder.setHeaderIcon(dialogHeaderIconId);
        } else {
            dialogBuilder.setHeaderIcon(dialogHeaderIconBitmap);
        }

        if (getDialogGravity() != -1) {
            dialogBuilder.setGravity(getDialogGravity());
        }

        if (getDialogWidth() != 0) {
            dialogBuilder.setWidth(getDialogWidth());
        }

        if (getDialogHeight() != 0) {
            dialogBuilder.setHeight(getDialogHeight());
        }

        if (getDialogTitleColor() != -1) {
            dialogBuilder.setTitleColor(getDialogTitleColor());
        }

        if (getDialogTitleTypeface() != null) {
            dialogBuilder.setTitleTypeface(getDialogTitleTypeface());
        }

        if (getDialogMessageColor() != -1) {
            dialogBuilder.setMessageColor(getDialogMessageColor());
        }

        if (getDialogMessageTypeface() != null) {
            dialogBuilder.setMessageTypeface(getDialogMessageTypeface());
        }

        if (getDialogButtonTextColor() != null) {
            dialogBuilder.setButtonTextColor(getDialogButtonTextColor());
        }

        if (getDialogButtonTypeface() != null) {
            dialogBuilder.setButtonTypeface(getDialogButtonTypeface());
        }

        if (getDialogDividerColor() != -1) {
            dialogBuilder.setDividerColor(getDialogDividerColor());
        }

        if (customDialogTitleView != null) {
            dialogBuilder.setCustomTitle(customDialogTitleView);
        }

        if (customDialogTitleViewId != -1) {
            dialogBuilder.setCustomTitle(customDialogTitleViewId);
        }

        if (customDialogMessageView != null) {
            dialogBuilder.setCustomMessage(customDialogMessageView);
        }

        if (customDialogMessageViewId != -1) {
            dialogBuilder.setCustomMessage(customDialogMessageViewId);
        }

        if (customDialogButtonBarView != null) {
            dialogBuilder.setCustomButtonBar(customDialogButtonBarView);
        }

        if (customDialogButtonBarViewId != -1) {
            dialogBuilder.setCustomButtonBar(customDialogButtonBarViewId);
        }

        if (customDialogHeaderView != null) {
            dialogBuilder.setCustomHeader(customDialogHeaderView);
        }

        if (customDialogHeaderViewId != -1) {
            dialogBuilder.setCustomHeader(customDialogHeaderViewId);
        }

        onPrepareDialog(dialogBuilder);
        dialog = createDialog(dialogBuilder);
        dialog.setOnShowListener(this);
        dialog.setOnDismissListener(this);
        dialog.setOnCancelListener(this);
        dialog.setOnKeyListener(this);

        if (dialogState != null) {
            dialog.onRestoreInstanceState(dialogState);
        }

        requestInputMode();
        dialogResultPositive = false;
        dialog.show();
    }
48354
public static void openDialogInWindow(final I_Callback callback, String windowCaption) {

        final Window window = CmsBasicDialog.prepareWindow();
        window.setCaption(windowCaption);
        CmsSiteSelectDialog dialog = new CmsSiteSelectDialog();
        window.setContent(dialog);
        dialog.setCallback(new I_Callback() {

            public void onCancel() {

                window.close();
                callback.onCancel();

            }

            public void onSiteSelect(String site) {

                window.close();
                callback.onSiteSelect(site);
            }
        });
        A_CmsUI.get().addWindow(window);
    }
368665
public void clickLongOnView(View view, int time) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickLongOnView("+view+", "+time+")");
		}
		
		clicker.clickOnScreen(view, true, time);

	}
1175514
protected void openGalleryDialog() {

        String title = org.opencms.gwt.client.Messages.get().key(
            org.opencms.gwt.client.Messages.GUI_GALLERY_SELECT_DIALOG_TITLE_0);
        final CmsFramePopup popup = new CmsFramePopup(title, buildGalleryUrl());
        popup.setCloseHandler(new Runnable() {

            public void run() {

                m_textbox.setGhostMode(false);

            }

        });
        popup.setId(m_id);
        popup.getFrame().setSize("700px", "490px");
        popup.center();

        CmsPushButton button = new CmsPushButton(I_CmsButton.DELETE_SMALL);
        button.setButtonStyle(ButtonStyle.FONT_ICON, null);
        button.setSize(Size.small);
        Style style = button.getElement().getStyle();
        style.setRight(4, Unit.PX);
        style.setTop(0, Unit.PX);
        style.setPosition(Position.ABSOLUTE);
        style.setCursor(Cursor.POINTER);
        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) {

                popup.hide();
            }
        });

        popup.insertFront(button);
    }
942786
private void showNavButtons() {

        if (m_navButtons.isEmpty()) {
            Button addProject = CmsToolBar.createButton(
                FontOpenCms.WAND,
                CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_ADD_0));
            addProject.addClickListener(new ClickListener() {

                private static final long serialVersionUID = 1L;

                public void buttonClick(ClickEvent event) {

                    Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
                    CmsEditProjectForm form = new CmsEditProjectForm(m_projectsTable, window);
                    window.setContent(form);
                    window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_ADD_0));
                    A_CmsUI.get().addWindow(window);
                    window.center();
                }
            });
            m_uiContext.addToolbarButton(addProject);
            m_navButtons.add(addProject);
            Button history = CmsToolBar.createButton(
                FontOpenCms.CLIPBOARD,
                CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_HISTORY_0));
            history.addClickListener(new ClickListener() {

                private static final long serialVersionUID = 1L;

                public void buttonClick(ClickEvent event) {

                    openSubView(CmsProjectManager.PATH_NAME_HISTORY, true);
                }
            });
            m_uiContext.addToolbarButton(history);
            m_navButtons.add(history);
            try {
                Map<String, String> infos = new LinkedHashMap<String, String>();
                infos.put(
                    CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_COUNT_0),
                    String.valueOf(
                        OpenCms.getOrgUnitManager().getAllManageableProjects(A_CmsUI.getCmsObject(), "", true).size()));
                CmsInfoButton infoButton = new CmsInfoButton(infos);
                infoButton.setWindowCaption(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_0));
                infoButton.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_0));
                m_uiContext.addToolbarButton(infoButton);
            } catch (CmsException e) {
                LOG.error("unable to get orgunit manager", e);
            }
        } else {
            for (Component button : m_navButtons) {
                button.setVisible(true);
            }
        }
    }
990461
protected void openPopup() {

        if (m_cmsPopup == null) {

            m_cmsPopup = new CmsPopup(Messages.get().key(Messages.GUI_DIALOG_CATEGORIES_TITLE_0), CmsPopup.WIDE_WIDTH);
            m_cmsCategoryTree = new CmsCategoryTree(m_selected, 300, m_isSingleValue, m_resultList, m_collapsed);
            m_cmsPopup.add(m_cmsCategoryTree);
            m_cmsPopup.setModal(false);
            m_cmsPopup.setAutoHideEnabled(true);
            m_cmsPopup.addCloseHandler(new CloseHandler<PopupPanel>() {

                public void onClose(CloseEvent<PopupPanel> event) {

                    closePopup();

                }
            });
            m_cmsPopup.addDialogClose(new Command() {

                public void execute() {

                    // do nothing all will done in onClose();
                }
            });
        }
        if (m_previewHandlerRegistration != null) {
            m_previewHandlerRegistration.removeHandler();
        }
        m_previewHandlerRegistration = Event.addNativePreviewHandler(new CloseEventPreviewHandler());
        m_cmsCategoryTree.truncate("CATEGORIES", CmsPopup.WIDE_WIDTH - 20);
        m_cmsPopup.showRelativeTo(m_categoryField);
        m_xcoordspopup = m_cmsPopup.getPopupLeft();
        m_ycoordspopup = m_cmsPopup.getPopupTop();
    }