mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IdeBorderFactory.emptyBorder is deprecated to avoid double scaling
This commit is contained in:
@@ -29,17 +29,17 @@ import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.PopupHandler;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBLayeredPane;
|
||||
import com.intellij.ui.components.Magnificator;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.intellij.images.ImagesBundle;
|
||||
import org.intellij.images.editor.ImageDocument;
|
||||
import org.intellij.images.editor.ImageDocument.ScaledImageProvider;
|
||||
import org.intellij.images.editor.ImageEditor;
|
||||
import org.intellij.images.editor.ImageZoomModel;
|
||||
import org.intellij.images.editor.ImageDocument.ScaledImageProvider;
|
||||
import org.intellij.images.editor.actionSystem.ImageEditorActions;
|
||||
import org.intellij.images.options.*;
|
||||
import org.intellij.images.thumbnail.actionSystem.ThumbnailViewActions;
|
||||
@@ -176,7 +176,7 @@ final class ImageEditorUI extends JPanel implements DataProvider, CopyProvider,
|
||||
JPanel topPanel = new JPanel(new BorderLayout());
|
||||
topPanel.add(toolbarPanel, BorderLayout.WEST);
|
||||
infoLabel = new JLabel((String)null, SwingConstants.RIGHT);
|
||||
infoLabel.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 2));
|
||||
infoLabel.setBorder(JBUI.Borders.emptyRight(2));
|
||||
topPanel.add(infoLabel, BorderLayout.EAST);
|
||||
|
||||
add(topPanel, BorderLayout.NORTH);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.ui.ScrollPaneFactory;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Chunk;
|
||||
import com.intellij.util.ListWithSelection;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.Table;
|
||||
import com.intellij.util.ui.table.ComboBoxTableCellEditor;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -175,7 +176,7 @@ public class GenerateAntBuildDialog extends DialogWrapper {
|
||||
true));
|
||||
JLabel textLabel = new JLabel(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.description"));
|
||||
textLabel.setUI(new MultiLineLabelUI());
|
||||
textLabel.setBorder(IdeBorderFactory.createEmptyBorder(4, 4, 6, 4));
|
||||
textLabel.setBorder(JBUI.Borders.empty(4, 4, 6, 4));
|
||||
myChunksPanel.add(textLabel, BorderLayout.NORTH);
|
||||
|
||||
myTableModel = new MyTableModel(chunks);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -31,13 +31,13 @@ import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.AnActionButton;
|
||||
import com.intellij.ui.ColoredTreeCellRenderer;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ToolbarDecorator;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.ui.treeStructure.Tree;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.ui.EditableTreeModel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
import org.jetbrains.jps.model.java.compiler.ProcessorConfigProfile;
|
||||
import org.jetbrains.jps.model.java.impl.compiler.ProcessorConfigProfileImpl;
|
||||
@@ -165,7 +165,7 @@ public class AnnotationProcessorsPanel extends JPanel {
|
||||
}
|
||||
});
|
||||
myProfilePanel = new ProcessorProfilePanel(project);
|
||||
myProfilePanel.setBorder(IdeBorderFactory.createEmptyBorder(0, 6, 0, 0));
|
||||
myProfilePanel.setBorder(JBUI.Borders.emptyLeft(6));
|
||||
splitter.setSecondComponent(myProfilePanel);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -22,15 +22,19 @@ import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.ide.util.ElementsChooser;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.MultiLineLabelUI;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.OptionsDialog;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.List;public class RunHotswapDialog extends OptionsDialog {
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class RunHotswapDialog extends OptionsDialog {
|
||||
private final JPanel myPanel;
|
||||
private final ElementsChooser<SessionItem> myElementsChooser;
|
||||
private final boolean myDisplayHangWarning;
|
||||
@@ -45,7 +49,7 @@ import java.util.List;public class RunHotswapDialog extends OptionsDialog {
|
||||
}
|
||||
items.sort(Comparator.comparing(debuggerSession -> debuggerSession.getSession().getSessionName()));
|
||||
myElementsChooser = new ElementsChooser<>(items, true);
|
||||
myPanel.setBorder(IdeBorderFactory.createEmptyBorder(10, 0, 5, 0));
|
||||
myPanel.setBorder(JBUI.Borders.empty(10, 0, 5, 0));
|
||||
//myElementsChooser.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 0, 0));
|
||||
if (sessions.size() > 0) {
|
||||
myElementsChooser.selectElements(items.subList(0, 1));
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,9 +19,9 @@ import com.intellij.execution.ExecutionBundle;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.ide.CopyPasteManager;
|
||||
import com.intellij.openapi.ui.FixedSizeButton;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.PopupHandler;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -38,7 +38,7 @@ public class ConfigurationArgumentsHelpArea extends JPanel {
|
||||
public ConfigurationArgumentsHelpArea() {
|
||||
super(new BorderLayout());
|
||||
add(myPanel);
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(10, 0, 0, 0));
|
||||
setBorder(JBUI.Borders.emptyTop(10));
|
||||
|
||||
final DefaultActionGroup group = new DefaultActionGroup();
|
||||
group.add(new MyCopyAction());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -72,7 +72,7 @@ public class ProjectSettingsStep extends ModuleWizardStep implements SettingsSte
|
||||
myModuleNameLocationComponent.bindModuleSettings(myNamePathComponent);
|
||||
|
||||
myExpertDecorator = new HideableDecorator(myExpertPlaceholder, "Mor&e Settings", false);
|
||||
myExpertPanel.setBorder(IdeBorderFactory.createEmptyBorder(0, IdeBorderFactory.TITLED_BORDER_INDENT, 5, 0));
|
||||
myExpertPanel.setBorder(JBUI.Borders.empty(0, IdeBorderFactory.TITLED_BORDER_INDENT, 5, 0));
|
||||
myExpertDecorator.setContentComponent(myExpertPanel);
|
||||
|
||||
if (myWizardContext.isCreatingNewProject()) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,10 +25,10 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.platform.ProjectTemplate;
|
||||
import com.intellij.platform.templates.ArchivedProjectTemplate;
|
||||
import com.intellij.ui.CollectionListModel;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.ui.popup.list.GroupedItemsListRenderer;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ProjectTemplateList extends JPanel {
|
||||
myTextLabel.setDisabledIcon(IconLoader.getDisabledIcon(icon));
|
||||
}
|
||||
myTextLabel.setEnabled(myList.isEnabled());
|
||||
myTextLabel.setBorder(IdeBorderFactory.createEmptyBorder(3, 3, 3, 3));
|
||||
myTextLabel.setBorder(JBUI.Borders.empty(3, 3, 3, 3));
|
||||
}
|
||||
};
|
||||
myList.setCellRenderer(renderer);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -34,7 +34,7 @@ import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -68,7 +68,7 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
@Override
|
||||
protected String addStepComponent(Component component) {
|
||||
if (component instanceof JComponent) {
|
||||
((JComponent)component).setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 0));
|
||||
((JComponent)component).setBorder(JBUI.Borders.empty());
|
||||
}
|
||||
return super.addStepComponent(component);
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -31,9 +31,8 @@ import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescri
|
||||
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
|
||||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.NotNullComputable;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SeparatorFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -110,7 +109,7 @@ public class FrameworkSupportOptionsComponent {
|
||||
Disposer.register(myConfigurable, myLibraryOptionsPanel);
|
||||
if (addSeparator) {
|
||||
JComponent separator1 = SeparatorFactory.createSeparator("Libraries", null);
|
||||
separator1.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
|
||||
separator1.setBorder(JBUI.Borders.empty(5, 0, 5, 5));
|
||||
myLibraryOptionsPanelWrapper.add(BorderLayout.NORTH, separator1);
|
||||
}
|
||||
myLibraryOptionsPanelWrapper.add(BorderLayout.CENTER, myLibraryOptionsPanel.getMainPanel());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -17,7 +17,11 @@ package com.intellij.ide.util.newProjectWizard;
|
||||
|
||||
import com.intellij.framework.FrameworkOrGroup;
|
||||
import com.intellij.ide.util.newProjectWizard.impl.FrameworkSupportModelBase;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.CheckboxTree;
|
||||
import com.intellij.ui.CheckedTreeNode;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.ui.TreeSpeedSearch;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
@@ -100,7 +104,7 @@ public class FrameworksTree extends CheckboxTree {
|
||||
private FrameworksTreeRenderer(FrameworkSupportModelBase model) {
|
||||
super(true, false);
|
||||
myModel = model;
|
||||
Border border = IdeBorderFactory.createEmptyBorder(2, 2, 2, 2);
|
||||
Border border = JBUI.Borders.empty(2);
|
||||
setBorder(border);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,10 +30,10 @@ import com.intellij.psi.codeStyle.CodeStyleConfigurable;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.JavaVisibilityPanel;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SortedListModel;
|
||||
import com.intellij.ui.components.JBCheckBox;
|
||||
import com.intellij.util.ui.JBInsets;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -73,7 +73,7 @@ public class CodeStyleGenerationConfigurable implements CodeStyleConfigurable {
|
||||
|
||||
public CodeStyleGenerationConfigurable(CodeStyleSettings settings) {
|
||||
mySettings = settings;
|
||||
myPanel.setBorder(IdeBorderFactory.createEmptyBorder(2, 2, 2, 2));
|
||||
myPanel.setBorder(JBUI.Borders.empty(2, 2, 2, 2));
|
||||
myJavaVisibilityPanel = new JavaVisibilityPanel(false, true, RefactoringBundle.message("default.visibility.border.title"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -34,7 +34,6 @@ import com.intellij.refactoring.ui.*;
|
||||
import com.intellij.refactoring.util.ConflictsUtil;
|
||||
import com.intellij.refactoring.util.ParameterTablePanel;
|
||||
import com.intellij.refactoring.util.VariableData;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.NonFocusableCheckBox;
|
||||
import com.intellij.ui.SeparatorFactory;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
@@ -326,7 +325,7 @@ public class ExtractMethodDialog extends DialogWrapper implements AbstractExtrac
|
||||
updateSignature();
|
||||
});
|
||||
optionsPanel.add(myFoldParameters);
|
||||
final Border emptyBorder = IdeBorderFactory.createEmptyBorder(5, 0, 5, 4);
|
||||
final Border emptyBorder = JBUI.Borders.empty(5, 0, 5, 4);
|
||||
myFoldParameters.setBorder(emptyBorder);
|
||||
|
||||
boolean canBeVarargs = false;
|
||||
@@ -398,7 +397,7 @@ public class ExtractMethodDialog extends DialogWrapper implements AbstractExtrac
|
||||
myMakeStatic.setSelected(false);
|
||||
myMakeStatic.setEnabled(false);
|
||||
}
|
||||
myMakeStatic.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 4));
|
||||
myMakeStatic.setBorder(JBUI.Borders.empty(5, 0, 5, 4));
|
||||
}
|
||||
|
||||
private ComboBoxVisibilityPanel<String> createVisibilityPanel() {
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,7 +28,6 @@ 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.IdeBorderFactory;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -95,7 +94,7 @@ public abstract class InplaceIntroduceParameterUI extends IntroduceParameterSett
|
||||
component.setText(RefactoringBundle.message("replace.fields.used.in.expressions.with.their.getters"));
|
||||
component.getLabel().setDisplayedMnemonic('u');
|
||||
component.setLabelLocation(BorderLayout.NORTH);
|
||||
component.setBorder(IdeBorderFactory.createEmptyBorder(3, 3, 2, 2));
|
||||
component.setBorder(JBUI.Borders.empty(3, 3, 2, 2));
|
||||
return component;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -81,7 +81,10 @@ import com.intellij.openapi.vfs.newvfs.RefreshQueue;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.impl.IdeFrameImpl;
|
||||
import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.ColorUtil;
|
||||
import com.intellij.ui.HyperlinkAdapter;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.ScreenUtil;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
@@ -513,13 +516,13 @@ public class DiffUtil {
|
||||
if (readOnly) title += " " + DiffBundle.message("diff.content.read.only.content.title.suffix");
|
||||
|
||||
JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0, 4, 0, 4));
|
||||
panel.setBorder(JBUI.Borders.empty(0, 4));
|
||||
panel.add(new JBLabel(title).setCopyable(true), BorderLayout.CENTER);
|
||||
if (charset != null && separator != null) {
|
||||
JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS));
|
||||
panel2.add(createCharsetPanel(charset, bom));
|
||||
panel2.add(Box.createRigidArea(new Dimension(4, 0)));
|
||||
panel2.add(Box.createRigidArea(JBUI.size(4, 0)));
|
||||
panel2.add(createSeparatorPanel(separator));
|
||||
panel.add(panel2, BorderLayout.EAST);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -22,9 +22,9 @@ import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.vcs.history.VcsHistoryUtil;
|
||||
import com.intellij.ui.HyperlinkAdapter;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.ui.components.panels.Wrapper;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -54,7 +54,7 @@ public class VcsCommitInfoBalloon {
|
||||
myEditorPane.setBackground(HintUtil.getInformationColor());
|
||||
myEditorPane.setFont(VcsHistoryUtil.getCommitDetailsFont());
|
||||
myEditorPane.setBorder(HintUtil.createHintBorder());
|
||||
Border margin = IdeBorderFactory.createEmptyBorder(3, 3, 3, 3);
|
||||
Border margin = JBUI.Borders.empty(3, 3, 3, 3);
|
||||
myEditorPane.setBorder(new CompoundBorder(myEditorPane.getBorder(), margin));
|
||||
myEditorPane.addHyperlinkListener(new HyperlinkAdapter() {
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -51,6 +51,7 @@ import com.intellij.util.Consumer;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.ContainerUtilRt;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -258,7 +259,7 @@ public abstract class AbstractModuleDataService<E extends ModuleData> extends Ab
|
||||
}
|
||||
orphanModulesList.setBorder(IdeBorderFactory.createEmptyBorder(8));
|
||||
content.add(orphanModulesList, ExternalSystemUiUtil.getFillLineConstraints(0));
|
||||
content.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 8, 0));
|
||||
content.setBorder(JBUI.Borders.empty(0, 0, 8, 0));
|
||||
|
||||
DialogWrapper dialog = new DialogWrapper(project) {
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -175,7 +175,7 @@ public class ArrangementAtomMatchConditionComponent implements ArrangementUiComp
|
||||
GridBagConstraints constraints = new GridBag().anchor(GridBagConstraints.WEST).weightx(1)
|
||||
.insets(0, 0, 0, myCloseButton == null ? ArrangementConstants.BORDER_ARC_SIZE : 0);
|
||||
insetsPanel.add(myTextControl, constraints);
|
||||
insetsPanel.setBorder(IdeBorderFactory.createEmptyBorder(0, ArrangementConstants.HORIZONTAL_PADDING, 0, 0));
|
||||
insetsPanel.setBorder(JBUI.Borders.emptyLeft(ArrangementConstants.HORIZONTAL_PADDING));
|
||||
insetsPanel.setOpaque(false);
|
||||
|
||||
JPanel roundBorderPanel = new JPanel(new GridBagLayout()) {
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,10 +25,10 @@ import com.intellij.openapi.application.ApplicationBundle;
|
||||
import com.intellij.psi.codeStyle.arrangement.match.ArrangementSectionRule;
|
||||
import com.intellij.psi.codeStyle.arrangement.std.ArrangementStandardSettingsManager;
|
||||
import com.intellij.psi.codeStyle.arrangement.std.StdArrangementRuleAliasToken;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SideBorder;
|
||||
import com.intellij.ui.components.JBScrollPane;
|
||||
import com.intellij.util.ui.GridBag;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -77,7 +77,7 @@ public class ArrangementMatchingRulesPanel extends JPanel implements DataProvide
|
||||
};
|
||||
myControl = createRulesControl(language, settingsManager, colorsProvider, callback);
|
||||
scrollPane.setViewportView(myControl);
|
||||
scrollPane.setViewportBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, scrollPane.getVerticalScrollBar().getPreferredSize().width));
|
||||
scrollPane.setViewportBorder(JBUI.Borders.emptyRight(scrollPane.getVerticalScrollBar().getPreferredSize().width));
|
||||
CustomizationUtil.installPopupHandler(
|
||||
myControl, ArrangementConstants.ACTION_GROUP_MATCHING_RULES_CONTEXT_MENU, ArrangementConstants.MATCHING_RULES_CONTROL_PLACE
|
||||
);
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -165,8 +165,7 @@ public class ImplementationViewComponent extends JPanel {
|
||||
myCountLabel = new JLabel();
|
||||
|
||||
final JPanel header = new JPanel(new BorderLayout(2, 0));
|
||||
header.setBorder(BorderFactory.createCompoundBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM),
|
||||
IdeBorderFactory.createEmptyBorder(0, 0, 0, 5)));
|
||||
header.setBorder(BorderFactory.createCompoundBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM), JBUI.Borders.emptyRight(5)));
|
||||
final JPanel toolbarPanel = new JPanel(new GridBagLayout());
|
||||
final GridBagConstraints gc = new GridBagConstraints(GridBagConstraints.RELATIVE, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,2,0,0), 0,0);
|
||||
toolbarPanel.add(myToolbar.getComponent(), gc);
|
||||
@@ -220,7 +219,7 @@ public class ImplementationViewComponent extends JPanel {
|
||||
myLabel.setIcon(getIconForFile(psiFile));
|
||||
myLabel.setForeground(FileStatusManager.getInstance(project).getStatus(file).getColor());
|
||||
myLabel.setText(file.getPresentableName());
|
||||
myLabel.setBorder(new CompoundBorder(IdeBorderFactory.createRoundedBorder(), IdeBorderFactory.createEmptyBorder(0, 0, 0, 5)));
|
||||
myLabel.setBorder(new CompoundBorder(IdeBorderFactory.createRoundedBorder(), JBUI.Borders.emptyRight(5)));
|
||||
}
|
||||
toolbarPanel.add(myLabel, gc);
|
||||
}
|
||||
@@ -303,7 +302,7 @@ public class ImplementationViewComponent extends JPanel {
|
||||
myLabel.setIcon(getIconForFile(psiFile));
|
||||
myLabel.setForeground(FileStatusManager.getInstance(project).getStatus(file).getColor());
|
||||
myLabel.setText(file.getPresentableName());
|
||||
myLabel.setBorder(new CompoundBorder(IdeBorderFactory.createRoundedBorder(), IdeBorderFactory.createEmptyBorder(0, 0, 0, 5)));
|
||||
myLabel.setBorder(new CompoundBorder(IdeBorderFactory.createRoundedBorder(), JBUI.Borders.emptyRight(5)));
|
||||
myLabel.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -48,8 +48,8 @@ import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.ui.ClickListener;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.SequentialModalProgressTask;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -328,7 +328,7 @@ public class QuickFixAction extends AnAction implements CustomComponentAction {
|
||||
}.installOn(button);
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new BoxLayout(panel, BoxLayout.LINE_AXIS));
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(7, 0, 8, 0));
|
||||
panel.setBorder(JBUI.Borders.empty(7, 0, 8, 0));
|
||||
panel.add(button);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,10 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
|
||||
import com.intellij.profile.codeInspection.ui.SingleInspectionProfilePanel;
|
||||
import com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeTable;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.BrowserHyperlinkListener;
|
||||
import com.intellij.ui.ClickListener;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.ui.components.JBLabelDecorator;
|
||||
import com.intellij.ui.components.panels.StatelessCardLayout;
|
||||
@@ -47,7 +50,7 @@ public class InspectionNodeInfo extends JPanel {
|
||||
public InspectionNodeInfo(@NotNull final InspectionTree tree,
|
||||
@NotNull final Project project) {
|
||||
setLayout(new GridBagLayout());
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(11, 0, 0, 0));
|
||||
setBorder(JBUI.Borders.emptyTop(11));
|
||||
final InspectionToolWrapper toolWrapper = tree.getSelectedToolWrapper(false);
|
||||
LOG.assertTrue(toolWrapper != null);
|
||||
InspectionProfileImpl currentProfile = InspectionProjectProfileManager.getInstance(project).getCurrentProfile();
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,8 +28,8 @@ import com.intellij.pom.Navigatable;
|
||||
import com.intellij.psi.NavigatablePsiElement;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class InspectionResultsViewUtil {
|
||||
static JLabel createLabelForText(String text) {
|
||||
final JLabel multipleSelectionLabel = new JBLabel(text);
|
||||
multipleSelectionLabel.setVerticalAlignment(SwingConstants.TOP);
|
||||
multipleSelectionLabel.setBorder(IdeBorderFactory.createEmptyBorder(16, 12, 0, 0));
|
||||
multipleSelectionLabel.setBorder(JBUI.Borders.empty(16, 12, 0, 0));
|
||||
return multipleSelectionLabel;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.codeInspection.ui;
|
||||
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.ui.components.labels.LinkLabel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
@@ -40,7 +39,7 @@ public class InspectionViewNavigationPanel extends JPanel implements InspectionT
|
||||
myNode = node;
|
||||
myTree = tree;
|
||||
setLayout(new BorderLayout());
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(18, 12, 0, 0));
|
||||
setBorder(JBUI.Borders.empty(18, 12, 0, 0));
|
||||
final String titleLabelText = getTitleText(true);
|
||||
add(new JBLabel(titleLabelText), BorderLayout.NORTH);
|
||||
myLinks = new JPanel();
|
||||
@@ -78,7 +77,7 @@ public class InspectionViewNavigationPanel extends JPanel implements InspectionT
|
||||
TreeUtil.selectInTree((DefaultMutableTreeNode)child, true, myTree);
|
||||
}
|
||||
};
|
||||
link.setBorder(IdeBorderFactory.createEmptyBorder(1, 17, 3, 1));
|
||||
link.setBorder(JBUI.Borders.empty(1, 17, 3, 1));
|
||||
myLinks.add(link);
|
||||
}
|
||||
myShownChildrenCount = currentChildrenCount;
|
||||
|
||||
+8
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,9 +27,9 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SimpleColoredComponent;
|
||||
import com.intellij.util.ui.AsyncProcessIcon;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -105,7 +105,10 @@ public class QuickFixPreviewPanelFactory {
|
||||
}
|
||||
|
||||
if (hasComponents) {
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(hasFixes ? 2 : 9, (hasFixes || problemCount > 1) ? 8 : 5, hasFixes ? 0 : 8, 0));
|
||||
int top = hasFixes ? 2 : 9;
|
||||
int left = (hasFixes || problemCount > 1) ? 8 : 5;
|
||||
int bottom = hasFixes ? 0 : 8;
|
||||
setBorder(JBUI.Borders.empty(top, left, bottom, 0));
|
||||
}
|
||||
return !hasComponents;
|
||||
}
|
||||
@@ -175,7 +178,7 @@ public class QuickFixPreviewPanelFactory {
|
||||
private LoadingInProgressPreview(InspectionResultsView view) {
|
||||
myView = view;
|
||||
setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(16, 9, 13, 0));
|
||||
setBorder(JBUI.Borders.empty(16, 9, 13, 0));
|
||||
AsyncProcessIcon waitingIcon = new AsyncProcessIcon("Inspection preview panel updating...");
|
||||
Disposer.register(this, waitingIcon);
|
||||
myWaitingLabel = getLabel(myView.getTree().getSelectedProblemCount(false));
|
||||
@@ -210,7 +213,7 @@ public class QuickFixPreviewPanelFactory {
|
||||
private static SimpleColoredComponent getLabel(int problemsCount) {
|
||||
SimpleColoredComponent label = new SimpleColoredComponent();
|
||||
appendTextToLabel(label, problemsCount);
|
||||
label.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 2));
|
||||
label.setBorder(JBUI.Borders.empty(0, 0, 0, 2));
|
||||
return label;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -30,7 +30,6 @@ import com.intellij.openapi.project.DumbAwareAction;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SizedIcon;
|
||||
import com.intellij.ui.components.panels.NonOpaquePanel;
|
||||
import com.intellij.util.IconUtil;
|
||||
@@ -127,7 +126,7 @@ public class RunConfigurationsComboBoxAction extends ComboBoxAction implements D
|
||||
ComboBoxButton button = createComboBoxButton(presentation);
|
||||
button.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2));
|
||||
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 2));
|
||||
panel.setBorder(JBUI.Borders.empty(0, 0, 0, 2));
|
||||
panel.add(button);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,11 +26,11 @@ import com.intellij.openapi.options.*;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.ui.ColoredListCellRenderer;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScrollingUtil;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.update.Activatable;
|
||||
import com.intellij.util.ui.update.UiNotifyConnector;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -149,7 +149,7 @@ public class ConfigurationSettingsEditor extends CompositeSettingsEditor<RunnerA
|
||||
JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.add(wrappedConfigEditor.getComponent(), BorderLayout.CENTER);
|
||||
JComponent wrappedRunEditorComponent = wrappedRunEditor.getComponent();
|
||||
wrappedRunEditorComponent.setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 0, 0));
|
||||
wrappedRunEditorComponent.setBorder(JBUI.Borders.emptyTop(3));
|
||||
panel.add(wrappedRunEditorComponent, BorderLayout.SOUTH);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -75,10 +75,7 @@ import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.messages.MessageBusConnection;
|
||||
import com.intellij.util.ui.AsyncProcessIcon;
|
||||
import com.intellij.util.ui.ColumnInfo;
|
||||
import com.intellij.util.ui.ListTableModel;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.*;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -1200,7 +1197,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction {
|
||||
public Component prepareRenderer(@NotNull TableCellRenderer renderer, int row, int column) {
|
||||
Component component = super.prepareRenderer(renderer, row, column);
|
||||
if (component instanceof JComponent) {
|
||||
((JComponent)component).setBorder(IdeBorderFactory.createEmptyBorder(MARGIN, MARGIN, MARGIN, 0));
|
||||
((JComponent)component).setBorder(JBUI.Borders.empty(MARGIN, MARGIN, MARGIN, 0));
|
||||
}
|
||||
return component;
|
||||
}
|
||||
|
||||
@@ -1668,7 +1668,7 @@ public class FindDialog extends DialogWrapper implements FindUI {
|
||||
setLayout(new BorderLayout());
|
||||
add(myUsageRenderer, BorderLayout.CENTER);
|
||||
add(myFileAndLineNumber, BorderLayout.EAST);
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(MARGIN, MARGIN, MARGIN, 0));
|
||||
setBorder(JBUI.Borders.empty(MARGIN, MARGIN, MARGIN, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,7 +27,7 @@ import com.intellij.openapi.ui.popup.Balloon;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
@@ -56,7 +56,7 @@ public class GotoRelatedSymbolAction extends AnAction {
|
||||
List<GotoRelatedItem> items = NavigationUtil.collectRelatedItems(element, dataContext);
|
||||
if (items.isEmpty()) {
|
||||
final JComponent label = HintUtil.createErrorLabel("No related symbols");
|
||||
label.setBorder(IdeBorderFactory.createEmptyBorder(2, 7, 2, 7));
|
||||
label.setBorder(JBUI.Borders.empty(2, 7));
|
||||
JBPopupFactory.getInstance().createBalloonBuilder(label)
|
||||
.setFadeoutTime(3000)
|
||||
.setFillColor(HintUtil.getErrorColor())
|
||||
|
||||
@@ -701,7 +701,7 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
topPanel.add(controls, BorderLayout.EAST);
|
||||
panel.add(myPopupField, BorderLayout.CENTER);
|
||||
panel.add(topPanel, BorderLayout.NORTH);
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(3, 5, 4, 5));
|
||||
panel.setBorder(JBUI.Borders.empty(3, 5, 4, 5));
|
||||
DataManager.registerDataProvider(panel, this);
|
||||
final ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(panel, editor);
|
||||
myBalloon = builder
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,11 +23,15 @@ import com.intellij.openapi.ui.Queryable;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.HintHint;
|
||||
import com.intellij.ui.LightweightHint;
|
||||
import com.intellij.ui.ListenerUtil;
|
||||
import com.intellij.ui.ScrollingUtil;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.ui.popup.HintUpdateSupply;
|
||||
import com.intellij.ui.speedSearch.ListWithFilter;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -161,7 +165,7 @@ public class NavBarPopup extends LightweightHint implements Disposable{
|
||||
disposables.add(navBarItem);
|
||||
return navBarItem;
|
||||
});
|
||||
list.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
list.setBorder(JBUI.Borders.empty(5, 5, 5, 5));
|
||||
installMoveAction(list, panel, -1, KeyEvent.VK_LEFT);
|
||||
installMoveAction(list, panel, 1, KeyEvent.VK_RIGHT);
|
||||
installEnterAction(list, panel, KeyEvent.VK_ENTER);
|
||||
|
||||
@@ -450,7 +450,7 @@ public abstract class ChooseByNameBase {
|
||||
myToolArea = new JLabel(JBUI.scale(EmptyIcon.create(1, 24)));
|
||||
}
|
||||
else {
|
||||
myToolArea.setBorder(IdeBorderFactory.createEmptyBorder(0, 6, 0, 0)); // space between checkbox and filter/show all in view buttons
|
||||
myToolArea.setBorder(JBUI.Borders.emptyLeft(6)); // space between checkbox and filter/show all in view buttons
|
||||
}
|
||||
hBox.add(myToolArea);
|
||||
hBox.add(toolbarComponent);
|
||||
|
||||
@@ -50,6 +50,7 @@ import com.intellij.util.concurrency.Semaphore;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.ContainerUtilRt;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -573,7 +574,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
|
||||
Object value = ((MatchedValue) matchedValue).value;
|
||||
String pattern = ((MatchedValue)matchedValue).pattern;
|
||||
|
||||
Border eastBorder = IdeBorderFactory.createEmptyBorder(0, 0, 0, 2);
|
||||
Border eastBorder = JBUI.Borders.emptyRight(2);
|
||||
if (value instanceof ActionWrapper) {
|
||||
ActionWrapper actionWithParentGroup = (ActionWrapper)value;
|
||||
AnAction anAction = actionWithParentGroup.getAction();
|
||||
@@ -662,7 +663,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
|
||||
OnOffButton button = new OnOffButton();
|
||||
button.setSelected(selected);
|
||||
panel.add(button, BorderLayout.EAST);
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0, 2, 0, 2));
|
||||
panel.setBorder(JBUI.Borders.empty(0, 2));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+4
-2
@@ -85,6 +85,8 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.util.containers.ContainerUtil.exists;
|
||||
|
||||
import com.intellij.util.containers.Queue;
|
||||
|
||||
public class SingleInspectionProfilePanel extends JPanel {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.ex.InspectionToolsPanel");
|
||||
@NonNls private static final String INSPECTION_FILTER_HISTORY = "INSPECTION_FILTER_HISTORY";
|
||||
@@ -1048,7 +1050,7 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
|
||||
myBrowser = new JEditorPane(UIUtil.HTML_MIME, EMPTY_HTML);
|
||||
myBrowser.setEditable(false);
|
||||
myBrowser.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
myBrowser.setBorder(JBUI.Borders.empty(5, 5, 5, 5));
|
||||
myBrowser.addHyperlinkListener(new HyperlinkAdapter() {
|
||||
@Override
|
||||
protected void hyperlinkActivated(HyperlinkEvent e) {
|
||||
@@ -1089,7 +1091,7 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
final JScrollPane tree = initTreeScrollPane();
|
||||
|
||||
final JPanel northPanel = new JPanel(new GridBagLayout());
|
||||
northPanel.setBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0));
|
||||
northPanel.setBorder(JBUI.Borders.empty(2, 0, 2, 0));
|
||||
myProfileFilter.setPreferredSize(new Dimension(20, myProfileFilter.getPreferredSize().height));
|
||||
northPanel.add(myProfileFilter, new GridBagConstraints(0, 0, 1, 1, 0.5, 1, GridBagConstraints.BASELINE_TRAILING, GridBagConstraints.HORIZONTAL,
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,8 +16,8 @@
|
||||
package com.intellij.profile.codeInspection.ui.table;
|
||||
|
||||
import com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeTable;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.ThreeStateCheckBox;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ThreeStateCheckBoxRenderer extends ThreeStateCheckBox implements Ta
|
||||
setThirdStateEnabled(false);
|
||||
setHorizontalAlignment(CENTER);
|
||||
setVerticalAlignment(CENTER);
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, InspectionsConfigTreeTable.getAdditionalPadding()));
|
||||
setBorder(JBUI.Borders.empty(0, 0, 0, InspectionsConfigTreeTable.getAdditionalPadding()));
|
||||
addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
|
||||
+2
-1
@@ -47,6 +47,7 @@ import com.intellij.ui.treeStructure.Tree;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.IJSwingUtilities;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.table.JBListTable;
|
||||
import com.intellij.util.ui.table.JBTableRowEditor;
|
||||
@@ -337,7 +338,7 @@ public abstract class ChangeSignatureDialogBase<ParamInfo extends ParameterInfo,
|
||||
bottom.add(optionsPanel, BorderLayout.NORTH);
|
||||
bottom.add(createSignaturePanel(), BorderLayout.SOUTH);
|
||||
main.add(bottom, BorderLayout.SOUTH);
|
||||
main.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 0, 0));
|
||||
main.setBorder(JBUI.Borders.emptyTop(5));
|
||||
return main;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,8 +21,6 @@ import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.editor.ex.EditorEx;
|
||||
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
|
||||
import com.intellij.openapi.editor.highlighter.EditorHighlighterFactory;
|
||||
import com.intellij.openapi.editor.impl.SettingsImpl;
|
||||
import com.intellij.openapi.editor.impl.softwrap.SoftWrapAppliancePlaces;
|
||||
import com.intellij.openapi.editor.markup.HighlighterLayer;
|
||||
import com.intellij.openapi.editor.markup.RangeHighlighter;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
@@ -32,7 +30,6 @@ import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScreenUtil;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
@@ -198,7 +195,7 @@ public class DetailViewImpl extends JPanel implements DetailView, UserDataHolder
|
||||
remove(myLabel);
|
||||
if (myDetailPanelWrapper == null) {
|
||||
myDetailPanelWrapper = new JPanel(new GridLayout(1, 1));
|
||||
myDetailPanelWrapper.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
myDetailPanelWrapper.setBorder(JBUI.Borders.empty(5, 5, 5, 5));
|
||||
myDetailPanelWrapper.add(panel);
|
||||
|
||||
add(myDetailPanelWrapper, BorderLayout.NORTH);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -17,7 +17,7 @@ package com.intellij.ui;
|
||||
|
||||
import com.intellij.ui.border.IdeaTitledBorder;
|
||||
import com.intellij.util.ui.JBInsets;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.intellij.lang.annotations.MagicConstant;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -68,11 +68,15 @@ public class IdeBorderFactory {
|
||||
return createEmptyBorder(0);
|
||||
}
|
||||
public static Border createEmptyBorder(int thickness) {
|
||||
return new EmptyBorder(new JBInsets(thickness, thickness, thickness, thickness));
|
||||
return JBUI.Borders.empty(thickness);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see JBUI.Borders#empty(int, int, int, int)
|
||||
*/
|
||||
public static Border createEmptyBorder(int top, int left, int bottom, int right) {
|
||||
return new EmptyBorder(new JBInsets(top, left, bottom, right));
|
||||
return JBUI.Borders.empty(top, left, bottom, right);
|
||||
}
|
||||
|
||||
public static TitledBorder createTitledBorder(String s) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.intellij.ui.components.JBList;
|
||||
import com.intellij.ui.components.JBTextField;
|
||||
import com.intellij.util.ReflectionUtil;
|
||||
import com.intellij.util.ui.JBInsets;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -201,13 +202,13 @@ public class SearchTextField extends JPanel {
|
||||
myToggleHistoryLabel.setBackground(myTextField.getBackground());
|
||||
myClearFieldLabel.setBackground(myTextField.getBackground());
|
||||
|
||||
setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0), originalBorder));
|
||||
setBorder(new CompoundBorder(JBUI.Borders.empty(2, 0, 2, 0), originalBorder));
|
||||
|
||||
myTextField.setOpaque(true);
|
||||
myTextField.setBorder(IdeBorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
myTextField.setBorder(JBUI.Borders.empty(0, 5, 0, 5));
|
||||
}
|
||||
else {
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0));
|
||||
setBorder(JBUI.Borders.empty(2, 0, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class TitledSeparator extends JPanel {
|
||||
public static final int SEPARATOR_LEFT_INSET = 6;
|
||||
public static final int SEPARATOR_RIGHT_INSET = 3;
|
||||
|
||||
public static final Border EMPTY_BORDER = IdeBorderFactory.createEmptyBorder(TOP_INSET, 0, BOTTOM_INSET, 0);
|
||||
public static final Border EMPTY_BORDER = JBUI.Borders.empty(TOP_INSET, 0, BOTTOM_INSET, 0);
|
||||
|
||||
protected final JBLabel myLabel = new JBLabel() {
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,7 +19,6 @@
|
||||
*/
|
||||
package com.intellij.util.ui;
|
||||
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -131,7 +130,7 @@ public class FormBuilder {
|
||||
|
||||
public FormBuilder addTooltip(final String text) {
|
||||
final JBLabel label = new JBLabel(text, UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER);
|
||||
label.setBorder(IdeBorderFactory.createEmptyBorder(0, 10, 0, 0));
|
||||
label.setBorder(JBUI.Borders.emptyLeft(10));
|
||||
return addComponentToRightColumn(label, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -34,6 +34,7 @@ import com.intellij.ui.*;
|
||||
import com.intellij.ui.components.panels.Wrapper;
|
||||
import com.intellij.ui.tabs.TabsUtil;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -112,12 +113,12 @@ public class LightToolWindow extends JPanel {
|
||||
add(header, BorderLayout.NORTH);
|
||||
|
||||
JLabel titleLabel = new JLabel(title);
|
||||
titleLabel.setBorder(IdeBorderFactory.createEmptyBorder(2, 5, 2, 10));
|
||||
titleLabel.setBorder(JBUI.Borders.empty(2, 5, 2, 10));
|
||||
titleLabel.setFont(UIUtil.getLabelFont(UIUtil.FontSize.SMALL));
|
||||
header.add(titleLabel, BorderLayout.CENTER);
|
||||
|
||||
JPanel actionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 0));
|
||||
actionPanel.setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 2, 0));
|
||||
actionPanel.setBorder(JBUI.Borders.empty(3, 0, 2, 0));
|
||||
actionPanel.setOpaque(false);
|
||||
header.add(actionPanel, BorderLayout.EAST);
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ import com.intellij.idea.Main;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.MemoryDumpHelper;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -64,12 +64,12 @@ public class OutOfMemoryDialog extends DialogWrapper {
|
||||
|
||||
myIconLabel.setIcon(Messages.getErrorIcon());
|
||||
myMessageLabel.setText(DiagnosticBundle.message("diagnostic.out.of.memory.error", memoryKind.optionName));
|
||||
myMessageLabel.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 10, 0));
|
||||
myMessageLabel.setBorder(JBUI.Borders.empty(0, 0, 10, 0));
|
||||
|
||||
File file = VMOptions.getWriteFile();
|
||||
if (file != null) {
|
||||
mySettingsFileHintLabel.setText(DiagnosticBundle.message("diagnostic.out.of.memory.willBeSavedTo", file.getPath()));
|
||||
mySettingsFileHintLabel.setBorder(IdeBorderFactory.createEmptyBorder(10, 0, 0, 0));
|
||||
mySettingsFileHintLabel.setBorder(JBUI.Borders.empty(10, 0, 0, 0));
|
||||
}
|
||||
else {
|
||||
mySettingsFileHintLabel.setVisible(false);
|
||||
|
||||
+2
-2
@@ -48,11 +48,11 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.ArrayUtilRt;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.StatusText;
|
||||
import com.intellij.util.ui.TextTransferable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -473,7 +473,7 @@ public class InstalledPluginsManagerMain extends PluginManagerMain {
|
||||
comp.setVerticalTextPosition(SwingConstants.CENTER);
|
||||
comp.setAlignmentX(Component.RIGHT_ALIGNMENT);
|
||||
panel.add(comp, BorderLayout.WEST);
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0, 2, 0, 0));
|
||||
panel.setBorder(JBUI.Borders.emptyLeft(2));
|
||||
return panel;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,7 +21,7 @@ import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.ui.MultiLineLabelUI;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -59,7 +59,7 @@ public class UndefinedMacrosConfigurable implements Configurable{
|
||||
|
||||
final JLabel textLabel = new JLabel(myText);
|
||||
textLabel.setUI(new MultiLineLabelUI());
|
||||
textLabel.setBorder(IdeBorderFactory.createEmptyBorder(6, 6, 6, 6));
|
||||
textLabel.setBorder(JBUI.Borders.empty(6, 6, 6, 6));
|
||||
mainPanel.add(textLabel, BorderLayout.NORTH);
|
||||
|
||||
return mainPanel;
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -94,7 +94,8 @@ public class WelcomeBalloonLayoutImpl extends BalloonLayoutImpl {
|
||||
pane.getVerticalScrollBar().addComponentListener(new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentShown(ComponentEvent e) {
|
||||
pane.setBorder(IdeBorderFactory.createEmptyBorder(SystemInfo.isMac ? 2 : 1, 0, 1, 1));
|
||||
int top = SystemInfo.isMac ? 2 : 1;
|
||||
pane.setBorder(JBUI.Borders.empty(top, 0, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,6 +16,7 @@
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.vcs.changes.RefreshablePanel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -50,7 +51,7 @@ public abstract class AbstractTitledSeparatorWithIcon extends JPanel {
|
||||
new GridBagConstraints(1, 0, GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(3, 0, 0, 0), 0, 0);
|
||||
add(mySeparator, gb);
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 5, 5));
|
||||
setBorder(JBUI.Borders.empty(3, 0, 5, 5));
|
||||
myLabel.setFont(UIUtil.getTitledBorderFont());
|
||||
myLabel.setForeground(UIUtil.getLabelForeground());
|
||||
originalText = text;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,8 +25,8 @@ import com.intellij.openapi.ui.popup.ListPopupStep;
|
||||
import com.intellij.openapi.ui.popup.ListPopupStepEx;
|
||||
import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
|
||||
import com.intellij.ui.ColorUtil;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class PopupListElementRenderer<E> extends GroupedItemsListRenderer<E> {
|
||||
createLabel();
|
||||
panel.add(myTextLabel, BorderLayout.CENTER);
|
||||
myShortcutLabel = new JLabel();
|
||||
myShortcutLabel.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 3));
|
||||
myShortcutLabel.setBorder(JBUI.Borders.empty(0, 0, 0, 3));
|
||||
Color color = UIManager.getColor("MenuItem.acceleratorForeground");
|
||||
myShortcutLabel.setForeground(color);
|
||||
panel.add(myShortcutLabel, BorderLayout.EAST);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,7 +19,6 @@ import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.Presentation;
|
||||
import com.intellij.openapi.actionSystem.ex.CustomComponentAction;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SearchTextField;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -61,7 +60,7 @@ public abstract class SearchFieldAction extends AnAction implements CustomCompon
|
||||
}
|
||||
};
|
||||
Border border = myField.getBorder();
|
||||
Border emptyBorder = IdeBorderFactory.createEmptyBorder(3, 0, 2, 0);
|
||||
Border emptyBorder = JBUI.Borders.empty(3, 0, 2, 0);
|
||||
if (border instanceof CompoundBorder) {
|
||||
if (!UIUtil.isUnderDarcula()) {
|
||||
myField.setBorder(new CompoundBorder(emptyBorder, ((CompoundBorder)border).getInsideBorder()));
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -18,7 +21,7 @@ import com.intellij.openapi.actionSystem.Presentation;
|
||||
import com.intellij.openapi.actionSystem.ex.CustomComponentAction;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.ui.ClickListener;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -75,10 +78,10 @@ public abstract class TextFieldAction extends AnAction implements CustomComponen
|
||||
originalBorder = myField.getBorder();
|
||||
}
|
||||
|
||||
panel.setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(4, 0, 4, 0), originalBorder));
|
||||
panel.setBorder(new CompoundBorder(JBUI.Borders.empty(4, 0, 4, 0), originalBorder));
|
||||
|
||||
myField.setOpaque(true);
|
||||
myField.setBorder(IdeBorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
myField.setBorder(JBUI.Borders.empty(0, 5, 0, 5));
|
||||
|
||||
new ClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.intellij.psi.codeStyle.CustomCodeStyleSettings;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBCheckBox;
|
||||
import com.intellij.util.messages.MessageBus;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.editorconfig.Utils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -37,7 +38,7 @@ public class EditorConfigConfigurable extends CodeStyleSettingsProvider implemen
|
||||
panel.add(myEnabled);
|
||||
final JLabel warning = new JLabel("EditorConfig may override the IDE code style settings");
|
||||
warning.setFont(UIUtil.getLabelFont(UIUtil.FontSize.SMALL));
|
||||
warning.setBorder(IdeBorderFactory.createEmptyBorder(0, 20, 0, 0));
|
||||
warning.setBorder(JBUI.Borders.emptyLeft(20));
|
||||
panel.add(warning);
|
||||
panel.setAlignmentY(Component.TOP_ALIGNMENT);
|
||||
result.add(panel);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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,8 +19,8 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import git4idea.DialogManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -90,7 +90,7 @@ public class GitSmartOperationDialog extends DialogWrapper {
|
||||
JBLabel description = new JBLabel("<html>Your local changes to the following files would be overwritten by " + myOperationTitle +
|
||||
".<br/>" + ApplicationNamesInfo.getInstance().getFullProductName() + " can stash the changes, "
|
||||
+ myOperationTitle + " and unstash them after that.</html>");
|
||||
description.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 10, 0));
|
||||
description.setBorder(JBUI.Borders.emptyBottom(10));
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.util.ThrowableRunnable;
|
||||
import com.intellij.util.containers.FixedHashMap;
|
||||
import com.intellij.util.containers.IntArrayList;
|
||||
import com.intellij.util.ui.AsyncProcessIcon;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -433,7 +434,7 @@ public abstract class DesignerEditorPanel extends JPanel
|
||||
}
|
||||
if (message.myAdditionalFixes != null && message.myAdditionalFixes.size() > 0) {
|
||||
JPanel fixesPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0));
|
||||
fixesPanel.setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 10, 0));
|
||||
fixesPanel.setBorder(JBUI.Borders.empty(3, 0, 10, 0));
|
||||
fixesPanel.setOpaque(false);
|
||||
fixesPanel.add(Box.createHorizontalStrut(icon.getIconWidth()));
|
||||
|
||||
|
||||
+7
-7
@@ -84,11 +84,11 @@ public class EduCoursesPanel extends JPanel {
|
||||
GuiUtils.replaceJSplitPaneWithIDEASplitter(mySplitPaneRoot, true);
|
||||
mySplitPane.setDividerLocation(0.5);
|
||||
mySplitPane.setResizeWeight(0.5);
|
||||
myCourseNameLabel.setBorder(IdeBorderFactory.createEmptyBorder(20, 10, 5, 10));
|
||||
myCourseNameLabel.setBorder(JBUI.Borders.empty(20, 10, 5, 10));
|
||||
Font labelFont = UIUtil.getLabelFont();
|
||||
myCourseNameLabel.setFont(new Font(labelFont.getName(), Font.BOLD, JBUI.scaleFontSize(18.0f)));
|
||||
myTagsPanel.setBorder(IdeBorderFactory.createEmptyBorder(0, 10, 0, 10));
|
||||
myDescriptionTextArea.setBorder(IdeBorderFactory.createEmptyBorder(20, 10, 10, 10));
|
||||
myTagsPanel.setBorder(JBUI.Borders.empty(0, 10));
|
||||
myDescriptionTextArea.setBorder(JBUI.Borders.empty(20, 10, 10, 10));
|
||||
myDescriptionTextArea.setEditorKit(UIUtil.getHTMLEditorKit());
|
||||
myDescriptionTextArea.setEditable(false);
|
||||
myDescriptionTextArea.setPreferredSize(JBUI.size(myCoursePanel.getPreferredSize()));
|
||||
@@ -97,7 +97,7 @@ public class EduCoursesPanel extends JPanel {
|
||||
myCourses = getCourses();
|
||||
updateModel(myCourses, null);
|
||||
myErrorLabel.setVisible(false);
|
||||
myErrorLabel.setBorder(IdeBorderFactory.createEmptyBorder(20, 10, 0, 0));
|
||||
myErrorLabel.setBorder(JBUI.Borders.empty(20, 10, 0, 0));
|
||||
|
||||
ListCellRendererWrapper<Course> renderer = new ListCellRendererWrapper<Course>() {
|
||||
@Override
|
||||
@@ -124,7 +124,7 @@ public class EduCoursesPanel extends JPanel {
|
||||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
Component component = renderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
if (component instanceof JLabel) {
|
||||
((JLabel)component).setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 0));
|
||||
((JLabel)component).setBorder(JBUI.Borders.empty(5, 0));
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class EduCoursesPanel extends JPanel {
|
||||
myCourseListPanel.setBorder(JBUI.Borders.customLine(OnePixelDivider.BACKGROUND, 1, 1, 1, 1));
|
||||
HideableDecorator decorator = new HideableDecorator(myAdvancedSettingsPlaceholder, "Advanced Settings", false);
|
||||
decorator.setContentComponent(myAdvancedSettings);
|
||||
myAdvancedSettings.setBorder(IdeBorderFactory.createEmptyBorder(0, IdeBorderFactory.TITLED_BORDER_INDENT, 5, 0));
|
||||
myAdvancedSettings.setBorder(JBUI.Borders.empty(0, IdeBorderFactory.TITLED_BORDER_INDENT, 5, 0));
|
||||
myCoursesList.setBackground(LIST_COLOR);
|
||||
myDescriptionTextArea.setBackground(UIUtil.getPanelBackground());
|
||||
myAdvancedSettingsPlaceholder.setVisible(false);
|
||||
@@ -311,7 +311,7 @@ public class EduCoursesPanel extends JPanel {
|
||||
}
|
||||
|
||||
private static JLabel createTagLabel(String tagText) {
|
||||
Border emptyBorder = IdeBorderFactory.createEmptyBorder(3, 5, 3, 5);
|
||||
Border emptyBorder = JBUI.Borders.empty(3, 5);
|
||||
JBLabel label = new JBLabel(tagText);
|
||||
label.setOpaque(true);
|
||||
label.setBorder(emptyBorder);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -31,11 +31,11 @@ import com.intellij.openapi.util.NotNullLazyValue;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.SmartPsiElementPointer;
|
||||
import com.intellij.psi.util.PsiUtilCore;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.NullableFunction;
|
||||
import com.intellij.util.PsiNavigateUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -119,7 +119,7 @@ public abstract class NavigationGutterIconRenderer extends GutterIconRenderer
|
||||
if (myEmptyText != null) {
|
||||
if (event != null) {
|
||||
final JComponent label = HintUtil.createErrorLabel(myEmptyText);
|
||||
label.setBorder(IdeBorderFactory.createEmptyBorder(2, 7, 2, 7));
|
||||
label.setBorder(JBUI.Borders.empty(2, 7, 2, 7));
|
||||
JBPopupFactory.getInstance().createBalloonBuilder(label)
|
||||
.setFadeoutTime(3000)
|
||||
.setFillColor(HintUtil.getErrorColor())
|
||||
|
||||
@@ -91,7 +91,7 @@ public class EmmetAbbreviationBalloon {
|
||||
field.setHistorySize(10);
|
||||
|
||||
JBLabel label = new JBLabel(AllIcons.General.ContextHelp);
|
||||
label.setBorder(IdeBorderFactory.createEmptyBorder(0, 3, 0, 1));
|
||||
label.setBorder(JBUI.Borders.empty(0, 3, 0, 1));
|
||||
IdeTooltipManager.getInstance().setCustomTooltip(label, new ContextHelpTooltip(label, myDocumentation));
|
||||
|
||||
panel.add(field, BorderLayout.CENTER);
|
||||
|
||||
Reference in New Issue
Block a user