mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline superclass: fix layout (IDEA-152474)
This commit is contained in:
+5
-2
@@ -74,6 +74,7 @@ public class InlineSuperClassRefactoringDialog extends InlineOptionsDialog {
|
||||
return "Inline_Super_Class";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected JComponent createCenterPanel() {
|
||||
final JLabel label = new JLabel("<html>Super class \'" +
|
||||
mySuperClass.getQualifiedName() +
|
||||
@@ -85,6 +86,7 @@ public class InlineSuperClassRefactoringDialog extends InlineOptionsDialog {
|
||||
}
|
||||
}, "\',<br> \'") +
|
||||
"\'</html>");
|
||||
label.setVerticalAlignment(SwingConstants.TOP);
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gc =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
@@ -93,10 +95,11 @@ public class InlineSuperClassRefactoringDialog extends InlineOptionsDialog {
|
||||
JScrollPane pane = ScrollPaneFactory.createScrollPane(label);
|
||||
pane.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
pane.setMinimumSize(JBDimension.create(new Dimension(-1, 100)));
|
||||
pane.setMaximumSize(JBDimension.create(new Dimension(-1, 400)));
|
||||
panel.add(pane, gc);
|
||||
gc.weighty = 1;
|
||||
gc.fill = GridBagConstraints.BOTH;
|
||||
panel.add(pane, gc);
|
||||
gc.weighty = 0;
|
||||
gc.fill = GridBagConstraints.HORIZONTAL;
|
||||
panel.add(super.createCenterPanel(), gc);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.psi.search.PsiSearchHelper;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.refactoring.ui.RefactoringDialog;
|
||||
import com.intellij.refactoring.util.RadioUpDownListener;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
@@ -53,6 +54,7 @@ public abstract class InlineOptionsDialog extends RefactoringDialog implements I
|
||||
return myRbInlineThisOnly.isSelected();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected JComponent createCenterPanel() {
|
||||
JPanel optionsPanel = new JPanel();
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ package com.intellij.refactoring.inline;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -63,6 +64,7 @@ public abstract class InlineOptionsWithSearchSettingsDialog extends InlineOption
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected JComponent createCenterPanel() {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
|
||||
Reference in New Issue
Block a user