HiDPI default component/dialog sizes

This commit is contained in:
Konstantin Bulenkov
2015-02-19 20:05:54 +01:00
parent bb0f1e39e9
commit 329388fcbe
28 changed files with 113 additions and 64 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBList;
import com.intellij.util.EventDispatcher;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.JBUI;
import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
@@ -121,7 +122,7 @@ public class OptionsPanelImpl extends JPanel implements OptionsPanel {
myOptionsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myOptionsList);
scrollPane.setPreferredSize(new Dimension(230, 60));
scrollPane.setPreferredSize(JBUI.size(230, 60));
JPanel north = new JPanel(new BorderLayout());
north.add(scrollPane, BorderLayout.CENTER);
north.add(myOptionsPanel, BorderLayout.EAST);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 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,8 +20,9 @@ import com.intellij.openapi.help.HelpManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.TabbedPaneWrapper;
import com.intellij.ui.MappingListCellRenderer;
import com.intellij.ui.TabbedPaneWrapper;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -499,11 +500,11 @@ class PrintDialog extends DialogWrapper {
@Override
public Dimension getMinimumSize() {
return new Dimension(0,0);
return JBUI.emptySize();
}
@Override
public Dimension getPreferredSize() {
return new Dimension(0,0);
return JBUI.emptySize();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -45,6 +45,7 @@ import com.intellij.psi.util.PsiUtilBase;
import com.intellij.ui.HyperlinkLabel;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -197,7 +198,7 @@ public class HectorComponent extends JPanel {
private void layoutHorizontal(final JPanel panel) {
for (JSlider slider : mySliders.values()) {
slider.setOrientation(SwingConstants.HORIZONTAL);
slider.setPreferredSize(new Dimension(200, 40));
slider.setPreferredSize(JBUI.size(200, 40));
panel.add(slider, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 0, 5, 0), 0, 0));
}
@@ -207,7 +208,7 @@ public class HectorComponent extends JPanel {
for (Language language : mySliders.keySet()) {
JSlider slider = mySliders.get(language);
JPanel borderPanel = new JPanel(new BorderLayout());
slider.setPreferredSize(new Dimension(100, 100));
slider.setPreferredSize(JBUI.size(100));
borderPanel.add(new JLabel(language.getID()), BorderLayout.NORTH);
borderPanel.add(slider, BorderLayout.CENTER);
panel.add(borderPanel, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0, 1, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL,
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -49,6 +49,7 @@ import com.intellij.ui.components.JBScrollPane;
import com.intellij.usages.UsageView;
import com.intellij.util.DocumentUtil;
import com.intellij.util.PairFunction;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -60,8 +61,10 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.util.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ImplementationViewComponent extends JPanel {
@NonNls private static final String TEXT_PAGE_KEY = "Text";
@@ -170,7 +173,7 @@ public class ImplementationViewComponent extends JPanel {
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);
setPreferredSize(new Dimension(600, 400));
setPreferredSize(JBUI.size(600, 400));
update(elements, new PairFunction<PsiElement[], List<FileDescriptor>, Boolean>() {
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 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,11 +21,11 @@ import com.intellij.openapi.options.BaseConfigurable;
import com.intellij.openapi.options.MasterDetails;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.ui.DetailsComponent;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
public class IntentionSettingsConfigurable extends BaseConfigurable implements SearchableConfigurable, MasterDetails {
private IntentionSettingsPanel myPanel;
@@ -38,7 +38,7 @@ public class IntentionSettingsConfigurable extends BaseConfigurable implements S
myPanel = new IntentionSettingsPanel();
}
JPanel component = myPanel.getComponent();
component.setPreferredSize(new Dimension(800, 600));
component.setPreferredSize(JBUI.size(800, 600));
component.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
return component;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -45,6 +45,7 @@ import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.ui.GridBag;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.PlatformColors;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
@@ -148,7 +149,7 @@ public class LiveTemplateSettingsEditor extends JPanel {
GridBag gb = new GridBag().setDefaultInsets(4, 4, 4, 4).setDefaultWeightY(1).setDefaultFill(GridBagConstraints.BOTH);
JPanel editorPanel = new JPanel(new BorderLayout(4, 4));
editorPanel.setPreferredSize(new Dimension(250, 100));
editorPanel.setPreferredSize(JBUI.size(250, 100));
editorPanel.setMinimumSize(editorPanel.getPreferredSize());
editorPanel.add(myTemplateEditor.getComponent(), BorderLayout.CENTER);
JLabel templateTextLabel = new JLabel(CodeInsightBundle.message("dialog.edit.template.template.text.title"));
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2015 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.ui.ScrollPaneFactory;
import com.intellij.ui.TreeSpeedSearch;
import com.intellij.ui.treeStructure.Tree;
import com.intellij.util.StringSetSpinAllocator;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
@@ -39,8 +40,10 @@ import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
public abstract class BaseExecuteBeforeRunDialog<T extends BeforeRunTask> extends DialogWrapper {
@@ -108,7 +111,7 @@ public abstract class BaseExecuteBeforeRunDialog<T extends BeforeRunTask> extend
expacndChecked(tree);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(tree);
scrollPane.setPreferredSize(new Dimension(400, 400));
scrollPane.setPreferredSize(JBUI.size(400, 400));
panel.add(scrollPane, BorderLayout.CENTER);
return panel;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -60,6 +60,7 @@ import com.intellij.util.NotNullFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.AbstractLayoutManager;
import com.intellij.util.ui.GraphicsUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -421,7 +422,7 @@ public class RunnerContentUi implements ContentUI, Disposable, CellTransform.Fac
}
Dimension size = gridCell.getSize();
if (size == null) {
size = new Dimension(200, 200);
size = JBUI.size(200, 200);
}
final DockableGrid content = new DockableGrid(null, null, size, Arrays.asList(contents), window);
if (target != null) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.openapi.util.Disposer;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.ui.components.labels.LinkListener;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -370,7 +371,7 @@ public class RegExHelpPopup extends JPanel {
@Override
public Dimension getPreferredSize() {
return new Dimension(600, 300);
return JBUI.size(600, 300);
}
public static JBPopup createRegExHelpPopup() throws BadLocationException {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -57,6 +57,7 @@ import com.intellij.ui.HyperlinkLabel;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.SeparatorFactory;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -204,7 +205,7 @@ public class FileTemplateConfigurable implements Configurable, Configurable.NoSc
onNameChanged();
}
});
myMainPanel.setPreferredSize(new Dimension(400, 300));
myMainPanel.setPreferredSize(JBUI.size(400, 300));
return myMainPanel;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 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.DoubleClickListener;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.SeparatorFactory;
import com.intellij.ui.components.JBList;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -162,7 +163,7 @@ public final class MacrosDialog extends DialogWrapper {
myPreviewTextarea.setLineWrap(true);
myPreviewTextarea.setPreferredSize(null);
panel.setPreferredSize(new Dimension(400, 500));
panel.setPreferredSize(JBUI.size(400, 500));
return panel;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -49,6 +49,7 @@ import com.intellij.util.Processor;
import com.intellij.util.Query;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.indexing.FindSymbolParameters;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -66,8 +67,10 @@ import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.*;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
public abstract class AbstractTreeClassChooserDialog<T extends PsiNamedElement> extends DialogWrapper implements TreeChooser<T> {
@NotNull private final Project myProject;
@@ -183,7 +186,7 @@ public abstract class AbstractTreeClassChooserDialog<T extends PsiNamedElement>
UIUtil.setLineStyleAngled(myTree);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
scrollPane.setPreferredSize(new Dimension(500, 300));
scrollPane.setPreferredSize(JBUI.size(500, 300));
myTree.addKeyListener(new KeyAdapter() {
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,7 @@ import com.intellij.ui.*;
import com.intellij.ui.docking.DockManager;
import com.intellij.ui.speedSearch.SpeedSearchSupply;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -228,7 +229,7 @@ public class FileStructureDialog extends DialogWrapper {
}
}.registerCustomShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE).getShortcutSet(), myCommanderPanel);
myCommanderPanel.setPreferredSize(new Dimension(400, 500));
myCommanderPanel.setPreferredSize(JBUI.size(400, 500));
JPanel panel = new JPanel(new BorderLayout());
JPanel comboPanel = new JPanel(new GridLayout(0, 2, 0, 0));
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ import com.intellij.util.PlatformIcons;
import com.intellij.util.containers.Convertor;
import com.intellij.util.containers.FactoryMap;
import com.intellij.util.containers.HashMap;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import org.jetbrains.annotations.NonNls;
@@ -361,7 +362,7 @@ public class MemberChooser<T extends ClassMember> extends DialogWrapper implemen
installSpeedSearch();
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
scrollPane.setPreferredSize(new Dimension(350, 450));
scrollPane.setPreferredSize(JBUI.size(350, 450));
panel.add(scrollPane, BorderLayout.CENTER);
return panel;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -53,6 +53,7 @@ import com.intellij.ui.treeStructure.Tree;
import com.intellij.util.ArrayUtil;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
@@ -182,7 +183,7 @@ public final class TreeFileChooserDialog extends DialogWrapper implements TreeFi
UIUtil.setLineStyleAngled(myTree);
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
scrollPane.setPreferredSize(new Dimension(500, 300));
scrollPane.setPreferredSize(JBUI.size(500, 300));
myTree.addKeyListener(new KeyAdapter() {
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame;
import com.intellij.platform.DirectoryProjectGenerator;
import com.intellij.ui.ListScrollingUtil;
import com.intellij.ui.components.JBList;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.update.UiNotifyConnector;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -53,7 +54,7 @@ public abstract class AbstractNewProjectDialog extends DialogWrapper {
final DefaultActionGroup root = createRootStep();
final Pair<JPanel, JBList> panel = FlatWelcomeFrame.createActionGroupPanel(root, getRootPane(), null);
final Dimension size = new Dimension(666, 385);
final Dimension size = JBUI.size(666, 385);
final JPanel component = panel.first;
component.setMinimumSize(size);
component.setPreferredSize(size);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.TreeSpeedSearch;
import com.intellij.util.IconUtil;
import com.intellij.util.containers.Convertor;
import com.intellij.util.containers.HashSet;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.tree.TreeUtil;
import com.intellij.util.xmlb.annotations.AbstractCollection;
import com.intellij.util.xmlb.annotations.Tag;
@@ -81,7 +82,7 @@ public class ScopeChooserConfigurable extends MasterDetailsComponent implements
@Override
protected Dimension getPanelPreferredSize() {
return new Dimension(400, 200);
return JBUI.size(400, 200);
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -74,6 +74,7 @@ import com.intellij.util.ArrayUtil;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ObjectUtils;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import org.jetbrains.annotations.NonNls;
@@ -443,7 +444,7 @@ public class PsiViewerDialog extends DialogWrapper implements DataProvider, Disp
final Dimension size = DimensionService.getInstance().getSize(getDimensionServiceKey(), myProject);
if (size == null) {
DimensionService.getInstance().setSize(getDimensionServiceKey(), new Dimension(800, 600));
DimensionService.getInstance().setSize(getDimensionServiceKey(), JBUI.size(800, 600));
}
myTextSplit.setDividerLocation(settings.textDividerLocation);
myTreeSplit.setDividerLocation(settings.treeDividerLocation);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -91,7 +91,7 @@ public class DependencyConfigurable extends BaseConfigurable {
private JPanel createRulesPanel(MyTableModel model, TableView<DependencyRule> table) {
table.setSurrendersFocusOnKeystroke(true);
table.setPreferredScrollableViewportSize(new Dimension(300, 150));
table.setPreferredScrollableViewportSize(JBUI.size(300, 150));
table.setShowGrid(true);
table.setRowHeight(new PackageSetChooserCombo(myProject, null).getPreferredSize().height);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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,8 +22,12 @@ import com.intellij.psi.search.scope.NonProjectFilesScope;
import com.intellij.psi.search.scope.packageSet.CustomScopesProviderEx;
import com.intellij.psi.search.scope.packageSet.NamedScope;
import com.intellij.psi.search.scope.packageSet.NamedScopesHolder;
import com.intellij.ui.*;
import com.intellij.ui.AnActionButton;
import com.intellij.ui.AnActionButtonRunnable;
import com.intellij.ui.ListUtil;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.components.JBList;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -67,7 +71,7 @@ public class ScopesOrderDialog extends DialogWrapper {
final JLabel descr = new JLabel("<html><p>If file appears in two or more scopes, it will be " +
"inspected with settings of the topmost scope in list above.</p><p/>" +
"<p>Scope order is set globally for all inspections in the profile.</p></html>");
descr.setPreferredSize(new Dimension(300, 100));
descr.setPreferredSize(JBUI.size(300, 100));
UIUtil.applyStyle(UIUtil.ComponentStyle.SMALL, descr);
myPanel = new JPanel();
myPanel.setLayout(new BorderLayout());
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2015 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 @@ import com.intellij.ui.TableUtil;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.table.JBTable;
import com.intellij.util.ui.EditableModel;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NonNls;
import javax.swing.*;
@@ -76,7 +77,7 @@ public abstract class AbstractParameterTablePanel extends JPanel {
myTable.setPreferredScrollableViewportSize(new Dimension(250, myTable.getRowHeight() * 5));
myTable.setShowGrid(false);
myTable.setIntercellSpacing(new Dimension(0, 0));
myTable.setIntercellSpacing(JBUI.emptySize());
@NonNls final InputMap inputMap = myTable.getInputMap();
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "enable_disable");
@NonNls final ActionMap actionMap = myTable.getActionMap();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -62,7 +63,7 @@ public class UnsafeUsagesDialog extends DialogWrapper {
myMessagePane = new JEditorPane(UIUtil.HTML_MIME, "");
myMessagePane.setEditable(false);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myMessagePane);
scrollPane.setPreferredSize(new Dimension(500, 400));
scrollPane.setPreferredSize(JBUI.size(500, 400));
panel.add(new JLabel(RefactoringBundle.message("the.following.problems.were.found")), BorderLayout.NORTH);
panel.add(scrollPane, BorderLayout.CENTER);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2015 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.usageView.UsageInfo;
import com.intellij.usages.*;
import com.intellij.util.ArrayUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -141,7 +142,7 @@ public class ConflictsDialog extends DialogWrapper{
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(messagePane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setPreferredSize(new Dimension(500, 400));
scrollPane.setPreferredSize(JBUI.size(500, 400));
panel.add(scrollPane, BorderLayout.CENTER);
if (getOKAction().isEnabled()) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.JBPopupMenu;
import com.intellij.openapi.ui.Messages;
import com.intellij.ui.PopupHandler;
import com.intellij.util.ui.JBUI;
import javax.swing.*;
import javax.swing.text.BadLocationException;
@@ -115,7 +116,7 @@ class FilterDialog extends DialogWrapper {
makePopup();
panel.setPreferredSize(new Dimension(335, 160));
panel.setPreferredSize(JBUI.size(335, 160));
mainPanel.add(panel, BorderLayout.NORTH);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 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.IdeBorderFactory;
import com.intellij.ui.ScreenUtil;
import com.intellij.ui.SideBorder;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -73,7 +74,7 @@ public class DetailViewImpl extends JPanel implements DetailView, UserDataHolder
public DetailViewImpl(Project project) {
super(new BorderLayout());
myProject = project;
setPreferredSize(new Dimension(600, 300));
setPreferredSize(JBUI.size(600, 300));
myLabel.setVerticalAlignment(SwingConstants.CENTER);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import com.intellij.openapi.ui.MessageType;
import com.intellij.ui.AnActionButton;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -70,7 +71,7 @@ public class FileColorsConfigurablePanel extends JPanel implements Disposable {
add(topPanel, BorderLayout.NORTH);
final JPanel mainPanel = new JPanel(new GridLayout(2, 1));
mainPanel.setPreferredSize(new Dimension(300, 500));
mainPanel.setPreferredSize(JBUI.size(300, 500));
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 0));
final List<FileColorConfiguration> localConfigurations = manager.getLocalConfigurations();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -42,6 +42,7 @@ import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -136,7 +137,7 @@ public class AnalyzeStacktraceUtil {
settings.setRightMarginShown(false);
StacktraceEditorPanel editorPanel = new StacktraceEditorPanel(project, editor);
editorPanel.setPreferredSize(new Dimension(600, 400));
editorPanel.setPreferredSize(JBUI.size(600, 400));
Disposer.register(parentDisposable, editorPanel);
return editorPanel;
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2015 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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.webcore.packaging;
import com.intellij.openapi.actionSystem.AnActionEvent;
@@ -11,11 +26,11 @@ import com.intellij.ui.AnActionButtonRunnable;
import com.intellij.ui.AnActionButtonUpdater;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.components.JBList;
import com.intellij.util.ui.JBUI;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
public class ManageRepoDialog extends DialogWrapper {
private JPanel myMainPanel;
@@ -104,7 +119,7 @@ public class ManageRepoDialog extends DialogWrapper {
});
final JPanel panel = decorator.createPanel();
panel.setPreferredSize(new Dimension(800, 600));
panel.setPreferredSize(JBUI.size(800, 600));
myMainPanel.add(panel);
}