Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
1b698a2b
Commit
1b698a2b
authored
9 years ago
by
Konstantin Bulenkov
Browse files
Options
Download
Email Patches
Plain Diff
module java-impl: dpi-aware insets
parent
216ca13b
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
java/java-impl/src/com/intellij/application/options/CodeStyleImportsPanel.java
+8
-9
...m/intellij/application/options/CodeStyleImportsPanel.java
java/java-impl/src/com/intellij/application/options/FullyQualifiedNamesInJavadocOptionProvider.java
+4
-6
...n/options/FullyQualifiedNamesInJavadocOptionProvider.java
java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java
+3
-2
...c/com/intellij/application/options/ImportLayoutPanel.java
java/java-impl/src/com/intellij/codeInsight/intention/impl/CreateClassDialog.java
+4
-4
...ntellij/codeInsight/intention/impl/CreateClassDialog.java
java/java-impl/src/com/intellij/codeInsight/intention/impl/CreateFieldFromParameterDialog.java
+1
-1
...nsight/intention/impl/CreateFieldFromParameterDialog.java
java/java-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspection.java
+3
-2
.../intellij/codeInspection/dataFlow/DataFlowInspection.java
java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java
+2
-1
.../codeInspection/deadCode/UnusedDeclarationInspection.java
java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java
+1
-1
...tellij/codeInspection/javaDoc/JavaDocLocalInspection.java
java/java-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspection.java
+4
-2
...on/uncheckedWarnings/UncheckedWarningLocalInspection.java
java/java-impl/src/com/intellij/codeInspection/unusedParameters/UnusedParametersInspection.java
+2
-1
...spection/unusedParameters/UnusedParametersInspection.java
java/java-impl/src/com/intellij/find/findUsages/FindThrowUsagesDialog.java
+3
-2
...c/com/intellij/find/findUsages/FindThrowUsagesDialog.java
java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureDialog.java
+7
-3
...efactoring/changeSignature/JavaChangeSignatureDialog.java
java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodSignatureSuggester.java
+3
-2
...toring/extractMethod/ExtractMethodSignatureSuggester.java
java/java-impl/src/com/intellij/refactoring/inheritanceToDelegation/InheritanceToDelegationDialog.java
+9
-8
...nheritanceToDelegation/InheritanceToDelegationDialog.java
java/java-impl/src/com/intellij/refactoring/inlineSuperClass/InlineSuperClassRefactoringDialog.java
+3
-2
...g/inlineSuperClass/InlineSuperClassRefactoringDialog.java
java/java-impl/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java
+5
-4
...ctoring/introduceField/InplaceIntroduceConstantPopup.java
java/java-impl/src/com/intellij/refactoring/introduceField/InplaceIntroduceFieldPopup.java
+3
-2
...efactoring/introduceField/InplaceIntroduceFieldPopup.java
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java
+5
-3
...efactoring/introduceField/IntroduceFieldCentralPanel.java
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldDialog.java
+6
-5
...llij/refactoring/introduceField/IntroduceFieldDialog.java
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldDialogPanel.java
+3
-2
...refactoring/introduceField/IntroduceFieldDialogPanel.java
with
79 additions
and
62 deletions
+79
-62
java/java-impl/src/com/intellij/application/options/CodeStyleImportsPanel.java
+
8
-
9
View file @
1b698a2b
/*
* Copyright 2000-20
09
JetBrains s.r.o.
* Copyright 2000-20
16
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
();
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/application/options/FullyQualifiedNamesInJavadocOptionProvider.java
+
4
-
6
View file @
1b698a2b
/*
* Copyright 2000-201
4
JetBrains s.r.o.
* Copyright 2000-201
6
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
);
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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
)
{
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInsight/intention/impl/CreateClassDialog.java
+
4
-
4
View file @
1b698a2b
/*
* Copyright 2000-20
09
JetBrains s.r.o.
* Copyright 2000-20
16
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
;
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInsight/intention/impl/CreateFieldFromParameterDialog.java
+
1
-
1
View file @
1b698a2b
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspection.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
3
JetBrains s.r.o.
* Copyright 2000-201
6
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
);
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java
+
2
-
1
View file @
1b698a2b
...
...
@@ -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
I
nsets
(
0
,
20
,
2
,
0
);
gc
.
insets
=
JBUI
.
i
nsets
(
0
,
20
,
2
,
0
);
gc
.
fill
=
GridBagConstraints
.
HORIZONTAL
;
gc
.
anchor
=
GridBagConstraints
.
NORTHWEST
;
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java
+
1
-
1
View file @
1b698a2b
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspection.java
+
4
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
3
JetBrains s.r.o.
* Copyright 2000-201
6
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
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/codeInspection/unusedParameters/UnusedParametersInspection.java
+
2
-
1
View file @
1b698a2b
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/find/findUsages/FindThrowUsagesDialog.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
4
JetBrains s.r.o.
* Copyright 2000-201
6
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
;
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureDialog.java
+
7
-
3
View file @
1b698a2b
/*
* Copyright 2000-201
3
JetBrains s.r.o.
* Copyright 2000-201
6
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));
}
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodSignatureSuggester.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/inheritanceToDelegation/InheritanceToDelegationDialog.java
+
9
-
8
View file @
1b698a2b
/*
* Copyright 2000-201
3
JetBrains s.r.o.
* Copyright 2000-201
6
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
I
nsets
(
4
,
0
,
0
,
8
);
gbc
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
0
,
4
,
8
);
gbc
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
4
,
4
,
8
);
gbc
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
0
,
4
,
4
);
gbc
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
8
,
0
,
8
);
gbc
.
insets
=
JBUI
.
i
nsets
(
4
,
8
,
0
,
8
);
gbc
.
weighty
=
0.0
;
myCbGenerateGetter
=
new
JCheckBox
(
RefactoringBundle
.
message
(
"generate.getter.for.delegated.component"
));
myCbGenerateGetter
.
setFocusable
(
false
);
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/inlineSuperClass/InlineSuperClassRefactoringDialog.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-20
09
JetBrains s.r.o.
* Copyright 2000-20
16
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
;
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/introduceField/InplaceIntroduceConstantPopup.java
+
5
-
4
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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
;
}
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/introduceField/InplaceIntroduceFieldPopup.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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
();
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java
+
5
-
3
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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"
));
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldDialog.java
+
6
-
5
View file @
1b698a2b
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
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
I
nsets
(
4
,
4
,
4
,
0
);
gbConstraints
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
0
,
4
,
4
);
gbConstraints
.
insets
=
JBUI
.
i
nsets
(
4
,
0
,
4
,
4
);
gbConstraints
.
weightx
=
0
;
myTypeSelector
=
myTypeSelectorManager
.
getTypeSelector
();
panel
.
add
(
myTypeSelector
.
getComponent
(),
gbConstraints
);
gbConstraints
.
insets
=
new
I
nsets
(
4
,
4
,
4
,
0
);
gbConstraints
.
insets
=
JBUI
.
i
nsets
(
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
I
nsets
(
4
,
0
,
4
,
4
);
gbConstraints
.
insets
=
JBUI
.
i
nsets
(
4
,
0
,
4
,
4
);
gbConstraints
.
gridwidth
=
1
;
gbConstraints
.
weightx
=
1
;
gbConstraints
.
gridx
=
1
;
...
...
This diff is collapsed.
Click to expand it.
java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldDialogPanel.java
+
3
-
2
View file @
1b698a2b
/*
* Copyright 2000-201
1
JetBrains s.r.o.
* Copyright 2000-201
6
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
;
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help