Create and display FontDialogSwing Dialog.
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);
        }
    }
1125764
private static Font lookupDefaultDialogFont() {
        Font buttonFont = UIManager.getFont("Button.font");
        return buttonFont != null
                ? buttonFont
                : new JButton().getFont();
    }
249853
public static FontItem create(final FontParams fontParams) {
        // Ensure that the uid will be unique at runtime
        return FontItemImpl.create().uid(fontIdGenerator.incrementAndGet()).set(fontParams);
    }
856946
def OnFont(self, event):
        """"""

        font_data = wx.FontData()

        # Disable color chooser on Windows
        font_data.EnableEffects(False)

        if self.chosen_font:
            font_data.SetInitialFont(self.chosen_font)

        dlg = wx.FontDialog(self, font_data)

        if dlg.ShowModal() == wx.ID_OK:
            font_data = dlg.GetFontData()

            font = self.chosen_font = font_data.GetChosenFont()

            self.font_face = font.GetFaceName()
            self.font_size = font.GetPointSize()
            self.font_style = font.GetStyle()
            self.font_weight = font.GetWeight()

        dlg.Destroy()

        post_command_event(self, self.DrawChartMsg)
953519
function() {
        var ctx = this._drawContext;
        ctx.font = this._fontString();
        this.w = ctx.measureText(this._text).width;

        var size = this._textFont.size || this.defaultSize;
        this.h = 1.1 * this._getFontHeight(size);

        /* Offset the MBR for text alignment*/
        if (this._textAlign === "left" || this._textAlign === "start") {
            this.offsetBoundary(0, 0, 0, 0);
        } else if (this._textAlign === "center") {
            this.offsetBoundary(this.w / 2, 0, -this.w / 2, 0);
        } else if (this._textAlign === "end" || this._textAlign === "right") {
            this.offsetBoundary(this.w, 0, -this.w, 0);
        }
    }
480628
function (templateCtxt, xpos, ypos) {

                // bridge is open -> inspector will handle this as well
                var bridge = aria.tools.ToolsBridge;
                if (bridge && bridge.isOpen) {
                    bridge.$raiseEvent({
                        name : "forwardEvent",
                        event : {
                            name : "ContextualTargetFound",
                            templateCtxt : templateCtxt
                        }
                    });
                }

                if (this._popup) {
                    return;
                }

                var popup = new ariaPopupsPopup();
                this._popup = popup;

                popup.$on({
                    "onAfterClose" : this._afterClose,
                    scope : this
                });

                // create a section on the founded template context
                var section = templateCtxt.createSection({
                    fn : function (out) {
                        var tplWidget = new ariaWidgetsTemplate({
                            defaultTemplate : this._appEnvCfg.template,
                            moduleCtrl : {
                                classpath : this._appEnvCfg.moduleCtrl,
                                initArgs : {
                                    templateCtxt : templateCtxt.$interface("aria.templates.ITemplateCtxt"),
                                    driver : this.$interface("aria.tools.contextual.IContextualMenu")
                                }
                            }
                        }, templateCtxt, "NOLINE");
                        out.registerBehavior(tplWidget);
                        tplWidget.writeMarkup(out);
                    },
                    scope : this
                });

                popup.open({
                    section : section,
                    absolutePosition : {
                        top : ypos,
                        left : xpos
                    },
                    modal : true,
                    maskCssClass : "xDialogMask" /* uses the css class from the AriaSkin */,
                    preferredPositions : [{
                                reference : "bottom left",
                                popup : "top left"
                            }, {
                                reference : "bottom left",
                                popup : "top right"
                            }],
                    offset : {
                        top : 0,
                        left : 0
                    },
                    closeOnMouseClick : true,
                    closeOnMouseScroll : true
                });

                this.targetTemplateCtxt = templateCtxt;

            }
132331
def showMessageDialog(title, text):
    '''
    
    '''
    dlg = QgsMessageOutput.createMessageOutput()
    dlg.setTitle(title)
    dlg.setMessage(text, QgsMessageOutput.MessageHtml)
    dlg.showMessage()
581256
function() {
			// Insert the dialog's element to the root document.
			var element = this._.element;
			var definition = this.definition;
			if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) )
				element.appendTo( CKEDITOR.document.getBody() );
			else
				element.setStyle( 'display', 'block' );

			// First, set the dialog to an appropriate size.
			this.resize( this._.contentSize && this._.contentSize.width || definition.width || definition.minWidth, this._.contentSize && this._.contentSize.height || definition.height || definition.minHeight );

			// Reset all inputs back to their default value.
			this.reset();

			// Select the first tab by default.
			this.selectPage( this.definition.contents[ 0 ].id );

			// Set z-index.
			if ( CKEDITOR.dialog._.currentZIndex === null )
				CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex;
			this._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 );

			// Maintain the dialog ordering and dialog cover.
			if ( CKEDITOR.dialog._.currentTop === null ) {
				CKEDITOR.dialog._.currentTop = this;
				this._.parentDialog = null;
				showCover( this._.editor );

			} else {
				this._.parentDialog = CKEDITOR.dialog._.currentTop;
				var parentElement = this._.parentDialog.getElement().getFirst();
				parentElement.$.style.zIndex -= Math.floor( this._.editor.config.baseFloatZIndex / 2 );
				CKEDITOR.dialog._.currentTop = this;
			}

			element.on( 'keydown', accessKeyDownHandler );
			element.on( 'keyup', accessKeyUpHandler );

			// Reset the hasFocus state.
			this._.hasFocus = false;

			for ( var i in definition.contents ) {
				if ( !definition.contents[ i ] )
					continue;

				var content = definition.contents[ i ],
					tab = this._.tabs[ content.id ],
					requiredContent = content.requiredContent,
					enableElements = 0;

				if ( !tab )
					continue;

				for ( var j in this._.contents[ content.id ] ) {
					var elem = this._.contents[ content.id ][ j ];

					if ( elem.type == 'hbox' || elem.type == 'vbox' || !elem.getInputElement() )
						continue;

					if ( elem.requiredContent && !this._.editor.activeFilter.check( elem.requiredContent ) )
						elem.disable();
					else {
						elem.enable();
						enableElements++;
					}
				}

				if ( !enableElements || ( requiredContent && !this._.editor.activeFilter.check( requiredContent ) ) )
					tab[ 0 ].addClass( 'cke_dialog_tab_disabled' );
				else
					tab[ 0 ].removeClass( 'cke_dialog_tab_disabled' );
			}

			CKEDITOR.tools.setTimeout( function() {
				this.layout();
				resizeWithWindow( this );

				this.parts.dialog.setStyle( 'visibility', '' );

				// Execute onLoad for the first show.
				this.fireOnce( 'load', {} );
				CKEDITOR.ui.fire( 'ready', this );

				this.fire( 'show', {} );
				this._.editor.fire( 'dialogShow', this );

				if ( !this._.parentDialog )
					this._.editor.focusManager.lock();

				// Save the initial values of the dialog.
				this.foreach( function( contentObj ) {
					contentObj.setInitValue && contentObj.setInitValue();
				} );

			}, 100, this );
		}
337886
public <D extends Dialog> void setTypeface(D dialog, String typefaceName) {
		setTypeface(dialog, typefaceName, 0);
	}
1163399
function ()
        {
            // Create the DIV if necessary
            // Jan 2012- Changed so that the dialog is ALWAYS (re)created
            if (!ModalDialog.dialog || true) {
                ModalDialog.dialog = document.createElement('DIV');
        
                ModalDialog.dialog.id        = 'ModalDialog_dialog';
                ModalDialog.dialog.className = 'ModalDialog_dialog';
    
                var borderRadius = '15px';
    
                ModalDialog.dialog.style.borderRadius       = borderRadius;
                ModalDialog.dialog.style.MozBorderRadius    = borderRadius;
                ModalDialog.dialog.style.WebkitBorderRadius = borderRadius;
    
                ModalDialog.dialog.style.boxShadow    = '3px 3px 3px rgba(96,96,96,0.5)';
                ModalDialog.dialog.style.MozBoxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
                ModalDialog.dialog.style.WebkitBoxShadow = 'rgba(96,96,96,0.5) 3px 3px 3px';
    
                ModalDialog.dialog.style.position        = 'fixed';
                ModalDialog.dialog.style.backgroundColor = 'white';
                ModalDialog.dialog.style.width           = parseInt(ModalDialog.width) + 'px';
                ModalDialog.dialog.style.border          = '2px solid #999';
                ModalDialog.dialog.style.zIndex          = 32767;
                ModalDialog.dialog.style.padding         = '5px';
                ModalDialog.dialog.style.paddingTop      = '25px';
                ModalDialog.dialog.style.opacity         = 0;
                
                if (document.all) {
                    ModalDialog.dialog.style.zIndex = 32767;
                }
    
    
    
                // Accomodate various browsers
                if (navigator.userAgent.indexOf('Opera') != -1) {
                    ModalDialog.dialog.style.paddingTop = '25px';
    
                } else if (navigator.userAgent.indexOf('MSIE') != -1) {
                    ModalDialog.dialog.style.paddingTop = '25px';
    
                } else if (navigator.userAgent.indexOf('Safari') != -1) {
                    ModalDialog.dialog.style.paddingTop = '25px';
                }
    
                document.body.appendChild(ModalDialog.dialog);
    
    
                // Now create the grey bar at the top of the dialog
                var bar = document.createElement('DIV');
                    bar.className = 'ModalDialog_topbar';
                    bar.style.top = 0;
                    bar.style.left = 0;
                    bar.style.width = '100%';//(ModalDialog.dialog.offsetWidth - 4) + 'px';
                    bar.style.height = '20px';
                    bar.style.backgroundColor = '#bbb';
                    bar.style.borderBottom = '2px solid #999';
                    //bar.style.zIndex    = 50000;
                    bar.style.position = 'absolute';
                    var borderRadius = '11px';
                    bar.style.WebkitBorderTopLeftRadius = borderRadius;
                    bar.style.WebkitBorderTopRightRadius = borderRadius;
                    bar.style.MozBorderRadiusTopleft = borderRadius;
                    bar.style.MozBorderRadiusTopright = borderRadius;
                    bar.style.borderTopRightRadius = borderRadius;
                    bar.style.borderTopLeftRadius = borderRadius;
                ModalDialog.dialog.appendChild(bar);
                
                // Add the content div
                var content = document.createElement('DIV');
                    //content.style.paddingTop = '20px';
                    content.style.width = '100%';
                    content.style.height = '100%';
                ModalDialog.dialog.appendChild(content);
    
                if (ModalDialog.id.toLowerCase().substring(0, 7) == 'string:') {
                    content.innerHTML = ModalDialog.id.substring(7);
                } else {
                    content.innerHTML = document.getElementById(ModalDialog.id).innerHTML;
                }
    
                // Now reposition the dialog in the center
                ModalDialog.dialog.style.left = (document.body.offsetWidth / 2) - (ModalDialog.dialog.offsetWidth / 2) + 'px';
                ModalDialog.dialog.style.top  = '30%';
            }
            
            // Show the dialog
            ModalDialog.dialog.style.visibility = 'visible';
            
            // A simple fade-in effect
            setTimeout('ModalDialog.dialog.style.opacity = 0.2', 50);
            setTimeout('ModalDialog.dialog.style.opacity = 0.4', 100);
            setTimeout('ModalDialog.dialog.style.opacity = 0.6', 150);
            setTimeout('ModalDialog.dialog.style.opacity = 0.8', 200);
            setTimeout('ModalDialog.dialog.style.opacity = 1', 250);
    
            setTimeout('ModalDialog.background.style.opacity = 0.1', 50);
            setTimeout('ModalDialog.background.style.opacity = 0.2', 100);
            setTimeout('ModalDialog.background.style.opacity = 0.3', 150);
            setTimeout('ModalDialog.background.style.opacity = 0.4', 200);
            setTimeout('ModalDialog.background.style.opacity = 0.5', 250);
        }
543266
protected void openDialog(String dialogTitle) {

        m_editorDialog.setCaption(dialogTitle);
        int contentHeight = m_dialogContent.getOffsetHeight();
        m_editorDialog.setMainContent(m_dialogContent);
        // position dialog and show it
        if (m_groupContainerPosition != null) {
            int lefthandSpace = m_groupContainerPosition.getLeft() - Window.getScrollLeft();
            int righthandSpace = (Window.getClientWidth() + Window.getScrollLeft())
                - (m_groupContainerPosition.getLeft() + m_groupContainerPosition.getWidth());
            int requiredWidth = CmsPopup.DEFAULT_WIDTH + 30;
            int left = m_groupContainerPosition.getLeft();
            if (requiredWidth > (righthandSpace + m_groupContainerPosition.getWidth())) {
                left = (Window.getClientWidth() + Window.getScrollLeft()) - requiredWidth;
            }
            if (left < Window.getScrollLeft()) {
                left = 0;
            }
            if (lefthandSpace > requiredWidth) {
                // place left of the group container if there is enough space
                m_editorDialog.setPopupPosition(
                    m_groupContainerPosition.getLeft() - requiredWidth,
                    m_groupContainerPosition.getTop() - 1);
            } else if ((m_groupContainerPosition.getTop() - Window.getScrollTop()) > (contentHeight
                + DIALOG_BASE_HEIGHT
                + 50)) {
                // else place above if there is enough space

                m_editorDialog.setPopupPosition(
                    left,
                    m_groupContainerPosition.getTop() - (contentHeight + DIALOG_BASE_HEIGHT));
            } else if (righthandSpace > requiredWidth) {
                // else on the right if there is enough space
                m_editorDialog.setPopupPosition(
                    m_groupContainerPosition.getLeft() + m_groupContainerPosition.getWidth() + 20,
                    m_groupContainerPosition.getTop() - 1);
            } else {
                // last resort, place below
                m_editorDialog.setPopupPosition(
                    left,
                    m_groupContainerPosition.getTop() + m_groupContainerPosition.getHeight() + 20);
            }
            m_editorDialog.show();
        } else {
            // should never happen
            m_editorDialog.center();
        }
        if (!m_controller.getData().isUseClassicEditor()) {
            for (Widget element : m_groupContainer) {
                if (element instanceof CmsContainerPageElementPanel) {
                    ((CmsContainerPageElementPanel)element).initInlineEditor(m_controller);
                }
            }
        }
    }
1362972
def setCurrentFont(self, font):
        
        self.blockSignals(True)
        self.editor().setCurrentFont(font)
        self.blockSignals(False)
        self.refreshUi()
1020590
function Dialog(editorUi, elt, w, h, modal, closable, onClose)
{
	var dx = 0;
	
	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
	{
		// Adds padding as a workaround for box model in older IE versions
		// This needs to match the total padding of geDialog in CSS
		dx = 80;
	}
	
	w += dx;
	h += dx;
	
	var w0 = w;
	var h0 = h;
	
	var dh = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
	var left = Math.max(1, Math.round((document.body.clientWidth - w - 64) / 2));
	var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));

	// Keeps window size inside available space
	if (!mxClient.IS_QUIRKS)
	{
		elt.style.maxHeight = '100%';
	}
	
	w = Math.min(w, document.body.scrollWidth - 64);
	
	if (h > dh - 64)
	{
		elt.style.overflowY = 'auto';
	}
	
	h = Math.min(h, dh - 64);
	
	// Increments zIndex to put subdialogs and background over existing dialogs and background
	if (editorUi.dialogs.length > 0)
	{
		this.zIndex += editorUi.dialogs.length * 2;
	}

	if (this.bg == null)
	{
		this.bg = editorUi.createDiv('background');
		this.bg.style.position = 'absolute';
		this.bg.style.background = 'white';
		this.bg.style.height = dh + 'px';
		this.bg.style.right = '0px';
		this.bg.style.zIndex = this.zIndex - 2;
		
		mxUtils.setOpacity(this.bg, this.bgOpacity);
		
		if (mxClient.IS_QUIRKS)
		{
			new mxDivResizer(this.bg);
		}
	}
	
	var origin = mxUtils.getDocumentScrollOrigin(document);
	this.bg.style.left = origin.x + 'px';
	this.bg.style.top = origin.y + 'px';
	left += origin.x;
	top += origin.y;

	if (modal)
	{
		document.body.appendChild(this.bg);
	}
	
	var div = editorUi.createDiv('geDialog');
	var pos = this.getPosition(left, top, w, h);
	left = pos.x;
	top = pos.y;
	
	div.style.width = w + 'px';
	div.style.height = h + 'px';
	div.style.left = left + 'px';
	div.style.top = top + 'px';
	div.style.zIndex = this.zIndex;
	
	div.appendChild(elt);
	document.body.appendChild(div);
	
	if (closable)
	{
		var img = document.createElement('img');

		img.setAttribute('src', Dialog.prototype.closeImage);
		img.setAttribute('title', mxResources.get('close'));
		img.className = 'geDialogClose';
		img.style.top = (top + 14) + 'px';
		img.style.left = (left + w + 38 - dx) + 'px';
		img.style.zIndex = this.zIndex;
		
		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
		{
			editorUi.hideDialog(true);
		}));
		
		document.body.appendChild(img);
		this.dialogImg = img;
		
		mxEvent.addGestureListeners(this.bg, null, null, mxUtils.bind(this, function(evt)
		{
			editorUi.hideDialog(true);
		}));
	}
	
	this.resizeListener = mxUtils.bind(this, function()
	{
		dh = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
		this.bg.style.height = dh + 'px';
		
		left = Math.max(1, Math.round((document.body.clientWidth - w - 64) / 2));
		top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
		w = Math.min(w0, document.body.scrollWidth - 64);
		h = Math.min(h0, dh - 64);
		
		var pos = this.getPosition(left, top, w, h);
		left = pos.x;
		top = pos.y;
		
		div.style.left = left + 'px';
		div.style.top = top + 'px';
		div.style.width = w + 'px';
		div.style.height = h + 'px';
		
		if (h0 > dh - 64)
		{
			elt.style.overflowY = 'auto';
		}
		else
		{
			elt.style.overflowY = '';
		}
		
		if (this.dialogImg != null)
		{
			this.dialogImg.style.top = (top + 14) + 'px';
			this.dialogImg.style.left = (left + w + 38 - dx) + 'px';
		}
	});
	
	mxEvent.addListener(window, 'resize', this.resizeListener);

	this.onDialogClose = onClose;
	this.container = div;
	
	editorUi.editor.fireEvent(new mxEventObject('showDialog'));
}
895170
function ( ) {
				_createDialog ( );
				
				// The dialog is displayed
				L.popup (
					{
						keepInView : true,
						closeButton : true,
						maxWidth : 600,
						className : 'PinEditDialog'
					}
				).setContent ( _MainDiv ).setLatLng( latlng ).openOn( Map );
				document.getElementById ( 'cyPinEditDialog-TextArea' ).focus ( );
			}
910308
protected void openDialog() {

        CmsCreateModelPageDialog dialog = new CmsCreateModelPageDialog(
            CmsSitemapView.getInstance().getController(),
            m_isModelGroup);
        dialog.center();
    }
738006
def OnCellFontBold(self, event):
        """"""

        with undo.group(_("Bold")):
            try:
                try:
                    weight = getattr(wx, event.weight[2:])

                except AttributeError:
                    msg = _("Weight {weight} unknown").format(
                            weight=event.weight)
                    raise ValueError(msg)

                self.grid.actions.set_attr("fontweight", weight)

            except AttributeError:
                self.grid.actions.toggle_attr("fontweight")

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        event.Skip()
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();
    }