mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
module java-impl: dpi-aware insets
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,18 +16,17 @@
|
||||
package com.intellij.application.options;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationBundle;
|
||||
import com.intellij.openapi.ui.ex.MultiLineLabel;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.PackageEntry;
|
||||
import com.intellij.psi.codeStyle.PackageEntryTable;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.OptionGroup;
|
||||
import com.intellij.ui.TableUtil;
|
||||
import com.intellij.ui.table.JBTable;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
public class CodeStyleImportsPanel extends JPanel {
|
||||
private JCheckBox myCbUseFQClassNames;
|
||||
@@ -92,16 +91,16 @@ public class CodeStyleImportsPanel extends JPanel {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
panel.add(new JLabel(ApplicationBundle.message("editbox.class.count.to.use.import.with.star")),
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 3, 0, 0), 0, 0));
|
||||
JBUI.insetsLeft(3), 0, 0));
|
||||
panel.add(myClassCountField,
|
||||
new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 1, 0, 0), 0, 0));
|
||||
JBUI.insetsLeft(1), 0, 0));
|
||||
panel.add(new JLabel(ApplicationBundle.message("editbox.names.count.to.use.static.import.with.star")),
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 3, 0, 0), 0, 0));
|
||||
JBUI.insetsLeft(3), 0, 0));
|
||||
panel.add(myNamesCountField,
|
||||
new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 1, 0, 0), 0, 0));
|
||||
JBUI.insetsLeft(1), 0, 0));
|
||||
|
||||
group.add(panel);
|
||||
return group.createPanel();
|
||||
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,15 +20,13 @@ import com.intellij.openapi.ui.ComboBox;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleSettings;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import static com.intellij.psi.codeStyle.JavaCodeStyleSettings.FULLY_QUALIFY_NAMES_ALWAYS;
|
||||
import static com.intellij.psi.codeStyle.JavaCodeStyleSettings.FULLY_QUALIFY_NAMES_IF_NOT_IMPORTED;
|
||||
import static com.intellij.psi.codeStyle.JavaCodeStyleSettings.SHORTEN_NAMES_ALWAYS_AND_ADD_IMPORT;
|
||||
import static com.intellij.psi.codeStyle.JavaCodeStyleSettings.*;
|
||||
|
||||
public class FullyQualifiedNamesInJavadocOptionProvider {
|
||||
|
||||
@@ -91,7 +89,7 @@ public class FullyQualifiedNamesInJavadocOptionProvider {
|
||||
GridBagConstraints right = new GridBagConstraints();
|
||||
right.anchor = GridBagConstraints.WEST;
|
||||
right.weightx = 1.0;
|
||||
right.insets = new Insets(0, 5, 0, 0);
|
||||
right.insets = JBUI.insetsLeft(5);
|
||||
|
||||
myPanel.add(title, left);
|
||||
myPanel.add(myComboBox, right);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,7 @@ import com.intellij.ui.*;
|
||||
import com.intellij.ui.components.JBCheckBox;
|
||||
import com.intellij.ui.table.JBTable;
|
||||
import com.intellij.util.IconUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -63,7 +64,7 @@ public abstract class ImportLayoutPanel extends JPanel {
|
||||
|
||||
public ImportLayoutPanel() {
|
||||
super(new BorderLayout());
|
||||
setBorder(IdeBorderFactory.createTitledBorder(ApplicationBundle.message("title.import.layout"), false, new Insets(0, 0, 0, 0)));
|
||||
setBorder(IdeBorderFactory.createTitledBorder(ApplicationBundle.message("title.import.layout"), false, JBUI.emptyInsets()));
|
||||
|
||||
myCbLayoutStaticImportsSeparately.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,6 @@ import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Pass;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.JavaPsiFacade;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.psi.PsiNameHelper;
|
||||
@@ -47,6 +46,7 @@ import com.intellij.ui.RecentsManager;
|
||||
import com.intellij.ui.ReferenceEditorComboWithBrowseButton;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -148,7 +148,7 @@ public class CreateClassDialog extends DialogWrapper {
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
gbConstraints.anchor = GridBagConstraints.WEST;
|
||||
|
||||
@@ -156,7 +156,7 @@ public class CreateClassDialog extends DialogWrapper {
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.gridwidth = 1;
|
||||
panel.add(myInformationLabel, gbConstraints);
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.gridx = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridwidth = 1;
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ public class CreateFieldFromParameterDialog extends DialogWrapper {
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.gridx = 0;
|
||||
gbConstraints.gridy = 0;
|
||||
gbConstraints.insets = new Insets(0, 0, 0, 0);
|
||||
gbConstraints.insets = JBUI.emptyInsets();
|
||||
|
||||
myCbFinal = new JCheckBox(CodeInsightBundle.message("dialog.create.field.from.parameter.declare.final.checkbox"));
|
||||
if (myFieldMayBeFinal) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,7 @@ import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.refactoring.util.RefactoringUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.siyeh.ig.fixes.IntroduceVariableFix;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -137,7 +138,7 @@ public class DataFlowInspection extends DataFlowInspectionBase {
|
||||
}
|
||||
});
|
||||
|
||||
gc.insets = new Insets(0, 0, 0, 0);
|
||||
gc.insets = JBUI.emptyInsets();
|
||||
gc.gridy = 0;
|
||||
add(mySuggestNullables, gc);
|
||||
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@ import com.intellij.codeInspection.reference.EntryPoint;
|
||||
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
|
||||
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspectionBase;
|
||||
import com.intellij.ui.components.JBTabbedPane;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -61,7 +62,7 @@ public class UnusedDeclarationInspection extends UnusedDeclarationInspectionBase
|
||||
GridBagConstraints gc = new GridBagConstraints();
|
||||
gc.weightx = 1;
|
||||
gc.weighty = 0;
|
||||
gc.insets = new Insets(0, 20, 2, 0);
|
||||
gc.insets = JBUI.insets(0, 20, 2, 0);
|
||||
gc.fill = GridBagConstraints.HORIZONTAL;
|
||||
gc.anchor = GridBagConstraints.NORTHWEST;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class JavaDocLocalInspection extends JavaDocLocalInspectionBase {
|
||||
super(new GridBagLayout());
|
||||
GridBagConstraints gc =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
|
||||
String title = InspectionsBundle.message("inspection.javadoc.dialog.title");
|
||||
FieldPanel additionalTagsPanel = new FieldPanel(InspectionsBundle.message("inspection.javadoc.label.text"), title, null, null);
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,6 +19,7 @@ package com.intellij.codeInspection.uncheckedWarnings;
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.GenerifyFileFix;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.openapi.util.Pass;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -37,7 +38,8 @@ public class UncheckedWarningLocalInspection extends UncheckedWarningLocalInspec
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0);
|
||||
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
|
||||
panel.add(createSetting("Ignore unchecked assignment", IGNORE_UNCHECKED_ASSIGNMENT, new Pass<JCheckBox>() {
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -44,6 +44,7 @@ import com.intellij.psi.util.PsiModificationTracker;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.refactoring.changeSignature.ChangeSignatureProcessor;
|
||||
import com.intellij.refactoring.changeSignature.ParameterInfoImpl;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -236,7 +237,7 @@ public class UnusedParametersInspection extends GlobalJavaBatchInspectionTool {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
panel.add(EntryPointsManagerImpl.createConfigureAnnotationsButton(),
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 0, 0, 0), 0, 0));
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.impl.search.ThrowSearchUtil;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.StateRestoringCheckBox;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -60,7 +61,7 @@ public class FindThrowUsagesDialog extends JavaFindUsagesDialog<JavaThrowFindUsa
|
||||
final JComponent panel = new JPanel(new GridBagLayout());
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
|
||||
gbConstraints.insets = new Insets(0, 0, UIUtil.DEFAULT_VGAP, 0);
|
||||
gbConstraints.insets = JBUI.insetsBottom(UIUtil.DEFAULT_VGAP);
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.weighty = 1;
|
||||
|
||||
+7
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,8 +54,12 @@ import com.intellij.ui.*;
|
||||
import com.intellij.ui.table.JBTable;
|
||||
import com.intellij.ui.table.TableView;
|
||||
import com.intellij.ui.treeStructure.Tree;
|
||||
import com.intellij.util.*;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.TextFieldCompletionProvider;
|
||||
import com.intellij.util.VisibilityUtil;
|
||||
import com.intellij.util.ui.DialogUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.table.EditorTextFieldJBTableRowRenderer;
|
||||
import com.intellij.util.ui.table.JBTableRow;
|
||||
@@ -327,7 +331,7 @@ public class JavaChangeSignatureDialog extends ChangeSignatureDialogBase<Paramet
|
||||
});
|
||||
final JPanel anyVarPanel = new JPanel(new BorderLayout());
|
||||
anyVarPanel.add(myAnyVar, BorderLayout.SOUTH);
|
||||
UIUtil.addInsets(anyVarPanel, new Insets(0,0,8,0));
|
||||
UIUtil.addInsets(anyVarPanel, JBUI.insetsBottom(8));
|
||||
additionalPanel.add(anyVarPanel, BorderLayout.CENTER);
|
||||
//additionalPanel.setPreferredSize(new Dimension(t.getWidth() / 3, -1));
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,6 +43,7 @@ import com.intellij.refactoring.util.duplicates.Match;
|
||||
import com.intellij.refactoring.util.duplicates.MethodDuplicatesHandler;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.text.UniqueNameGenerator;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.THashSet;
|
||||
import gnu.trove.TObjectHashingStrategy;
|
||||
@@ -418,7 +419,7 @@ public class ExtractMethodSignatureSuggester {
|
||||
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.add(diffPanel.getComponent(), BorderLayout.CENTER);
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(new Insets(5, 0, 0, 0)));
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(JBUI.insetsTop(5)));
|
||||
return panel;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import com.intellij.refactoring.ui.NameSuggestionsField;
|
||||
import com.intellij.refactoring.ui.RefactoringDialog;
|
||||
import com.intellij.refactoring.util.classMembers.InterfaceMemberDependencyGraph;
|
||||
import com.intellij.refactoring.util.classMembers.MemberInfo;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -167,7 +168,7 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
gbc.gridx = 0;
|
||||
|
||||
|
||||
gbc.insets = new Insets(4, 0, 0, 8);
|
||||
gbc.insets = JBUI.insets(4, 0, 0, 8);
|
||||
myClassCombo = new JComboBox(mySuperClasses);
|
||||
myClassCombo.setRenderer(new ClassCellRenderer(myClassCombo.getRenderer()));
|
||||
gbc.gridwidth = 2;
|
||||
@@ -182,14 +183,14 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
|
||||
gbc.gridy++;
|
||||
gbc.gridwidth = 1;
|
||||
gbc.insets = new Insets(4, 0, 4, 0);
|
||||
gbc.insets = JBUI.insets(4, 0);
|
||||
final JLabel fieldNameLabel = new JLabel();
|
||||
panel.add(fieldNameLabel, gbc);
|
||||
|
||||
myFieldNameField = new NameSuggestionsField(myProject);
|
||||
gbc.gridx++;
|
||||
gbc.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gbc.insets = new Insets(4, 0, 4, 8);
|
||||
gbc.insets = JBUI.insets(4, 0, 4, 8);
|
||||
gbc.weightx = 1.0;
|
||||
panel.add(myFieldNameField.getComponent(), gbc);
|
||||
fieldNameLabel.setText(RefactoringBundle.message("field.name"));
|
||||
@@ -198,7 +199,7 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy++;
|
||||
gbc.gridwidth = 1;
|
||||
gbc.insets = new Insets(4, 0, 4, 0);
|
||||
gbc.insets = JBUI.insets(4, 0);
|
||||
gbc.weightx = 0.0;
|
||||
final JLabel innerClassNameLabel = new JLabel();
|
||||
panel.add(innerClassNameLabel, gbc);
|
||||
@@ -210,7 +211,7 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
myInnerClassNameField = new NameSuggestionsField(myProject);
|
||||
gbc.gridx++;
|
||||
gbc.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gbc.insets = new Insets(4, 4, 4, 8);
|
||||
gbc.insets = JBUI.insets(4, 4, 4, 8);
|
||||
gbc.weightx = 1.0;
|
||||
panel.add(myInnerClassNameField.getComponent(), gbc);
|
||||
innerClassNameLabel.setText(RefactoringBundle.message("inner.class.name"));
|
||||
@@ -238,7 +239,7 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
|
||||
gbc.weighty = 1.0;
|
||||
gbc.gridwidth = 1;
|
||||
gbc.insets = new Insets(4, 0, 4, 4);
|
||||
gbc.insets = JBUI.insets(4, 0, 4, 4);
|
||||
|
||||
myMemberSelectionPanel = new MemberSelectionPanel(RefactoringBundle.message("delegate.members"), Collections.<MemberInfo>emptyList(), null);
|
||||
panel.add(myMemberSelectionPanel, gbc);
|
||||
@@ -248,7 +249,7 @@ public class InheritanceToDelegationDialog extends RefactoringDialog {
|
||||
|
||||
|
||||
gbc.gridy++;
|
||||
gbc.insets = new Insets(4, 8, 0, 8);
|
||||
gbc.insets = JBUI.insets(4, 8, 0, 8);
|
||||
gbc.weighty = 0.0;
|
||||
myCbGenerateGetter = new JCheckBox(RefactoringBundle.message("generate.getter.for.delegated.component"));
|
||||
myCbGenerateGetter.setFocusable(false);
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,6 +26,7 @@ import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.inline.InlineOptionsDialog;
|
||||
import com.intellij.refactoring.ui.DocCommentPanel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -72,7 +73,7 @@ public class InlineSuperClassRefactoringDialog extends InlineOptionsDialog {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gc =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
panel.add(myDocPanel, gc);
|
||||
panel.add(super.createCenterPanel(), gc);
|
||||
gc.weighty = 1;
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringActionHandler;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
|
||||
import com.intellij.refactoring.util.occurrences.OccurrenceManager;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -66,7 +67,7 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField
|
||||
|
||||
|
||||
GridBagConstraints gc =
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0);
|
||||
myWholePanel.add(getPreviewComponent(), gc);
|
||||
|
||||
gc.gridy = 1;
|
||||
@@ -92,7 +93,7 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField
|
||||
final JPanel right = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints rgc =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
myReplaceAllCb = new JCheckBox("Replace all occurrences");
|
||||
myReplaceAllCb.setMnemonic('a');
|
||||
myReplaceAllCb.setFocusable(false);
|
||||
@@ -109,7 +110,7 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField
|
||||
myMoveToAnotherClassCb.setMnemonic('m');
|
||||
myMoveToAnotherClassCb.setFocusable(false);
|
||||
left.add(myMoveToAnotherClassCb,
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0),
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(),
|
||||
0, 0));
|
||||
return left;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringActionHandler;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
|
||||
import com.intellij.refactoring.util.occurrences.OccurrenceManager;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -70,7 +71,7 @@ public class InplaceIntroduceFieldPopup extends AbstractInplaceIntroduceFieldPop
|
||||
|
||||
final GridBagConstraints constraints =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
myWholePanel.add(getPreviewComponent(), constraints);
|
||||
|
||||
final JComponent centerPanel = myIntroduceFieldPanel.createCenterPanel();
|
||||
|
||||
+5
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.NonFocusableCheckBox;
|
||||
import com.intellij.ui.StateRestoringCheckBox;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
@@ -225,7 +226,8 @@ public abstract class IntroduceFieldCentralPanel {
|
||||
}
|
||||
|
||||
protected JPanel appendCheckboxes(ItemListener itemListener) {
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0);
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
myCbFinal = new StateRestoringCheckBox();
|
||||
myCbFinal.setFocusable(false);
|
||||
@@ -238,7 +240,7 @@ public abstract class IntroduceFieldCentralPanel {
|
||||
if (myLocalVariable != null) {
|
||||
gbConstraints.gridy++;
|
||||
if (myCbReplaceAll != null) {
|
||||
gbConstraints.insets = new Insets(0, 8, 0, 0);
|
||||
gbConstraints.insets = JBUI.insetsLeft(8);
|
||||
}
|
||||
myCbDeleteVariable = new StateRestoringCheckBox();
|
||||
myCbDeleteVariable.setText(RefactoringBundle.message("delete.variable.declaration"));
|
||||
|
||||
+6
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import com.intellij.refactoring.ui.*;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.refactoring.util.RefactoringMessageUtil;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.update.Activatable;
|
||||
import com.intellij.util.ui.update.UiNotifyConnector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -140,7 +141,7 @@ class IntroduceFieldDialog extends DialogWrapper {
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 0);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 0);
|
||||
gbConstraints.anchor = GridBagConstraints.EAST;
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
|
||||
@@ -155,12 +156,12 @@ class IntroduceFieldDialog extends DialogWrapper {
|
||||
panel.add(type, gbConstraints);
|
||||
|
||||
gbConstraints.gridx++;
|
||||
gbConstraints.insets = new Insets(4, 0, 4, 4);
|
||||
gbConstraints.insets = JBUI.insets(4, 0, 4, 4);
|
||||
gbConstraints.weightx = 0;
|
||||
myTypeSelector = myTypeSelectorManager.getTypeSelector();
|
||||
panel.add(myTypeSelector.getComponent(), gbConstraints);
|
||||
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 0);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 0);
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.weighty = 1;
|
||||
@@ -169,7 +170,7 @@ class IntroduceFieldDialog extends DialogWrapper {
|
||||
final JLabel namePrompt = new JLabel(RefactoringBundle.message("name.prompt"));
|
||||
panel.add(namePrompt, gbConstraints);
|
||||
|
||||
gbConstraints.insets = new Insets(4, 0, 4, 4);
|
||||
gbConstraints.insets = JBUI.insets(4, 0, 4, 4);
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridx = 1;
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,6 +23,7 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.JavaVisibilityPanel;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -248,7 +249,7 @@ public class IntroduceFieldDialogPanel extends IntroduceFieldCentralPanel {
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints constraints =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
panel.add(initializerPlacePanel, constraints);
|
||||
panel.add(checkboxPanel, constraints);
|
||||
return panel;
|
||||
|
||||
+7
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,13 +16,14 @@
|
||||
package com.intellij.refactoring.introduceField;
|
||||
|
||||
import com.intellij.codeInsight.TestFrameworks;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.introduce.inplace.KeyboardComboSwitcher;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -127,7 +128,7 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
JPanel groupPanel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gridBagConstraints =
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
|
||||
myInitialisersPlaceModel = new DefaultComboBoxModel();
|
||||
myInitialisersPlaceModel.addElement(BaseExpressionToFieldHandler.InitializationPlace.IN_CURRENT_METHOD);
|
||||
@@ -249,7 +250,8 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
@Override
|
||||
protected JPanel appendCheckboxes(ItemListener itemListener) {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
appendOccurrences(itemListener, new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0), panel);
|
||||
appendOccurrences(itemListener, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
|
||||
JBUI.emptyInsets(), 0, 0), panel);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -257,7 +259,7 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints constraints =
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
JBUI.emptyInsets(), 0, 0);
|
||||
panel.add(initializerPlacePanel, constraints);
|
||||
constraints.gridy++;
|
||||
panel.add(checkboxPanel, constraints);
|
||||
|
||||
+2
-1
@@ -31,6 +31,7 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.MethodCellRenderer;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -77,7 +78,7 @@ public class EnclosingMethodSelectionDialog extends DialogWrapper {
|
||||
panel.setLayout(new GridBagLayout());
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.weighty = 0;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridy = 0;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,12 +32,12 @@ import com.intellij.psi.*;
|
||||
import com.intellij.psi.codeStyle.VariableKind;
|
||||
import com.intellij.psi.search.LocalSearchScope;
|
||||
import com.intellij.psi.search.SearchScope;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringActionHandler;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import gnu.trove.TIntProcedure;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -80,7 +80,7 @@ public class InplaceIntroduceParameterPopup extends AbstractJavaInplaceIntroduce
|
||||
myMustBeFinal = mustBeFinal;
|
||||
|
||||
myWholePanel.add(getPreviewComponent(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0,5,0,5), 0,0));
|
||||
JBUI.insets(0, 5), 0, 0));
|
||||
myPanel = new InplaceIntroduceParameterUI(project, localVar, expr, method, parametersToRemove, typeSelectorManager,
|
||||
myOccurrences) {
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import com.intellij.refactoring.introduce.inplace.KeyboardComboSwitcher;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.TIntArrayList;
|
||||
|
||||
@@ -119,7 +120,7 @@ public abstract class InplaceIntroduceParameterUI extends IntroduceParameterSett
|
||||
|
||||
public void appendOccurrencesDelegate(JPanel myWholePanel) {
|
||||
final GridBagConstraints gc =
|
||||
new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
|
||||
new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, JBUI.emptyInsets(), 0, 0);
|
||||
if (myOccurrences.length > 1 && !myIsInvokedOnDeclaration) {
|
||||
gc.gridy++;
|
||||
createOccurrencesCb(gc, myWholePanel, myOccurrences.length);
|
||||
|
||||
+8
-7
@@ -39,6 +39,7 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.*;
|
||||
import com.intellij.ui.NonFocusableCheckBox;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -145,7 +146,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
gbConstraints.fill = GridBagConstraints.NONE;
|
||||
gbConstraints.gridx = 0;
|
||||
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 0);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 0);
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.weighty = 0;
|
||||
@@ -153,7 +154,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
JLabel type = new JLabel(RefactoringBundle.message("parameter.of.type"));
|
||||
panel.add(type, gbConstraints);
|
||||
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 8);
|
||||
gbConstraints.gridx++;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
@@ -161,7 +162,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
panel.add(myTypeSelector.getComponent(), gbConstraints);
|
||||
|
||||
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 8);
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.gridx = 0;
|
||||
@@ -182,7 +183,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
}
|
||||
*/
|
||||
gbConstraints.gridx++;
|
||||
gbConstraints.insets = new Insets(4, 4, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 4, 4, 8);
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
panel.add(myParameterNameField.getComponent(), gbConstraints);
|
||||
@@ -198,20 +199,20 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
myNameSuggestionsManager.setLabelsFor(type, nameLabel);
|
||||
|
||||
gbConstraints.gridx = 0;
|
||||
gbConstraints.insets = new Insets(4, 0, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 0, 4, 8);
|
||||
gbConstraints.gridwidth = 2;
|
||||
if (myOccurenceNumber > 1 && !myPanel.myIsInvokedOnDeclaration) {
|
||||
gbConstraints.gridy++;
|
||||
myPanel.createOccurrencesCb(gbConstraints, panel, myOccurenceNumber);
|
||||
}
|
||||
if(myPanel.myCbReplaceAllOccurences != null) {
|
||||
gbConstraints.insets = new Insets(0, 16, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(0, 16, 4, 8);
|
||||
}
|
||||
JavaRefactoringSettings settings = JavaRefactoringSettings.getInstance();
|
||||
myPanel.createLocalVariablePanel(gbConstraints, panel, settings);
|
||||
|
||||
myPanel.createRemoveParamsPanel(gbConstraints, panel);
|
||||
gbConstraints.insets = new Insets(4, 0, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 0, 4, 8);
|
||||
|
||||
gbConstraints.gridy++;
|
||||
myCbDeclareFinal = new NonFocusableCheckBox(RefactoringBundle.message("declare.final"));
|
||||
|
||||
+3
-2
@@ -25,6 +25,7 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.NonFocusableCheckBox;
|
||||
import com.intellij.ui.StateRestoringCheckBox;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import gnu.trove.TIntProcedure;
|
||||
|
||||
@@ -111,7 +112,7 @@ public abstract class IntroduceParameterSettingsUI {
|
||||
JPanel radioButtonPanel = new JPanel(new GridBagLayout());
|
||||
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.weighty = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridy = 0;
|
||||
@@ -263,7 +264,7 @@ public abstract class IntroduceParameterSettingsUI {
|
||||
panel.add(myCbDeleteLocalVariable, gbConstraints);
|
||||
myCbDeleteLocalVariable.setSelected(settings.INTRODUCE_PARAMETER_DELETE_LOCAL_VARIABLE);
|
||||
|
||||
gbConstraints.insets = new Insets(0, 0, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(0, 0, 4, 8);
|
||||
if(myHasInitializer) {
|
||||
myCbUseInitializer = new StateRestoringCheckBox();
|
||||
myCbUseInitializer.setText(RefactoringBundle.message("use.variable.initializer.to.initialize.parameter"));
|
||||
|
||||
+3
-3
@@ -183,7 +183,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable
|
||||
gbConstraints.gridwidth = 1;
|
||||
gbConstraints.gridx = 0;
|
||||
gbConstraints.gridy = 0;
|
||||
gbConstraints.insets = new Insets(0, 0, 0, 0);
|
||||
gbConstraints.insets = JBUI.emptyInsets();
|
||||
|
||||
if (myOccurrencesCount > 1) {
|
||||
myCbReplaceAll = new NonFocusableCheckBox();
|
||||
@@ -200,7 +200,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable
|
||||
if (myAnyLValueOccurences) {
|
||||
myCbReplaceWrite = new StateRestoringCheckBox();
|
||||
myCbReplaceWrite.setText(RefactoringBundle.message("replace.write.access.occurrences"));
|
||||
gbConstraints.insets = new Insets(0, 8, 0, 0);
|
||||
gbConstraints.insets = JBUI.insetsLeft(8);
|
||||
gbConstraints.gridy++;
|
||||
panel.add(myCbReplaceWrite, gbConstraints);
|
||||
myCbReplaceWrite.addItemListener(myReplaceAllListener);
|
||||
@@ -214,7 +214,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable
|
||||
CodeStyleSettingsManager.getSettings(myProject).GENERATE_FINAL_LOCALS :
|
||||
createFinals.booleanValue();
|
||||
|
||||
gbConstraints.insets = new Insets(0, 0, 0, 0);
|
||||
gbConstraints.insets = JBUI.emptyInsets();
|
||||
gbConstraints.gridy++;
|
||||
panel.add(myCbFinal, gbConstraints);
|
||||
myFinalListener = new ItemListener() {
|
||||
|
||||
+6
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,6 +47,7 @@ import com.intellij.refactoring.rename.inplace.VariableInplaceRenamer;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
|
||||
import com.intellij.refactoring.util.RefactoringUtil;
|
||||
import com.intellij.ui.NonFocusableCheckBox;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -264,10 +265,12 @@ public class JavaVariableInplaceIntroducer extends AbstractJavaInplaceIntroducer
|
||||
panel.setBorder(null);
|
||||
|
||||
if (myCanBeFinalCb != null) {
|
||||
panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
|
||||
panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.insets(5), 0, 0));
|
||||
}
|
||||
|
||||
panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));
|
||||
panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
+6
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,7 @@ import com.intellij.refactoring.util.ParameterTablePanel;
|
||||
import com.intellij.refactoring.util.VariableData;
|
||||
import com.intellij.ui.DocumentAdapter;
|
||||
import com.intellij.usageView.UsageViewUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
@@ -129,7 +130,7 @@ public class MakeParameterizedStaticDialog extends AbstractMakeStaticDialog {
|
||||
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.weighty = 0;
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.gridx = 0;
|
||||
@@ -149,7 +150,7 @@ public class MakeParameterizedStaticDialog extends AbstractMakeStaticDialog {
|
||||
panel.add(myMakeClassParameter, gbConstraints);
|
||||
myMakeClassParameter.setSelected(myAnyNonFieldMembersUsed);
|
||||
|
||||
gbConstraints.insets = new Insets(0, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(0, 8, 4, 8);
|
||||
gbConstraints.weighty = 0;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridwidth = 2;
|
||||
@@ -173,7 +174,7 @@ public class MakeParameterizedStaticDialog extends AbstractMakeStaticDialog {
|
||||
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||
|
||||
if(myVariableData.length > 0) {
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.weighty = 0;
|
||||
gbConstraints.weightx = 0;
|
||||
gbConstraints.gridheight = 1;
|
||||
@@ -196,7 +197,7 @@ public class MakeParameterizedStaticDialog extends AbstractMakeStaticDialog {
|
||||
}
|
||||
};
|
||||
|
||||
gbConstraints.insets = new Insets(0, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(0, 8, 4, 8);
|
||||
gbConstraints.gridwidth = 2;
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
gbConstraints.weighty = 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,6 +32,7 @@ import com.intellij.refactoring.HelpID;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.util.VariableData;
|
||||
import com.intellij.usageView.UsageViewUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -74,7 +75,7 @@ public class SimpleMakeStaticDialog extends AbstractMakeStaticDialog {
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
GridBagConstraints gbConstraints = new GridBagConstraints();
|
||||
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
gbConstraints.weighty = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridy = 0;
|
||||
|
||||
+12
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,7 @@ import com.intellij.ui.EditorTextField;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.TitledSeparator;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -63,7 +64,8 @@ public class MoveInstanceMethodDialog extends MoveInstanceMethodDialogBase {
|
||||
protected JComponent createCenterPanel() {
|
||||
JPanel mainPanel = new JPanel(new GridBagLayout());
|
||||
final TitledSeparator separator = new TitledSeparator();
|
||||
mainPanel.add(separator, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));
|
||||
mainPanel.add(separator, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
myList = createTargetVariableChooser();
|
||||
myList.addListSelectionListener(new ListSelectionListener() {
|
||||
@@ -75,17 +77,21 @@ public class MoveInstanceMethodDialog extends MoveInstanceMethodDialogBase {
|
||||
separator.setText(RefactoringBundle.message("moveInstanceMethod.select.an.instance.parameter"));
|
||||
|
||||
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myList);
|
||||
mainPanel.add(scrollPane, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));
|
||||
mainPanel.add(scrollPane, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
myVisibilityPanel = createVisibilityPanel();
|
||||
mainPanel.add(myVisibilityPanel, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0,0,0,0), 0,0));
|
||||
mainPanel.add(myVisibilityPanel, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
final JPanel parametersPanel = createParametersPanel();
|
||||
if (parametersPanel != null) {
|
||||
mainPanel.add(parametersPanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));
|
||||
mainPanel.add(parametersPanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
}
|
||||
|
||||
mainPanel.add(initOpenInEditorCb(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));
|
||||
mainPanel.add(initOpenInEditorCb(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
separator.setLabelFor(myList);
|
||||
validateTextFields(myList.getSelectedIndex());
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import com.intellij.refactoring.move.MoveDialogBase;
|
||||
import com.intellij.refactoring.ui.JavaVisibilityPanel;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
@@ -71,7 +72,7 @@ public abstract class MoveInstanceMethodDialogBase extends MoveDialogBase {
|
||||
gbConstraints.gridheight = 1;
|
||||
gbConstraints.gridx = 0;
|
||||
gbConstraints.gridy = 0;
|
||||
gbConstraints.insets = new Insets(0, 0, 0, 0);
|
||||
gbConstraints.insets = JBUI.emptyInsets();
|
||||
hBox.add(scrollPane, gbConstraints);
|
||||
hBox.add(Box.createHorizontalStrut(4));
|
||||
gbConstraints.weightx = 0;
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.ui.JavaReferenceEditorUtil;
|
||||
import com.intellij.ui.ReferenceEditorWithBrowseButton;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -96,7 +97,7 @@ public class ReplaceConstructorWithFactoryDialog extends RefactoringDialog {
|
||||
gbc.anchor = GridBagConstraints.WEST;
|
||||
gbc.fill = GridBagConstraints.BOTH;
|
||||
|
||||
gbc.insets = new Insets(4, 0, 4, 8);
|
||||
gbc.insets = JBUI.insets(4, 0, 4, 8);
|
||||
gbc.gridwidth = 1;
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,7 @@ import com.intellij.refactoring.JavaRefactoringSettings;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.RefactoringDialog;
|
||||
import com.intellij.usageView.UsageViewUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -120,7 +121,7 @@ public class TypeCookDialog extends RefactoringDialog {
|
||||
myCbCookObjects.setText(RefactoringBundle.message("type.cook.generify.objects"));
|
||||
myCbCookToWildcards.setText(RefactoringBundle.message("type.cook.produce.wildcard.types"));
|
||||
|
||||
gbConstraints.insets = new Insets(4, 8, 4, 8);
|
||||
gbConstraints.insets = JBUI.insets(4, 8);
|
||||
|
||||
gbConstraints.weighty = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,6 +51,7 @@ import com.intellij.usages.UsageInfoToUsageConverter;
|
||||
import com.intellij.usages.UsagePresentation;
|
||||
import com.intellij.util.EditSourceOnDoubleClickHandler;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -67,9 +68,7 @@ import javax.swing.tree.TreePath;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -175,7 +174,7 @@ public class MigrationPanel extends JPanel implements Disposable {
|
||||
private JComponent createToolbar() {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
GridBagConstraints gc = new GridBagConstraints(GridBagConstraints.RELATIVE, 0, 1, 1, 0, 1, GridBagConstraints.NORTHWEST,
|
||||
GridBagConstraints.NONE, new Insets(5, 10, 5, 0), 0, 0);
|
||||
GridBagConstraints.NONE, JBUI.insets(5, 10, 5, 0), 0, 0);
|
||||
final JButton performButton = new JButton(RefactoringBundle.message("type.migration.migrate.button.text"));
|
||||
performButton.addActionListener(new ActionListener() {
|
||||
private void expandTree(MigrationNode migrationNode) {
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,6 +44,7 @@ import com.intellij.ui.EditorComboBox;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.Functions;
|
||||
import com.intellij.util.VisibilityUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -110,7 +111,7 @@ public abstract class TypeMigrationDialog extends RefactoringDialog {
|
||||
protected JComponent createCenterPanel() {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST,
|
||||
GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 0), 0, 0);
|
||||
GridBagConstraints.HORIZONTAL, JBUI.insets(5, 5, 0, 0), 0, 0);
|
||||
appendMigrationTypeEditor(panel, gc);
|
||||
LabeledComponent<ScopeChooserCombo> scopeChooserComponent = new LabeledComponent<ScopeChooserCombo>();
|
||||
scopeChooserComponent.setComponent(myScopeChooserCombo);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,12 +28,12 @@ import com.intellij.psi.PsiModifier;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.VisibilityUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
|
||||
@@ -53,10 +53,9 @@ public class JavaVisibilityPanel extends VisibilityPanelBase<String> {
|
||||
final boolean hasEscalate,
|
||||
String visibilityTitle) {
|
||||
setBorder(IdeBorderFactory.createTitledBorder(visibilityTitle, true,
|
||||
new Insets(IdeBorderFactory.TITLED_BORDER_TOP_INSET,
|
||||
UIUtil.DEFAULT_HGAP,
|
||||
IdeBorderFactory.TITLED_BORDER_BOTTOM_INSET,
|
||||
IdeBorderFactory.TITLED_BORDER_RIGHT_INSET)));
|
||||
JBUI.insets(IdeBorderFactory.TITLED_BORDER_TOP_INSET, UIUtil.DEFAULT_HGAP,
|
||||
IdeBorderFactory.TITLED_BORDER_BOTTOM_INSET,
|
||||
IdeBorderFactory.TITLED_BORDER_RIGHT_INSET)));
|
||||
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
||||
ButtonGroup bg = new ButtonGroup();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -61,6 +61,7 @@ import com.intellij.testIntegration.TestIntegrationUtils;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.java.JavaModuleSourceRootTypes;
|
||||
@@ -427,7 +428,7 @@ public class CreateTestDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
private static Insets insets(int top, int bottom) {
|
||||
return new Insets(top, 8, bottom, 8);
|
||||
return JBUI.insets(top, 8, bottom, 8);
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
|
||||
@@ -187,7 +187,7 @@ public class UiUtils {
|
||||
}).createPanel();
|
||||
panel.setPreferredSize(JBUI.size(150, 100));
|
||||
optionsPanel.setBorder(IdeBorderFactory.createTitledBorder(borderTitle,
|
||||
false, new Insets(10, 0, 0, 0)));
|
||||
false, JBUI.insetsTop(10)));
|
||||
optionsPanel.add(panel);
|
||||
return optionsPanel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user