mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use parameterless method createEmptyBorder() for short
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -192,7 +192,7 @@ public class JavaChangeSignatureDialog extends ChangeSignatureDialogBase<Paramet
|
||||
myPropExceptionsButton.setShortcut(CustomShortcutSet.fromString("alt X"));
|
||||
|
||||
final JPanel panel = ToolbarDecorator.createDecorator(table).addExtraAction(myPropExceptionsButton).createPanel();
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
|
||||
myExceptionsModel.addTableModelListener(mySignatureUpdater);
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -227,9 +227,9 @@ public class FavoritesTreeViewPanel extends JPanel implements DataProvider, Dock
|
||||
action.registerCustomShortcutSet(action.getShortcutSet(), myTree);
|
||||
final JPanel panel = decorator.createPanel();
|
||||
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
add(panel, BorderLayout.CENTER);
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
myAutoScrollToSourceHandler = new AutoScrollToSourceHandler() {
|
||||
@Override
|
||||
protected boolean isAutoScrollMode() {
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ public abstract class ChangeSignatureDialogBase<ParamInfo extends ParameterInfo,
|
||||
if (myMethod.canChangeParameters()) {
|
||||
final JPanel parametersPanel = createParametersPanel(!panels.isEmpty());
|
||||
if (!panels.isEmpty()) {
|
||||
parametersPanel.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
parametersPanel.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
}
|
||||
subPanel.add(parametersPanel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -108,7 +108,7 @@ public class ComboBox extends ComboBoxWithWidePopup implements AWTEventListener
|
||||
.setFocusOwners(new Component[]{this})
|
||||
.setMinSize(new Dimension(getWidth(), -1))
|
||||
.createPopup();
|
||||
list.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
list.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
myJBPopup.showUnderneathOf(this);
|
||||
list.addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
|
||||
@@ -1860,7 +1860,7 @@ public abstract class DialogWrapper {
|
||||
setLayout(new BorderLayout());
|
||||
JBScrollPane pane =
|
||||
new JBScrollPane(myLabel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
pane.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
pane.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
pane.setBackground(null);
|
||||
pane.getViewport().setBackground(null);
|
||||
pane.setOpaque(false);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -63,6 +63,9 @@ public class IdeBorderFactory {
|
||||
return new EmptyBorder(insets);
|
||||
}
|
||||
|
||||
public static Border createEmptyBorder() {
|
||||
return createEmptyBorder(0);
|
||||
}
|
||||
public static Border createEmptyBorder(int thickness) {
|
||||
return new EmptyBorder(thickness, thickness, thickness, thickness);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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,7 +57,7 @@ public class ScrollPaneFactory implements ScrollPaneConstants {
|
||||
public static JScrollPane createScrollPane(Component view, boolean withoutBorder) {
|
||||
JBScrollPane scrollPane = new JBScrollPane(view);
|
||||
if (withoutBorder) {
|
||||
scrollPane.setBorder(IdeBorderFactory.createEmptyBorder(0)); // set empty border, because setting null doesn't always take effect
|
||||
scrollPane.setBorder(IdeBorderFactory.createEmptyBorder()); // set empty border, because setting null doesn't always take effect
|
||||
}
|
||||
return scrollPane;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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.diagnostic;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -251,7 +266,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
|
||||
BackAction back = new BackAction();
|
||||
goBack.add(back);
|
||||
ActionToolbar backToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, goBack, true);
|
||||
backToolbar.getComponent().setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
backToolbar.getComponent().setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
backToolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
|
||||
myBackButtonPanel.add(backToolbar.getComponent(), BorderLayout.CENTER);
|
||||
|
||||
@@ -260,7 +275,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
|
||||
goForward.add(forward);
|
||||
ActionToolbar forwardToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, goForward, true);
|
||||
forwardToolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
|
||||
forwardToolbar.getComponent().setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
forwardToolbar.getComponent().setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
myNextButtonPanel.add(forwardToolbar.getComponent(), BorderLayout.CENTER);
|
||||
|
||||
myTabs = new HeaderlessTabbedPane(getDisposable());
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public abstract class AbstractUpdateDialog extends DialogWrapper {
|
||||
if (UIUtil.isUnderDarcula()) {
|
||||
css += "<style>body {background: #" + ColorUtil.toHex(UIUtil.getPanelBackground()) + ";}</style>";
|
||||
}
|
||||
updateLinkPane.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
updateLinkPane.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
updateLinkPane.setText(IdeBundle.message("updates.configure.label", css));
|
||||
updateLinkPane.setEditable(false);
|
||||
LabelTextReplacingUtil.replaceText(panel);
|
||||
|
||||
@@ -352,7 +352,7 @@ public class ColorPicker extends JPanel implements ColorListener, DocumentListen
|
||||
pipette.setUI(new BasicButtonUI());
|
||||
pipette.setRolloverEnabled(true);
|
||||
pipette.setIcon(AllIcons.Ide.Pipette);
|
||||
pipette.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
pipette.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
pipette.setRolloverIcon(AllIcons.Ide.Pipette_rollover);
|
||||
pipette.setFocusable(false);
|
||||
pipette.addActionListener(new ActionListener() {
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ public class GrChangeSignatureDialog extends ChangeSignatureDialogBase<GrParamet
|
||||
|
||||
final JPanel panel = ToolbarDecorator.createDecorator(table).createPanel();
|
||||
//.addExtraAction(myPropExceptionsButton).createPanel();
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(0));
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder());
|
||||
|
||||
myExceptionsModel.addTableModelListener(mySignatureUpdater);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user