IDEA-99896 Lower pane in split pane view is restricted after using database browser

This commit is contained in:
Vassiliy Kudryashov
2013-01-28 23:19:36 +04:00
parent 89b25748fe
commit 45964ee1b0
17 changed files with 92 additions and 15 deletions
@@ -26,6 +26,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiManager;
import com.intellij.ui.PopupHandler;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.ui.UIUtil;
import org.intellij.images.ImagesBundle;
import org.intellij.images.editor.ImageDocument;
@@ -190,7 +191,7 @@ final class ImageEditorUI extends JPanel implements DataProvider {
return zoomModel;
}
private static final class ImageContainerPane extends JLayeredPane {
private static final class ImageContainerPane extends JBLayeredPane {
private final ImageComponent imageComponent;
public ImageContainerPane(ImageComponent imageComponent) {
@@ -45,6 +45,7 @@ import com.intellij.psi.SmartPointerManager;
import com.intellij.psi.SmartPsiElementPointer;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.SideBorder;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.util.Consumer;
import com.intellij.util.containers.HashMap;
@@ -253,7 +254,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
});
setLayout(new BorderLayout());
JLayeredPane layeredPane = new JLayeredPane() {
JLayeredPane layeredPane = new JBLayeredPane() {
@Override
public void doLayout() {
final Rectangle r = getBounds();
@@ -59,6 +59,7 @@ import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.DebugUtil;
import com.intellij.ui.*;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.JBList;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.ui.plaf.beg.BegPopupMenuBorder;
@@ -1347,7 +1348,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
return true;
}
private class LookupLayeredPane extends JLayeredPane {
private class LookupLayeredPane extends JBLayeredPane {
final JPanel mainPanel = new JPanel(new BorderLayout());
private LookupLayeredPane() {
@@ -75,6 +75,7 @@ import com.intellij.psi.util.PsiUtilCore;
import com.intellij.ui.HintListener;
import com.intellij.ui.LightweightHint;
import com.intellij.ui.ScreenUtil;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.usageView.UsageViewShortNameLocation;
import com.intellij.usageView.UsageViewTypeLocation;
import com.intellij.util.Alarm;
@@ -901,7 +902,7 @@ public class CtrlMouseHandler extends AbstractProjectComponent {
}
}
private class QuickDocInfoPane extends JLayeredPane {
private class QuickDocInfoPane extends JBLayeredPane {
private static final int BUTTON_HGAP = 5;
@@ -17,6 +17,7 @@ package com.intellij.execution.impl;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.util.Disposer;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.ui.AbstractLayoutManager;
import com.intellij.util.ui.AnimatedIcon;
import com.intellij.util.ui.AsyncProcessIcon;
@@ -32,7 +33,7 @@ import java.awt.*;
* Date: 8/8/11
* Time: 3:13 PM
*/
public class MyDiffContainer extends JLayeredPane implements Disposable {
public class MyDiffContainer extends JBLayeredPane implements Disposable {
private final AnimatedIcon myIcon = new AsyncProcessIcon(getClass().getName());
private final JComponent myContent;
@@ -50,6 +50,7 @@ import com.intellij.openapi.vcs.changes.patch.CreatePatchConfigurationPanel;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.*;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.Consumer;
import com.intellij.util.ImageLoader;
import com.intellij.util.ui.AbstractLayoutManager;
@@ -586,7 +587,7 @@ public abstract class HistoryDialog<T extends HistoryDialogModel> extends FrameW
}
}
private static class MyDiffContainer extends JLayeredPane implements Disposable {
private static class MyDiffContainer extends JBLayeredPane implements Disposable {
private AnimatedIcon myIcon = new AsyncProcessIcon.Big(this.getClass().getName());
private JComponent myContent;
@@ -17,6 +17,7 @@ package com.intellij.openapi.ui;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.util.Disposer;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.panels.NonOpaquePanel;
import com.intellij.util.Alarm;
import com.intellij.util.ui.Animator;
@@ -224,7 +225,7 @@ public class LoadingDecorator {
}
}
private static class MyLayeredPane extends JLayeredPane {
private static class MyLayeredPane extends JBLayeredPane {
@Override
public void doLayout() {
super.doLayout();
@@ -0,0 +1,34 @@
/*
* 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.ui.components;
import javax.swing.*;
import java.awt.*;
/**
* User: Vassiliy.Kudryashov
*/
public class JBLayeredPane extends JLayeredPane {
private static final Dimension EMPTY = new Dimension(0, 0);
@Override
public Dimension getMinimumSize() {
if (!isMinimumSizeSet())
return EMPTY;
return super.getMinimumSize();
}
}
@@ -73,9 +73,13 @@ import com.intellij.ui.GuiUtils;
import com.intellij.ui.JBColor;
import com.intellij.ui.LightweightHint;
import com.intellij.ui.SideBorder;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.JBScrollBar;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.util.*;
import com.intellij.util.Alarm;
import com.intellij.util.IJSwingUtilities;
import com.intellij.util.Processor;
import com.intellij.util.Producer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.Convertor;
import com.intellij.util.containers.HashMap;
@@ -767,7 +771,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
*/
if (mayShowToolbar()) {
JLayeredPane layeredPane = new JLayeredPane() {
JLayeredPane layeredPane = new JBLayeredPane() {
@Override
public void doLayout() {
final Component[] components = getComponents();
@@ -42,6 +42,7 @@ import com.intellij.openapi.wm.ex.WindowManagerEx;
import com.intellij.openapi.wm.impl.IdeFrameImpl;
import com.intellij.openapi.wm.impl.IdeGlassPaneImpl;
import com.intellij.ui.*;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.mac.foundation.Foundation;
import com.intellij.ui.mac.foundation.ID;
import com.intellij.ui.mac.foundation.MacUtil;
@@ -984,6 +985,12 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
putClientProperty("DIALOG_ROOT_PANE", true);
}
protected JLayeredPane createLayeredPane() {
JLayeredPane p = new JBLayeredPane();
p.setName(this.getName()+".layeredPane");
return p;
}
@Override
public void setGlassPane(final Component glass) {
if (myGlassPaneIsSet) {
@@ -16,8 +16,8 @@
package com.intellij.openapi.ui.impl;
import com.intellij.ide.DataManager;
import com.intellij.ide.ui.UISettings;
import com.intellij.ide.impl.TypeSafeDataProviderAdapter;
import com.intellij.ide.ui.UISettings;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.DataProvider;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
@@ -39,6 +39,7 @@ import com.intellij.openapi.wm.impl.IdeFrameImpl;
import com.intellij.openapi.wm.impl.IdeGlassPaneEx;
import com.intellij.ui.FocusTrackback;
import com.intellij.ui.ScreenUtil;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.popup.StackingPopupDispatcherImpl;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
@@ -655,6 +656,12 @@ public class GlassPaneDialogWrapperPeer extends DialogWrapperPeer implements Foc
myDialog = dialog;
}
protected JLayeredPane createLayeredPane() {
JLayeredPane p = new JBLayeredPane();
p.setName(this.getName()+".layeredPane");
return p;
}
@Override
public void dispose() {
myDialog = null;
@@ -682,7 +689,7 @@ public class GlassPaneDialogWrapperPeer extends DialogWrapperPeer implements Foc
public static class GlasspanePeerUnavailableException extends Exception {
}
public static class TransparentLayeredPane extends JLayeredPane {
public static class TransparentLayeredPane extends JBLayeredPane {
private TransparentLayeredPane() {
setLayout(new BorderLayout());
setOpaque(false);
@@ -39,6 +39,7 @@ import com.intellij.openapi.wm.impl.status.IdeStatusBarImpl;
import com.intellij.openapi.wm.impl.status.MemoryUsagePanel;
import com.intellij.ui.JBColor;
import com.intellij.ui.PopupHandler;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.JBPanel;
import com.intellij.util.IconUtil;
import com.intellij.util.containers.ContainerUtil;
@@ -155,6 +156,12 @@ public class IdeRootPane extends JRootPane implements UISettingsListener {
contentPane.revalidate();
}
protected JLayeredPane createLayeredPane() {
JLayeredPane p = new JBLayeredPane();
p.setName(this.getName()+".layeredPane");
return p;
}
protected final Container createContentPane(){
myContentPane = new JBPanel(new BorderLayout()){
@Override
@@ -32,6 +32,7 @@ import com.intellij.openapi.wm.ex.ToolWindowEx;
import com.intellij.openapi.wm.impl.commands.FinalizableCommand;
import com.intellij.reference.SoftReference;
import com.intellij.ui.ScreenUtil;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.containers.HashMap;
import com.intellij.util.ui.UIUtil;
@@ -49,7 +50,7 @@ import java.util.Comparator;
* @author Anton Katilin
* @author Vladimir Kondratyev
*/
public final class ToolWindowsPane extends JLayeredPane implements Disposable {
public final class ToolWindowsPane extends JBLayeredPane implements Disposable {
private static final Logger LOG=Logger.getInstance("#com.intellij.openapi.wm.impl.ToolWindowsPane");
private final IdeFrameImpl myFrame;
@@ -16,6 +16,7 @@
package com.intellij.util.ui;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
@@ -27,6 +28,12 @@ public class Layers extends JLayeredPane {
public Layers() {
setLayout(new Layout());
}
@Override
public Dimension getMinimumSize() {
if (!isMinimumSizeSet())
return new Dimension(0, 0);
return super.getMinimumSize();
}
private class Layout implements LayoutManager2 {
public void addLayoutComponent(Component comp, Object constraints) {
@@ -40,6 +40,7 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.*;
import com.intellij.ui.JBColor;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.uiDesigner.*;
import com.intellij.uiDesigner.compiler.Utils;
import com.intellij.uiDesigner.componentTree.ComponentPtr;
@@ -980,7 +981,7 @@ public final class GuiEditor extends JPanel implements DataProvider, ModuleProvi
myQuickFixManager.hideIntentionHint();
}
private final class MyLayeredPane extends JLayeredPane implements Scrollable {
private final class MyLayeredPane extends JBLayeredPane implements Scrollable {
/**
* All components allocate whole pane's area.
*/
@@ -24,6 +24,7 @@ import com.intellij.ide.DeleteProvider;
import com.intellij.openapi.actionSystem.*;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.SideBorder;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.containers.IntArrayList;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -40,7 +41,7 @@ import java.util.List;
/**
* @author Alexander Lobas
*/
public class CaptionPanel extends JLayeredPane implements DataProvider, DeleteProvider {
public class CaptionPanel extends JBLayeredPane implements DataProvider, DeleteProvider {
private static final int SIZE = 16;
private final boolean myHorizontal;
@@ -49,6 +49,7 @@ import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.JBColor;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBLabel;
import com.intellij.ui.components.JBLayeredPane;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ExceptionUtil;
import com.intellij.util.ThrowableRunnable;
@@ -865,7 +866,7 @@ public abstract class DesignerEditorPanel extends JPanel implements DataProvider
}
}
private final class MyLayeredPane extends JLayeredPane implements Scrollable {
private final class MyLayeredPane extends JBLayeredPane implements Scrollable {
public void doLayout() {
for (int i = getComponentCount() - 1; i >= 0; i--) {
Component component = getComponent(i);