mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
ui cleanup
This commit is contained in:
+17
-9
@@ -45,6 +45,7 @@ import com.intellij.refactoring.introduceVariable.VariableInplaceIntroducer;
|
||||
import com.intellij.refactoring.rename.inplace.VariableInplaceRenamer;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
|
||||
import com.intellij.ui.TitlePanel;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import gnu.trove.TIntArrayList;
|
||||
@@ -107,10 +108,16 @@ class InplaceIntroduceParameterPopup extends IntroduceParameterSettingsUI {
|
||||
myExprText = myExpr != null ? myExpr.getText() : null;
|
||||
|
||||
myWholePanel = new JPanel(new GridBagLayout());
|
||||
myWholePanel.setBorder(BorderFactory.createTitledBorder(IntroduceParameterHandler.REFACTORING_NAME));
|
||||
myWholePanel.setBorder(null);
|
||||
final GridBagConstraints gc =
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0);
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
|
||||
|
||||
final TitlePanel titlePanel = new TitlePanel();
|
||||
titlePanel.setBorder(null);
|
||||
titlePanel.setText(IntroduceParameterHandler.REFACTORING_NAME);
|
||||
myWholePanel.add(titlePanel, gc);
|
||||
|
||||
gc.insets = new Insets(5, 5, 5, 0);
|
||||
if (myOccurrences.length > 1 && !myIsInvokedOnDeclaration) {
|
||||
gc.gridy++;
|
||||
createOccurrencesCb(gc, myWholePanel, myOccurrences.length);
|
||||
@@ -395,13 +402,14 @@ class InplaceIntroduceParameterPopup extends IntroduceParameterSettingsUI {
|
||||
|
||||
private void showBalloon() {
|
||||
final BalloonBuilder balloonBuilder = JBPopupFactory.getInstance().createBalloonBuilder(myWholePanel);
|
||||
balloonBuilder.setFadeoutTime(0);
|
||||
balloonBuilder.setFillColor(IdeTooltipManager.GRAPHITE_COLOR);
|
||||
balloonBuilder.setAnimationCycle(0);
|
||||
balloonBuilder.setHideOnClickOutside(false);
|
||||
balloonBuilder.setHideOnKeyOutside(false);
|
||||
balloonBuilder.setHideOnAction(false);
|
||||
balloonBuilder.setCloseButtonEnabled(true);
|
||||
balloonBuilder.setFadeoutTime(0)
|
||||
.setFillColor(IdeTooltipManager.GRAPHITE_COLOR)
|
||||
.setAnimationCycle(0)
|
||||
.setHideOnClickOutside(false)
|
||||
.setHideOnKeyOutside(false)
|
||||
.setHideOnAction(false)
|
||||
.setCloseButtonEnabled(true);
|
||||
|
||||
final RelativePoint target = JBPopupFactory.getInstance().guessBestPopupLocation(myEditor);
|
||||
final Point screenPoint = target.getScreenPoint();
|
||||
myBalloon = balloonBuilder.createBalloon();
|
||||
|
||||
+3
-2
@@ -171,7 +171,6 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase implements R
|
||||
final List<PsiMethod> validEnclosingMethods,
|
||||
final Introducer introducer) {
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.setBorder(IdeBorderFactory.createRoundedBorder());
|
||||
final JCheckBox superMethod = new JCheckBox("Choose base method", true);
|
||||
superMethod.setMnemonic('b');
|
||||
panel.add(superMethod, BorderLayout.SOUTH);
|
||||
@@ -191,7 +190,9 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase implements R
|
||||
}
|
||||
});
|
||||
updateView(validEnclosingMethods.get(0), editor, attributes, highlighters, superMethod);
|
||||
panel.add(ScrollPaneFactory.createScrollPane(list), BorderLayout.CENTER);
|
||||
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(list);
|
||||
scrollPane.setBorder(null);
|
||||
panel.add(scrollPane, BorderLayout.CENTER);
|
||||
|
||||
final List<Pair<ActionListener, KeyStroke>>
|
||||
keyboardActions = Collections.singletonList(Pair.<ActionListener, KeyStroke>create(new ActionListener() {
|
||||
|
||||
Reference in New Issue
Block a user