Called when the dialog is opened
508635
function() {
      var t = this;

      // Show the modal dialog
      t.dialog.centerBox().css({top:40}).modal('show');

      // Set the cursor when the dialog fades in
      setTimeout(function(){
        t.$('.nm-tsv-title').focus();
      }, 500);
    }
835189
def on_open(self, callback, timeout):
        
        super().on_open()
        self.callback = callback
        self.timeout = timeout
        self.revive_event = asyncio.Event(loop=self.loop)
1359138
def _on_click(self, event):
        
        if callable(self.__callback):
            self.__callback(self.selection)
885108
protected void openDialog(DialogOptions dlgOptions) {

        m_dialog = new CmsPopup(
            Messages.get().key(Messages.GUI_DIALOG_CONTENTEDITOR_TITLE_0)
                + " - "
                + (m_isNew ? m_editableData.getNewTitle() : m_editableData.getSitePath()));
        m_dialog.addStyleName(I_CmsLayoutBundle.INSTANCE.contentEditorCss().contentEditor());

        // calculate width
        int width = Window.getClientWidth();
        width = (width < 1350) ? width - 50 : 1300;
        if (dlgOptions.getSuggestedWidth() != null) {
            width = dlgOptions.getSuggestedWidth().intValue();
        }

        m_dialog.setWidth(width);

        // calculate height
        int height = Window.getClientHeight() - 50;
        height = (height < 645) ? 645 : height;
        if (dlgOptions.getSuggestedHeight() != null) {
            height = dlgOptions.getSuggestedHeight().intValue();
        }
        m_dialog.setHeight(height);

        m_dialog.setGlassEnabled(true);
        m_dialog.setUseAnimation(false);
        final CmsIFrame editorFrame = new CmsIFrame(EDITOR_IFRAME_NAME, "");
        m_dialog.addDialogClose(new Command() {

            /**
             * @see com.google.gwt.user.client.Command#execute()
             */
            public void execute() {

                CmsConfirmDialog confirmDlg = new CmsConfirmDialog(
                    Messages.get().key(Messages.GUI_EDITOR_CLOSE_CAPTION_0),
                    Messages.get().key(Messages.GUI_EDITOR_CLOSE_TEXT_0));
                confirmDlg.setHandler(new I_CmsConfirmDialogHandler() {

                    public void onClose() {

                        // do nothing
                    }

                    public void onOk() {

                        // make sure the onunload event is triggered within the editor frames for ALL browsers
                        editorFrame.setUrl("about:blank");
                        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                            public void execute() {

                                CmsContentEditorDialog.this.close();
                            }
                        });
                    }
                });
                confirmDlg.center();
                // Let the confirm dialog handle the closing
                throw new CmsCancelCloseException();
            }
        });

        m_dialog.add(editorFrame);
        m_dialog.setPositionFixed();
        m_dialog.center();
        m_form = generateForm(m_editableData, m_isNew, EDITOR_IFRAME_NAME, m_mode);
        RootPanel.getBodyElement().appendChild(m_form);
        m_form.submit();

        // adding on close handler
        m_closingHandlerRegistration = Window.addWindowClosingHandler(new ClosingHandler() {

            public void onWindowClosing(ClosingEvent event) {

                onWindowClose();
            }
        });
    }
338399
void onPopupClose() {

        if (m_referenceElement != null) {
            CmsInlineEditOverlay.removeLastOverlay();
        }
        CmsInlineEditOverlay.updateCurrentOverlayPosition();
        if (m_entityChangeHandlerRegistration != null) {
            m_entityChangeHandlerRegistration.removeHandler();
        }
        CmsAttributeHandler.setResizeHandler(null);
        if (!m_runningUpdate) {
            if (m_hasChanges) {
                CmsInlineEditOverlay.getRootOverlay().clearButtonPanel();
                m_htmlUpdateHandler.reinitWidgets(m_formParent);
            }
        }
        m_popup = null;
    }
545755
private void initializeShowAlertDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_alert_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeAlertDialog();
                alertDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                alertDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                alertDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                alertDialog.show();
                return true;
            }

        });
    }
852418
def on_load(self, event):
        ''''''
        dlg = wx.FileDialog(None, self.settings.get_title(), '', "", '*.*', wx.FD_OPEN)
        if dlg.ShowModal() == wx.ID_OK:
            self.settings.load(dlg.GetPath())
        # update the controls with new values
        for label in self.setting_map.keys():
            setting = self.setting_map[label]
            ctrl = self.controls[label]
            value = ctrl.GetValue()
            if isinstance(value, str) or isinstance(value, unicode):
                ctrl.SetValue(str(setting.value))
            else:
                ctrl.SetValue(setting.value)
223941
public void open() {
        setActive(true);
        Scheduler.get().scheduleDeferred(() -> $(valueBoxBase.getElement()).focus());
        OpenEvent.fire(MaterialSearch.this, getText());
    }
1130474
def _on_action_triggered(self):
        
        action = self.sender()
        assert isinstance(action, QtWidgets.QAction)
        path = action.data()
        self.open_requested.emit(path)
        self.update_actions()
869236
public synchronized void onDialogsChanged(boolean isEmpty) {
        if (isDialogsEmpty.get() != isEmpty) {
            context.getPreferences().putBool("app.dialogs.empty", isEmpty);
            isDialogsEmpty.change(isEmpty);
        }
        if (!isEmpty) {
            if (isAppEmpty.get()) {
                context.getPreferences().putBool("app.empty", false);
                isAppEmpty.change(false);
            }
        }
    }
31933
private void initializeCustomDialog() {
        MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
        configureHeaderDialogBuilder(builder);
        configureButtonBarDialogBuilder(builder);
        builder.setView(R.layout.custom_dialog_content);
        builder.setCustomTitle(R.layout.custom_dialog_title);
        builder.setCustomMessage(R.layout.custom_dialog_message);
        builder.setCustomButtonBar(R.layout.custom_dialog_button_bar);
        builder.setCustomHeader(R.layout.custom_dialog_header);
        customDialog = builder.create();
    }
81094
public void alertOpen() {
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  
            logger.logp(Level.FINE, CLASS_NAME,"alertOpen()", "");
        }
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        _srtRequestHelper._InputStreamClosed=false;
    }
336117
public void show(){
        if(title==null || message==null) {
            throw new RuntimeException("Title or message cannot be null.");
        }

        dialogView = layoutInflater.inflate(R.layout.password_dialog, null);
        ((TextView) dialogView.findViewById(R.id.password_dialog_title)).setText(title);
        ((TextView) dialogView.findViewById(R.id.password_dialog_message)).setText(message);
        final EditText input = dialogView.findViewById(R.id.password_dialog_input);

        input.setInputType(passwordType);

        dialog = builder.setView(dialogView)
                .setPositiveButton(R.string.password_confirm, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        // have to override this listener, otherwise it will close the dialog
                    }
                })
                .setNegativeButton(R.string.password_cancel, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        if(callback!=null){
                            callback.onPasswordCancel();
                        }
                    }
                })
                .create();

        if(dialog.getWindow() != null) {
            if(enterAnimation!=DialogAnimation.Enter.APPEAR || exitAnimation!=DialogAnimation.Exit.DISAPPEAR) {
                int style = DialogAnimation.getStyle(enterAnimation, exitAnimation);
                if (style != -1) {
                    dialog.getWindow().getAttributes().windowAnimations = style;
                } else {
                    Log.w(TAG, "The animation selected is not available. Default animation will be used.");
                }
            }

            if(!dimBackground){
                dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
            }
        }
        else{
            Log.w(TAG, "Could not get window from dialog");
        }
        dialog.setCanceledOnTouchOutside(cancelOnTouchOutside);
        dialog.setCancelable(cancelOnPressBack);
        dialog.show();

        dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                if(callback!=null){
                    String password = input.getText().toString();
                    if(callback.onPasswordCheck(password)){
                        dialog.dismiss();
                        if(token!=null){
                            token.validate();
                        }
                        callback.onPasswordSucceeded();
                    }
                    else{
                        input.setText("");
                        input.setError(context.getResources().getString(R.string.password_incorrect));
                    }
                }
            }
        });
    }
741062
protected void open() {

        m_oldValue = m_selectionInput.m_textbox.getValue();
        CmsEmbeddedDialogHandler handler = new CmsEmbeddedDialogHandler();
        handler.setPrincipleSelectHandler(new I_CmsPrincipalSelectHandler() {

            public void selectPrincipal(String principal) {

                if (!getFormValue().equals(principal)) {
                    setFormValueAsString(principal);
                    fireValueChange(principal);
                }
            }
        });
        handler.openDialog(DIALOG_ID, null, null, m_configuration);
    }
29579
private void initializeShowCustomDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_custom_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeCustomDialog();
                customDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                customDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                customDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                customDialog.show();
                return true;
            }

        });
    }
215232
def startEdit( self ):
        
        self._originalText = self.text()
        self.scrollWidget().hide()
        self.setFocus()
        self.selectAll()
507452
void openEditDialog(String typeName) {

        try {
            Window window = CmsBasicDialog.prepareWindow(DialogWidth.max);

            window.setContent(
                new CmsEditResourceTypeDialog(window, m_app, OpenCms.getResourceManager().getResourceType(typeName)));
            window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_RESOURCETYPE_EDIT_WINDOW_CAPTION_0));
            A_CmsUI.get().addWindow(window);
        } catch (CmsLoaderException e) {
            LOG.error("Unable to read resource type by name", e);
        }
    }