Search in sources :

Example 1 with DialogWrapperPeer

use of com.intellij.openapi.ui.DialogWrapperPeer in project intellij-community by JetBrains.

the class PyMoveModuleMembersDialog method enlargeDialogHeightIfNecessary.

private void enlargeDialogHeightIfNecessary() {
    if (mySeveralElementsSelected && !PropertiesComponent.getInstance(getProject()).getBoolean(BULK_MOVE_TABLE_VISIBLE)) {
        final DialogWrapperPeer peer = getPeer();
        final Dimension realSize = peer.getSize();
        final double preferredHeight = peer.getPreferredSize().getHeight();
        if (realSize.getHeight() < preferredHeight) {
            peer.setSize((int) realSize.getWidth(), (int) preferredHeight);
        }
    }
}
Also used : DialogWrapperPeer(com.intellij.openapi.ui.DialogWrapperPeer)

Example 2 with DialogWrapperPeer

use of com.intellij.openapi.ui.DialogWrapperPeer in project intellij-community by JetBrains.

the class AbstractNewProjectDialog method init.

@Override
protected void init() {
    super.init();
    DialogWrapperPeer peer = getPeer();
    JRootPane pane = peer.getRootPane();
    if (pane != null) {
        JBDimension size = JBUI.size(FlatWelcomeFrame.MAX_DEFAUL_WIDTH, FlatWelcomeFrame.DEFAULT_HEIGHT);
        pane.setMinimumSize(size);
        pane.setPreferredSize(size);
    }
}
Also used : DialogWrapperPeer(com.intellij.openapi.ui.DialogWrapperPeer) JBDimension(com.intellij.util.ui.JBDimension)

Aggregations

DialogWrapperPeer (com.intellij.openapi.ui.DialogWrapperPeer)2 JBDimension (com.intellij.util.ui.JBDimension)1