// permits window.open to reactivate windows in that context.
public void forceReopenSatellite(final String name,
final JavaScriptObject params)
{
Size preferredSize = null;
Point preferredPos = null;
for (ActiveSatellite satellite : satellites_)
{
if (satellite.getName().equals(name) &&
!satellite.getWindow().isClosed())
{
// save the window's geometry so we can restore it after the window
// is destroyed
final WindowEx win = satellite.getWindow();
Document doc = win.getDocument();
preferredSize = new Size(doc.getClientWidth(), doc.getClientHeight());
preferredPos = new Point(win.getLeft(), win.getTop());
callNotifyPendingReactivate(win);
// close the window
try
{
win.close();
}
catch(Throwable e)
{
}
break;
}
}
// didn't find an open window to reopen
if (preferredSize == null)
return;
// open a new window with the same geometry as the one we just destroyed,
// but with the newly supplied set of parameters
final Size windowSize = preferredSize;
final Point windowPos = preferredPos;
openSatellite(name, params, windowSize, false, windowPos);
}