JBInsets.NONE removed

This commit is contained in:
Konstantin Bulenkov
2015-01-06 22:38:09 +01:00
parent a7fa479652
commit fe84346f21
5 changed files with 26 additions and 12 deletions
@@ -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.
@@ -24,6 +24,7 @@ import com.intellij.ui.ColorUtil;
import com.intellij.ui.Gray;
import com.intellij.util.containers.HashMap;
import com.intellij.util.ui.JBInsets;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import gnu.trove.THashMap;
import org.jetbrains.annotations.NotNull;
@@ -49,12 +50,12 @@ public abstract class AbstractNavBarUI implements NavBarUI {
@Override
public Insets getElementIpad(boolean isPopupElement) {
return isPopupElement ? new Insets(1, 2, 1, 2) : (Insets)JBInsets.NONE.clone();
return isPopupElement ? JBUI.insets(1, 2, 1, 2) : JBUI.emptyInsets();
}
@Override
public JBInsets getElementPadding() {
return new JBInsets(3, 3, 3, 3);
return JBUI.insets(3, 3, 3, 3);
}
@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.
@@ -76,7 +76,7 @@ public class JBTabsImpl extends JComponent
public final Map<TabInfo, Toolbar> myInfo2Toolbar = new HashMap<TabInfo, Toolbar>();
public Dimension myHeaderFitSize;
private Insets myInnerInsets = JBInsets.NONE;
private Insets myInnerInsets = JBUI.emptyInsets();
private final List<EventListener> myTabMouseListeners = ContainerUtil.createLockFreeCopyOnWriteList();
private final List<TabsListener> myTabListeners = ContainerUtil.createLockFreeCopyOnWriteList();
@@ -1,6 +1,21 @@
/*
* 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.ide.ui.laf.darcula;
import com.intellij.util.ui.JBInsets;
import com.intellij.util.ui.JBUI;
import javax.swing.border.Border;
import javax.swing.plaf.UIResource;
@@ -17,7 +32,7 @@ public class DarculaTableHeaderBorder implements Border, UIResource {
@Override
public Insets getBorderInsets(Component c) {
return (Insets)JBInsets.NONE.clone();
return JBUI.emptyInsets();
}
@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,7 +74,7 @@ import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.messages.impl.MessageListenerList;
import com.intellij.util.ui.JBInsets;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.update.MergingUpdateQueue;
import com.intellij.util.ui.update.Update;
@@ -268,7 +268,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
@NotNull
@Override
public Insets getBorderInsets(Component c) {
return (Insets)JBInsets.NONE.clone();
return JBUI.emptyInsets();
}
@Override
@@ -17,7 +17,6 @@ package com.intellij.util.ui;
import org.jetbrains.annotations.NotNull;
import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import java.awt.*;
@@ -27,7 +26,6 @@ import static com.intellij.util.ui.JBUI.scale;
* @author Konstantin Bulenkov
*/
public class JBInsets extends Insets {
public static final JBInsets NONE = new JBInsets(0, 0, 0, 0);
/**
* Creates and initializes a new <code>Insets</code> object with the
* specified top, left, bottom, and right insets.