146 |
{ |
{ |
147 |
// Convert sourcePoint to screen coordinates. |
// Convert sourcePoint to screen coordinates. |
148 |
Point sourcePointOnScreen = sourcePoint; |
Point sourcePointOnScreen = sourcePoint; |
149 |
SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); |
|
150 |
|
if (source.isShowing()) |
151 |
|
SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); |
152 |
|
|
153 |
Point compPointOnScreen; |
Point compPointOnScreen; |
154 |
Component resultComp = null; |
Component resultComp = null; |
170 |
&& sourcePointOnScreen.y < compPointOnScreen.y + size.height) |
&& sourcePointOnScreen.y < compPointOnScreen.y + size.height) |
171 |
{ |
{ |
172 |
Point p = sourcePointOnScreen; |
Point p = sourcePointOnScreen; |
173 |
SwingUtilities.convertPointFromScreen(p, comp); |
|
174 |
|
if (comp.isShowing()) |
175 |
|
SwingUtilities.convertPointFromScreen(p, comp); |
176 |
|
|
177 |
resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y); |
resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y); |
178 |
break; |
break; |
179 |
} |
} |