diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java b/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java index 301758511612..1670491b91bf 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2014 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. @@ -58,6 +58,9 @@ public interface PopupComponent { class AwtHeavyweight implements Factory { public PopupComponent getPopup(Component owner, Component content, int x, int y, JBPopup jbPopup) { + if (OurHeavyWeightPopup.isEnabled()) { + return new AwtPopupWrapper(new OurHeavyWeightPopup(owner, content, x, y), jbPopup); + } final PopupFactory factory = PopupFactory.getSharedInstance(); final int oldType = PopupUtil.getPopupType(factory); @@ -172,7 +175,7 @@ public interface PopupComponent { myJBPopup = jbPopup; if (SystemInfo.isMac && UIUtil.isUnderAquaLookAndFeel()) { - final Component c = (Component)ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component"); + final Component c = ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component"); c.setBackground(UIUtil.getPanelBackground()); } } @@ -220,7 +223,7 @@ public interface PopupComponent { } public Window getWindow() { - final Component c = (Component)ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component"); + final Component c = ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component"); return c instanceof JWindow ? (JWindow)c : null; } |