mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
control where to show the popup
This commit is contained in:
@@ -517,8 +517,8 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
|
||||
myPopupLayeredPane.add(mySearchPopup, JLayeredPane.POPUP_LAYER);
|
||||
if (myPopupLayeredPane == null) return; // See # 27482. Somewho it does happen...
|
||||
Point lPaneP = myPopupLayeredPane.getLocationOnScreen();
|
||||
Point componentP = myComponent.getLocationOnScreen();
|
||||
Rectangle r = myComponent.getVisibleRect();
|
||||
Point componentP = getComponentLocationOnScreen();
|
||||
Rectangle r = getComponentVisibleRect();
|
||||
Dimension prefSize = mySearchPopup.getPreferredSize();
|
||||
Window window = (Window)SwingUtilities.getAncestorOfClass(Window.class, myComponent);
|
||||
Point windowP;
|
||||
@@ -539,6 +539,14 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
|
||||
mySearchPopup.validate();
|
||||
}
|
||||
|
||||
protected Rectangle getComponentVisibleRect() {
|
||||
return myComponent.getVisibleRect();
|
||||
}
|
||||
|
||||
protected Point getComponentLocationOnScreen() {
|
||||
return myComponent.getLocationOnScreen();
|
||||
}
|
||||
|
||||
private class MyToolWindowManagerListener extends ToolWindowManagerAdapter {
|
||||
public void stateChanged() {
|
||||
manageSearchPopup(null);
|
||||
|
||||
Reference in New Issue
Block a user