false);
}
window.setBounds(oldWindow.getBounds());
window.setName("toolWindow.floating.window." + toolWindow.getId());
window.setContentPane(oldWindow.getContentPane());
resizeMouseInputHandler = new FloatingResizeMouseInputHandler(window.getWindow());
moveMouseInputHandler = new FloatingMoveMouseInputHandler(window.getWindow());
window.getWindow().addMouseMotionListener(resizeMouseInputHandler);
window.getWindow().addMouseListener(resizeMouseInputHandler);
window.getWindow().addComponentListener(windowComponentAdapter);
// Dispose old
oldWindow.getWindow().dispose();
// Show new
window.setVisible(true);
if (focusOwner != null)
SwingUtil.requestFocus(focusOwner);
} else {
ModalWindow oldWindow = window;
// Clean old window
oldWindow.getWindow().removeComponentListener(windowComponentAdapter);
oldWindow.getWindow().removeMouseMotionListener(resizeMouseInputHandler);
oldWindow.getWindow().removeMouseListener(resizeMouseInputHandler);
// Prepare for new
if ((Boolean) evt.getNewValue()) {
window = new JModalFrame(toolWindow,
resourceManager,
resourceManager.getBoolean("dialog.owner.enabled", true) ? descriptor.getWindowAnchestor() : null,
null,
false);
} else {
window = new JModalWindow(resourceManager,
resourceManager.getBoolean("dialog.owner.enabled", true) ? descriptor.getWindowAnchestor() : null,
null,
false);
}
window.setName("toolWindow.floating.window." + toolWindow.getId());
window.setContentPane(oldWindow.getContentPane());
resizeMouseInputHandler = new FloatingResizeMouseInputHandler(window.getWindow());
moveMouseInputHandler = new FloatingMoveMouseInputHandler(window.getWindow());
window.getWindow().addMouseMotionListener(resizeMouseInputHandler);
window.getWindow().addMouseListener(resizeMouseInputHandler);
window.getWindow().addComponentListener(new WindowComponentAdapter());