Creates and shows an internal dialog with the specified title and
panel.
429757
public static JInternalDialog createDialog (
        JFrame frame, String title, JPanel content)
    {
        JInternalDialog dialog = new JInternalDialog(frame);
        dialog.setOpaque(false);
        if (title != null) {
            dialog.setTitle(title);
        }
        setContent(dialog, content);
        SwingUtil.centerComponent(frame, dialog);
        dialog.showDialog();
        return dialog;
    }
815018
def display_popup(self, title, content):
        
        assert isinstance(title, six.text_type)
        assert isinstance(content, six.text_type)

        self.popup_dialog.title = title
        self._popup_textarea.text = content
        self.client_state.display_popup = True
        get_app().layout.focus(self._popup_textarea)
46236
public static MessageBox showMessageBox(String title, String message) {
		return showMessageBox(title, SafeHtmlUtils.fromString(message), MessageStyleType.INFO);
	}
881904
function() {
			var parent = document.body;
			this.$frameParent = parent;
			this.$$modalExclusions = this.$$modalExclusions || [];
			var range = document.createRange();
			range.selectNode(parent);
			var frameFragment = range.createContextualFragment(this.CONTAINERTEMPLATE);
			parent.appendChild(frameFragment);
			this.$frame = parent.lastChild;
			this.$frame.tabIndex = -1;
			this.$frame.style.outline = "none";
//			this.handle = lib.addAutoDismiss([this.$frame], this.hide.bind(this));
			if (this.title) {
				lib.$(".dialogTitleText", this.$frame).appendChild(document.createTextNode(this.title)); //$NON-NLS-0$
				this.$frame.setAttribute("aria-label", this.title); //$NON-NLS-0$
			}
			this.$close = lib.$(".closeDialog", this.$frame);//$NON-NLS-0$
			this.$close.setAttribute("aria-label", containerMessages["Close"]); //$NON-NLS-0$
			var self = this;
			this.$close.addEventListener("click", function(event) { //$NON-NLS-0$
				self.hide();
			}, false);
						
			this.$parent = lib.$(".dialogContent", this.$frame); //$NON-NLS-0$
			range = document.createRange();
			range.selectNode(this.$parent);
			var contentFragment = range.createContextualFragment(this.TEMPLATE);
			if (this.messages) {
				lib.processTextNodes(contentFragment, this.messages);
			}
			this.$parent.appendChild(contentFragment);
			this.$buttonContainer = lib.$(".dialogButtons", this.$frame); //$NON-NLS-0$
			this._makeButtons();
			
			// hook key handlers.  This must be done after _makeButtons so that the default callback (if any)
			// is established.
			this.$frame.addEventListener("keydown", function (e) { //$NON-NLS-0$
				if(e.keyCode === lib.KEY.ESCAPE) {
					self.hide();
				} else if (e.keyCode === lib.KEY.ENTER && (typeof self._defaultCallback) === "function") { //$NON-NLS-0$
					self._defaultCallback();
				}
			}, false);
			
			this._bindElements(this.$parent);
			if (typeof this._bindToDom === "function") { //$NON-NLS-0$
				this._bindToDom(this.$parent);
			}
		}
622041
private void constructDialog() {
		if (getParentWindow() instanceof Frame) {
			dialog = new JDialog((Frame) getParentWindow(), getTitle(), modal);
		}
		else {
			dialog = new JDialog((Dialog) getParentWindow(), getTitle(), modal);
		}

		dialog.getContentPane().setLayout(new BorderLayout());
		dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
		dialog.setResizable(resizable);

		initStandardCommands();
		addCancelByEscapeKey();
	}
198732
public static function dialog($content, $title = '', $width = 'auto', $height = 'auto', $ajax = true) {
		if (is_array($content)) {
			$args          = $content;
			$args['title'] = $title;
			$args['area']  = $width . ',' . $height;
			$args['type']  = $ajax ? 'ajax' : 2;
		} else {
			$args = [
				'title'   => $title,
				'area'    => $width . ',' . $height,
				'type'    => $ajax ? 'ajax' : 2,
				'content' => $content
			];
		}

		return new JsonView(['code' => self::SUCCESS, 'args' => $args, 'action' => self::ACT_DIALOG], ['ajax' => '1']);
	}
116446
public static void showMessageDialog(Component parent, String msg,
                                         String title, int flags) {
        if (msg.length() > 60) {
            StringBuilder buf = new StringBuilder();
            int len = msg.length();
            int j = 0;
            int i;
            for (i = 0; i < len; i++, j++) {
                char c = msg.charAt(i);
                buf.append(c);
                if (Character.isWhitespace(c)) {
                    int k;
                    for (k = i + 1; k < len; k++) {
                        if (Character.isWhitespace(msg.charAt(k))) {
                            break;
                        }
                    }
                    if (k < len) {
                        int nextWordLen = k - i;
                        if (j + nextWordLen > 60) {
                            buf.append('\n');
                            j = 0;
                        }
                    }
                }
            }
            msg = buf.toString();
        }
        JOptionPane.showMessageDialog(parent, msg, title, flags);
    }
1071931
@Override
    public T showDialog(WindowBasedTextGUI textGUI) {
        result = null;
        super.showDialog(textGUI);
        return result;
    }
494089
private LayoutManager createLayout() {
        SeaGlassContext context = getContext(this);
        LayoutManager   lm      = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");

        context.dispose();

        return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
    }
293192
def _get_dialog_title(self):
        """"""

        title_filetype = self.filetype[0].upper() + self.filetype[1:]

        if self.filetype == "print":
            title_export = ""
        else:
            title_export = " export"

        return _("{filetype}{export} options").format(filetype=title_filetype,
                                                      export=title_export)
1088637
protected void buildAndShowDialog(@Nullable Bundle savedInstanceState) {
        final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
        final String title = dialogConfiguration.title();
        if (title != null) {
            dialogBuilder.setTitle(title);
        }
        final int iconResourceId = dialogConfiguration.resIcon();
        if (iconResourceId != ACRAConstants.DEFAULT_RES_VALUE) {
            dialogBuilder.setIcon(iconResourceId);
        }
        dialogBuilder.setView(buildCustomView(savedInstanceState))
                .setPositiveButton(dialogConfiguration.positiveButtonText(), this)
                .setNegativeButton(dialogConfiguration.negativeButtonText(), this);

        mDialog = dialogBuilder.create();
        mDialog.setCanceledOnTouchOutside(false);
        mDialog.show();
    }
1260812
public Dialog title(CharSequence title){
        mTitle.setText(title);
        mTitle.setVisibility(TextUtils.isEmpty(title) ? View.GONE : View.VISIBLE);
        return this;
    }
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));
                    }
                }
            }
        });
    }
850203
public static String createDialogTitle(String appName, String dialogName) {
        if (appName != null) {
            StringBuffer buf = new StringBuffer(appName);
            buf.append(": ");
            buf.append(dialogName);
            return buf.toString();
        }

        return dialogName;
    }
585336
function(title, message) {
            if (!message) {
                message = title;
                title = null;
            }

            return Dialogs.open(null, {
                "title": title,
                "message": message,
                "dialog": "confirm"
            });
        }
975749
public static PopupPanel newPopup (String styleName, Widget contents,
                                       Position pos, Widget target)
    {
        PopupPanel panel = newPopup(styleName, contents);
        show(panel, pos, target);
        return panel;
    }
745832
private WPanel createPanelWithText(final String title, final String text) {
		WPanel panel = new WPanel(WPanel.Type.CHROME);
		panel.setTitleText(title);
		WText textComponent = new WText(text);
		textComponent.setEncodeText(false);
		panel.add(textComponent);

		return panel;
	}