Adapts the padding of the dialog.
352207
private void adaptPadding() {
        ViewGroup dialogRootView = getRootView();

        if (dialogRootView != null) {
            dialogRootView.setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(),
                    getPaddingBottom());
        }
    }
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();
	}
1300042
private void adaptMessageTextSize() {
        if (getRootView() != null) {
            View messageView = getRootView().findViewById(android.R.id.message);

            if (messageView instanceof TextView) {
                TextView messageTextView = (TextView) messageView;

                if (TextUtils.isEmpty(getDialog().getTitle())) {
                    messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                            getContext().getResources()
                                    .getDimensionPixelSize(R.dimen.dialog_message_text_size_large));
                } else {
                    messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                            getContext().getResources().getDimensionPixelSize(
                                    R.dimen.dialog_message_text_size_normal));
                }
            }
        }
    }
632018
def adjustText(self):
        
        pos = self.cursorPosition()
        self.blockSignals(True)
        super(XLineEdit, self).setText(self.formatText(self.text()))
        self.setCursorPosition(pos)
        self.blockSignals(False)
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 );
		}
1235235
private void resize() {
        double width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        double height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size          = width < height ? width : height;

        if (size > 0) {
            pane.setMaxSize(size, size);
            pane.relocate((getWidth() - size) * 0.5, (getHeight() - size) * 0.5);
            pane.setBackground(new Background(new BackgroundFill(getChartBackgroundColor(), new CornerRadii(1024), Insets.EMPTY)));

            chartCanvas.setWidth(size);
            chartCanvas.setHeight(size);

            overlayCanvas.setWidth(size);
            overlayCanvas.setHeight(size);

            redraw();
        }
    }
1313540
def setPadding(self, pad):
		""""""
		if pad is not None:
			pad = self._guardAgainstUnicode(pad)
		self._padding = pad
1171313
protected void adjustContentSize() {

        if (m_isFrame && m_isShowing) {
            if (m_buttonPanel != null) {
                m_contentPanel.getElement().getStyle().setBottom(m_buttonPanel.getOffsetHeight() + 6, Unit.PX);
            } else {
                m_contentPanel.getElement().getStyle().clearBottom();
            }
        }
    }
1365133
private void adaptButtonBarContainerVisibility() {
        if (buttonBarContainer != null) {
            if (TextUtils.isEmpty(positiveButtonText) && TextUtils.isEmpty(neutralButtonText) &&
                    TextUtils.isEmpty(negativeButtonText)) {
                buttonBarContainer.setVisibility(View.GONE);
            } else {
                buttonBarContainer.setVisibility(View.VISIBLE);
            }
        }
    }
579392
public void adjustColumnSizing() {
        JsDataTable.adjustColumnSizing(getElement());
        Element sb = findUpperElement(SCROLL_BODY);
        if (sb != null) sb.setScrollLeft(0);
    }
568047
private void adaptTabLayoutEnableState() {
        if (tabLayout != null) {
            LinearLayout tabStrip = ((LinearLayout) tabLayout.getChildAt(0));
            tabStrip.setEnabled(tabLayoutEnabled);

            for (int i = 0; i < tabStrip.getChildCount(); i++) {
                tabStrip.getChildAt(i).setEnabled(tabLayoutEnabled);
            }
        }
    }
975538
private void adaptFinishButton() {
        if (finishButton != null) {
            finishButton.setText(finishButtonText.toString().toUpperCase(Locale.getDefault()));
            finishButton.setOnClickListener(createFinishButtonListener());
        }
    }
785945
def OnResizeGridDialog(self, event):
        """"""

        # Get grid dimensions

        new_shape = self.interfaces.get_dimensions_from_user(no_dim=3)

        if new_shape is None:
            return

        with undo.group(_("Resize grid")):
            self.grid.actions.change_grid_shape(new_shape)

        statustext = _("Grid dimensions changed to {shape}.")
        statustext = statustext.format(shape=new_shape)
        post_command_event(self.grid.main_window, self.grid.StatusBarMsg,
                           text=statustext)

        event.Skip()
940067
private void adaptRootView() {
        if (rootView != null) {
            if (getStyle() == Style.LIST) {
                int paddingTop = getContext().getResources()
                        .getDimensionPixelSize(R.dimen.bottom_sheet_list_padding_top);
                rootView.setPadding(0, paddingTop, 0, 0);
            } else {
                int paddingTop = getContext().getResources()
                        .getDimensionPixelSize(R.dimen.bottom_sheet_grid_padding_top);
                rootView.setPadding(0, paddingTop, 0, 0);
            }
        }
    }
978267
def resizeEvent(self, event):
        
        super(XTabWidget, self).resizeEvent(event)
        self.adjustButtons()
1195649
def set_dialog_position(self):
        """"""
        left = self.editor.geometry().width()/2 - self.width()/2
        top = self.editor.tabs.tabBar().geometry().height()

        self.move(self.editor.mapToGlobal(QPoint(left, top)))
1073701
private void adaptIcon() {
        if (titleTextView != null) {
            titleTextView.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
        }

        adaptTitleContainerVisibility();
    }