mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
HiDPI default component/dialog sizes
This commit is contained in:
+3
-2
@@ -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.
|
||||
@@ -46,6 +46,7 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
import com.intellij.util.ui.AbstractTableCellEditor;
|
||||
import com.intellij.util.ui.ColumnInfo;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
import icons.JetgroovyIcons;
|
||||
@@ -390,7 +391,7 @@ public class DynamicToolWindowWrapper {
|
||||
|
||||
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTreeTable);
|
||||
|
||||
scrollPane.setPreferredSize(new Dimension(600, 400));
|
||||
scrollPane.setPreferredSize(JBUI.size(600, 400));
|
||||
return scrollPane;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.ui.NonFocusableCheckBox;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.groovy.doc.actions.GroovyDocAddPackageAction;
|
||||
import org.jetbrains.plugins.groovy.doc.actions.GroovyDocReducePackageAction;
|
||||
@@ -63,7 +64,7 @@ public final class GroovyDocGenerationPanel extends JPanel {
|
||||
myDataModel = new DefaultListModel();
|
||||
|
||||
myPackagesList = new JBList(myDataModel);
|
||||
myPackagesList.setMinimumSize(new Dimension(100, 150));
|
||||
myPackagesList.setMinimumSize(JBUI.size(100, 150));
|
||||
|
||||
JScrollPane packagesScrollPane = ScrollPaneFactory.createScrollPane(myPackagesList);
|
||||
myPackagesPanel.setLayout(new BorderLayout());
|
||||
@@ -75,7 +76,7 @@ public final class GroovyDocGenerationPanel extends JPanel {
|
||||
|
||||
actionToolbar.updateActionsImmediately();
|
||||
|
||||
myPanel.setMinimumSize(new Dimension(275, 350));
|
||||
myPanel.setMinimumSize(JBUI.size(275, 350));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -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.ui.*;
|
||||
import com.intellij.ui.table.JBTable;
|
||||
import com.intellij.util.ui.AbstractTableCellEditor;
|
||||
import com.intellij.util.ui.EditableModel;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.GroovyNamesUtil;
|
||||
import org.jetbrains.plugins.groovy.refactoring.GroovyRefactoringBundle;
|
||||
@@ -146,9 +147,9 @@ public abstract class ParameterTablePanel extends JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
myTable.setPreferredScrollableViewportSize(new Dimension(250, myTable.getRowHeight() * 5));
|
||||
myTable.setPreferredScrollableViewportSize(JBUI.size(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();
|
||||
|
||||
+4
-4
@@ -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.
|
||||
@@ -32,6 +32,7 @@ import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.ui.EditorTextField;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import gnu.trove.TObjectHashingStrategy;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -53,7 +54,6 @@ import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import javax.swing.event.EventListenerList;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EventListener;
|
||||
@@ -225,8 +225,8 @@ public class GroovyExtractMethodDialog extends DialogWrapper {
|
||||
|
||||
private void createUIComponents() {
|
||||
mySignature = new GrMethodSignatureComponent("", myProject);
|
||||
mySignature.setPreferredSize(new Dimension(500, 100));
|
||||
mySignature.setMinimumSize(new Dimension(500, 100));
|
||||
mySignature.setPreferredSize(JBUI.size(500, 100));
|
||||
mySignature.setMinimumSize(JBUI.size(500, 100));
|
||||
mySignature.setBorder(
|
||||
IdeBorderFactory.createTitledBorder(GroovyRefactoringBundle.message("signature.preview.border.title"), false));
|
||||
mySignature.setFocusable(false);
|
||||
|
||||
+5
-4
@@ -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.
|
||||
@@ -38,6 +38,7 @@ import com.intellij.ui.components.JBRadioButton;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.ui.GridBag;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import gnu.trove.TObjectIntHashMap;
|
||||
@@ -51,8 +52,8 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlo
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameter;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod;
|
||||
import org.jetbrains.plugins.groovy.refactoring.GrRefactoringError;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.GroovyNamesUtil;
|
||||
import org.jetbrains.plugins.groovy.refactoring.GrRefactoringError;
|
||||
import org.jetbrains.plugins.groovy.refactoring.GroovyRefactoringBundle;
|
||||
import org.jetbrains.plugins.groovy.refactoring.HelpID;
|
||||
import org.jetbrains.plugins.groovy.refactoring.extract.ExtractUtil;
|
||||
@@ -230,8 +231,8 @@ public class GrIntroduceParameterDialog extends DialogWrapper {
|
||||
splitter.setFirstComponent(myTable);
|
||||
splitter.setSecondComponent(mySignature);
|
||||
|
||||
mySignature.setPreferredSize(new Dimension(500, 100));
|
||||
mySignature.setSize(new Dimension(500, 100));
|
||||
mySignature.setPreferredSize(JBUI.size(500, 100));
|
||||
mySignature.setSize(JBUI.size(500, 100));
|
||||
|
||||
splitter.setShowDividerIcon(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user